Go to advanced search

by hawkesley
Tue Aug 13, 2019 11:06 am
Forum: Advanced users
Topic: email atachment
Replies: 5
Views: 182

Re: email atachment

Thanks for that the script now runs as intended.
by hawkesley
Tue Aug 13, 2019 10:26 am
Forum: Advanced users
Topic: email atachment
Replies: 5
Views: 182

Re: email atachment

Yes that is the problem so my question is how to add the variable latest contents to start_path?
by hawkesley
Tue Aug 13, 2019 9:46 am
Forum: Advanced users
Topic: email atachment
Replies: 5
Views: 182

email atachment

i want to send an email where the attachment will vary. I am trying to use a variable to hold the file name and add that to directory path. This fails with the error Traceback (most recent call last): File "/home/pi/email scripts/tony.sh", line 47, in <module> attachment =open(filename,'rb') TypeErr...
by hawkesley
Sun Aug 11, 2019 2:17 pm
Forum: Advanced users
Topic: get latest file in folder
Replies: 2
Views: 105

Re: get latest file in folder

Thank you ,works a treat.
by hawkesley
Sun Aug 11, 2019 2:01 pm
Forum: Advanced users
Topic: get latest file in folder
Replies: 2
Views: 105

get latest file in folder

I have a folder of pictures taken from the picamera saved to a folder labelled by date. I would like to select the latest picture from this folder. my code gives the error 'name latest' is not defined. import os import os.path path = "/home/pi/Pictures/" files =os.listdir(path) latest_file = files[0...
by hawkesley
Thu Apr 25, 2019 10:43 am
Forum: Advanced users
Topic: connecting two pi's without internet
Replies: 8
Views: 476

Re: connecting two pi's without internet

Thanks Guys. Looks a good solution.
With my project however, it needs to be mobile and the two pi.s will be powered via USB battery power packs.
I guess the router would need mains power. (i do have an old one).
I will post the result in due course.
by hawkesley
Wed Apr 24, 2019 2:51 pm
Forum: Advanced users
Topic: Siri Control-system
Replies: 4
Views: 206

Re: Siri Control-system - Progress

So my problem to solve was one module working and the other not. I modified address.py slightly as so:- #All of the words must be heard in order for this module to be executed commandWords = ["IP","address"] def execute(command): print("\n") print("IP Address") print("\n") I closed the PI and came b...
by hawkesley
Wed Apr 24, 2019 1:37 pm
Forum: Advanced users
Topic: Siri Control-system
Replies: 4
Views: 206

Re: Siri Control-system

Can anyone help please with this problem?
by hawkesley
Wed Apr 24, 2019 1:35 pm
Forum: Advanced users
Topic: connecting two pi's without internet
Replies: 8
Views: 476

Re: connecting two pi's without internet

Thanks I will give it a go.
by hawkesley
Wed Apr 24, 2019 1:01 pm
Forum: Advanced users
Topic: connecting two pi's without internet
Replies: 8
Views: 476

Re: connecting two pi's without internet

Thanks,
Where can I find out about subnet please?
by hawkesley
Wed Apr 24, 2019 12:52 pm
Forum: Advanced users
Topic: connecting two pi's without internet
Replies: 8
Views: 476

connecting two pi's without internet

I have a need to transfer a data file between two pi's on a regular basis(every10 mins) The pi's could be without internet connection. I found this article on the forum which would seem to do the job Transfer .txt between two RPi (no internet,no pc) However it requires the etho on both to have stati...
by hawkesley
Thu Apr 18, 2019 2:19 pm
Forum: Advanced users
Topic: Siri Control-system
Replies: 4
Views: 206

Re: Siri Control-system

Sorry, I forgot to mention that there is no error message.
When I call ip address from the siri note, it gives
The word(s) 'ip address' have been said.
There is no trackback. The program just hangs.
It will execute the life module if I then call that.
by hawkesley
Thu Apr 18, 2019 1:41 pm
Forum: Advanced users
Topic: Siri Control-system
Replies: 4
Views: 206

Siri Control-system

I am following an article from Magpi Projects book. The article describes aa simple way to send commands to the pi by voice using Siri on the Iphone https://github.com/theraspberryguy/SiriControl-System I have had it working with the provided 'life module' but it wont execute the module I have devel...
by hawkesley
Fri Mar 15, 2019 4:37 pm
Forum: Advanced users
Topic: possible uart conflict
Replies: 1
Views: 413

possible uart conflict

I am running a gps hat on a rpi3. I have lost my bluetooth connection.(adapter not found) I am wondering if the gps is in conflict and whether its possible to configure bluetooth and the gps on the same device. The gps is a HAB supplies board and the instructions for set up are on this link https://...
by hawkesley
Fri Mar 01, 2019 3:45 pm
Forum: Advanced users
Topic: Bluetooth adapter not found
Replies: 3
Views: 183

Re: Bluetooth adapter not found

Just to check in a standard configuration should the serial interface be enabled in the raspiconfig?
I also have enable_uart=0 in my /boot/config.txt
This was because I had a Sense Hat and a GPS hat previously attached.
by hawkesley
Fri Mar 01, 2019 2:48 pm
Forum: Advanced users
Topic: Bluetooth adapter not found
Replies: 3
Views: 183

Re: Bluetooth adapter not found

Just to add hciconfig -a gives nothing. Is this the right command?
by hawkesley
Fri Mar 01, 2019 1:32 pm
Forum: Advanced users
Topic: Bluetooth adapter not found
Replies: 3
Views: 183

Bluetooth adapter not found

My Bluetooth is showing adapter not found I have checked that the bluetooth service is running and it is. However the hciuart.service says the hciuart is dead or inactive sudo systemctl status hciuart.service ● hciuart.service - Configure Bluetooth Modems connected by UART Loaded: loaded (/lib/syste...
by hawkesley
Thu Jan 31, 2019 11:23 am
Forum: Python
Topic: Including a variable in a text file
Replies: 4
Views: 280

Re: Including a variable in a text file

Thanks guys that worked and take the point on naming.
by hawkesley
Wed Jan 30, 2019 4:33 pm
Forum: Python
Topic: Including a variable in a text file
Replies: 4
Views: 280

Including a variable in a text file

I have a need to include some data into a text file which will subsequently be spoken by festival. I can put the vars into a sentence which will print the result correctly but when written to a text file doesn t work. How can I write a text file that will parse the vars into english? long = 44 lat =...
by hawkesley
Wed Jan 30, 2019 1:22 pm
Forum: Advanced users
Topic: Using Festival to speak IP address
Replies: 7
Views: 400

Re: Using Festival to speak IP address Progress

I have made some progress in that the following code works and the IP address is spoken. I am though concerned that defining the hostname does feel the right ay and whether I should be using subprocess rather than os. Any thoughts appreciated. import os hostname = "hostname" os.system("hostname -I |...
by hawkesley
Tue Jan 29, 2019 4:02 pm
Forum: Advanced users
Topic: Using Festival to speak IP address
Replies: 7
Views: 400

Re: Using Festival to speak IP address

So if I define hostname the error goes but there is no speech. Any ideas?

Code: Select all

import os

hostname ="hostname"
bashcommand = "hostname  -I | festival --tts"

os.system(bashcommand)

by hawkesley
Tue Jan 29, 2019 3:01 pm
Forum: Advanced users
Topic: Using Festival to speak IP address
Replies: 7
Views: 400

Re: Using Festival to speak IP address

I am running the code in Thonny, but should that matter?
by hawkesley
Tue Jan 29, 2019 2:34 pm
Forum: Advanced users
Topic: Using Festival to speak IP address
Replies: 7
Views: 400

Re: Using Festival to speak IP address

Thanks for that. I get hostname undefined?
by hawkesley
Tue Jan 29, 2019 2:08 pm
Forum: Advanced users
Topic: Using Festival to speak IP address
Replies: 7
Views: 400

Using Festival to speak IP address

I would like to get my pi to speak the IP address from a python file. If i use this from the cli its works. hostname -I | festival -tts from a file it speaks hostname not the ip address. import os bashcommand = " echo hostname -I | festival --tts" os.system(bashcommand) What is the correct way to ex...
by hawkesley
Fri Dec 07, 2018 4:08 pm
Forum: Advanced users
Topic: Help with Flask
Replies: 7
Views: 508

Re: Help with Flask

Thanks for the corrections and advice.

Go to advanced search