TwoToneDetect TwoToneDetect on a Raspberry Pi - How To

Status
Not open for further replies.

davidVT

Member
Feed Provider
Joined
Aug 29, 2010
Messages
138
Location
Washington County,Vermont
Hi everyone,



Thanks to the efforts of DC31 and others, I've had some success building a TwoToneDetect executable file that will run on the Raspberry Pi. This executable bundles all of the Python dependencies, which greatly reduces the number of steps needed to get TTD running on a stock Pi OS image.



The instructions on the website for getting TTD running on a Pi had gotten pretty out of date, so I updated them today using the new executable files that I just posted on the site. The updated page is here:



TwoToneDetect on a Raspberry Pi | TwoToneDetect



For those running TTD on a Pi, please take a look and let me know if these instructions work for you, if there are things that are unclear, should be added, etc.



Thanks,



Andy



Andy, sounds great. I will try this evening on a clean Pi.
Question, can I just drag and drop existing tones, redundant and config files from earlier TTD versions??
Thank you


Sent from my iPad using Tapatalk
 

aaknitt

Member
Feed Provider
Joined
Aug 27, 2005
Messages
1,300
Andy, sounds great. I will try this evening on a clean Pi.
Question, can I just drag and drop existing tones, redundant and config files from earlier TTD versions??
Thank you


Sent from my iPad using Tapatalk

Yes that should be fine, just do it after uncompressing the downloaded files to replace the generic ones that come with the package.

Andy
 

DC31

Member
Feed Provider
Joined
Feb 19, 2011
Messages
1,547
Location
Massachusetts
TTD70 Pi image

I have set up TTD70 on a pi3 and made an image that should be downloadable for those interested in trying it out on a pi. I tried to keep this image as minimal as possible to cut down on upload/download time, etc. The compressed image is 1.31 Gb so it still may take you an hour to download it. After extracting, it will be around 3.95 Gb, might fit on a 4 Gb card but definitely will fit on an 8 Gb. Username is pi, password is ttd-v70. Hostname is ttd-v70

1. Download the compressed file.

https://drive.google.com/open?id=13qSTOreMdTPcpRRV9gn46_iGzjUNq8al


2. Extract the tar.gz file to an .img file using 7-Zip, WinZip, or whatever works for you.

3. Image an SD card with this .img file. Etcher (from etcher.io) is a good tool for imaging cards.

4. Put the imaged card into your pi. Plug in your usb sound card. Connect an ethernet cable.

5. a. At this point you can connect an hdmi monitor and keyboard/mouse then power the pi up.
b. Alternatively, you may omit the monitor/keyboard and connect via ssh or vnc. Real VNC is running and available at ttd-v70.local:5900 on the same network.

6. TTD will load after about 30 seconds. Use the Edit Config Info button in the TTD window to set up that information. There is an icon on the desktop that can be used to edit the Tones.cfg information. Make sure that you save this information.

7. After you have made edits to these files, your best bet is to reboot the pi. (Remember that any time you make changes, other than to email addresses, TTD needs to restart to read these changes) Go to the raspberry icon at the upper left then choose Shutdown/Reboot.

One of the quirks with this setup is that Pulse Audio Volume Control needs to be running prior to starting TTD. Starting TTD by rebooting the pi takes care of this for you.

8. Features:
a. TTD autostarts on boot of the pi.
b. The pi reboots automatically daily at midnight.
c. The audio files are automatically deleted from the TTD/audio folder after two days.
d. RealVNC is enabled. this allows access to the GUI from your local network and can be set up to allow access from the internet with a RealVNC cloud account. (free and simple)
e. Runs well on wifi on a pi3.


Disclaimer: This image has not been thoroughly tested. It has been tested enough to see that it works and the common issues are taken care of. If you find other issues, post the error messages here and we can figure them out.

Let me know how it works for you if you try it.

Jim
 

Attachments

  • Untitled.jpg
    Untitled.jpg
    41.8 KB · Views: 289
Last edited:

nosoup4u

Member
Feed Provider
Joined
Jan 30, 2002
Messages
2,176
Location
High Bridge, NJ
I can confirm that this image is working great! I just cut my system over from my windows system and after editing my post processing scripts, it works perfectly.
 

DC31

Member
Feed Provider
Joined
Feb 19, 2011
Messages
1,547
Location
Massachusetts
I have set up TTD70 on a pi3 and made an image that should be downloadable for those interested in trying it out on a pi. I tried to keep this image as minimal as possible to cut down on upload/download time, etc. The compressed image is 1.31 Gb so it still may take you an hour to download it. After extracting, it will be around 3.95 Gb, might fit on a 4 Gb card but definitely will fit on an 8 Gb. Username is pi, password is ttd-v70. Hostname is ttd-v70

1. Download the compressed file.

https://drive.google.com/open?id=13qSTOreMdTPcpRRV9gn46_iGzjUNq8al


2. Extract the tar.gz file to an .img file using 7-Zip, WinZip, or whatever works for you.

3. Image an SD card with this .img file. Etcher (from etcher.io) is a good tool for imaging cards.

4. Put the imaged card into your pi. Plug in your usb sound card. Connect an ethernet cable.

5. a. At this point you can connect an hdmi monitor and keyboard/mouse then power the pi up.
b. Alternatively, you may omit the monitor/keyboard and connect via ssh or vnc. Real VNC is running and available at ttd-v70.local:5900 on the same network.

6. TTD will load after about 30 seconds. Use the Edit Config Info button in the TTD window to set up that information. There is an icon on the desktop that can be used to edit the Tones.cfg information. Make sure that you save this information.

7. After you have made edits to these files, your best bet is to reboot the pi. (Remember that any time you make changes, other than to email addresses, TTD needs to restart to read these changes) Go to the raspberry icon at the upper left then choose Shutdown/Reboot.

One of the quirks with this setup is that Pulse Audio Volume Control needs to be running prior to starting TTD. Starting TTD by rebooting the pi takes care of this for you.

8. Features:
a. TTD autostarts on boot of the pi.
b. The pi reboots automatically daily at midnight.
c. The audio files are automatically deleted from the TTD/audio folder after two days.
d. RealVNC is enabled. this allows access to the GUI from your local network and can be set up to allow access from the internet with a RealVNC cloud account. (free and simple)
e. Runs well on wifi on a pi3.


Disclaimer: This image has not been thoroughly tested. It has been tested enough to see that it works and the common issues are taken care of. If you find other issues, post the error messages here and we can figure them out.

Let me know how it works for you if you try it.

Jim

The problems that you have been having were my fault. When doing the compression I used an incorrect file name. I have compressed the file again and uploaded a new version that hopefully will work better.

https://drive.google.com/open?id=1DpySjqfNi-mECiDjsNPHDjaG_17iw8ph
 

ffryan76

Member
Feed Provider
Joined
Nov 28, 2004
Messages
175
Location
South central, In
Well it's about time. Just kidding.
Thank you for even coming up with this for us that have ADD for coding and have Google search deficiencies.
 

ffryan76

Member
Feed Provider
Joined
Nov 28, 2004
Messages
175
Location
South central, In
Jim,

Had a issue when I loaded it into etcher. I got a notification the the image file wasn't bootable.
I did load it onto a card but it didn't run.
 

Attachments

  • Untitled.png
    Untitled.png
    8.4 KB · Views: 235

DC31

Member
Feed Provider
Joined
Feb 19, 2011
Messages
1,547
Location
Massachusetts
Jim,

Had a issue when I loaded it into etcher. I got a notification the the image file wasn't bootable.
I did load it onto a card but it didn't run.

yes, something is happening to the file during compression and upload/download. I agree, it doesn't work.
 

webstar22

RenfrewCountyScanner.com
Feed Provider
Joined
Dec 21, 2003
Messages
1,006
Location
Ontario, Canada
DC31 sent me an uncompressed img file at 2.9GB and it worked on my Pi3. So pending his approval I setup a .torrent tracker so we can send it out to everyone without killing his google drive account.
 

ffryan76

Member
Feed Provider
Joined
Nov 28, 2004
Messages
175
Location
South central, In
Code:
Traceback (most recent call last):
  File "TwoToneDetect70.py", line 543, in alert
  File "dist-packages/pyaudio.py", line 750, in open
IOError: [Errno -9997] Invalid sample rate
338.0 2839.28949409

0
after record
delay timer NAFD Fire ST1 16:15:19 on 01/18/18
Traceback (most recent call last):
  File "TwoToneDetect70.py", line 675, in alert
UnboundLocalError: local variable 'recordstream' referenced before assignment

So, I'm stuck. I think this has everything to do with my audio setup but I can't quite fix it. I have two USB Sound cards. The first card, 0, is for TTD70. The second card I will use for streaming to broadcastify. What is the error I am getting located above?

Also, TTD70 will not execute without PAVolume being open first.
 
Last edited:

DC31

Member
Feed Provider
Joined
Feb 19, 2011
Messages
1,547
Location
Massachusetts
Code:
Traceback (most recent call last):
  File "TwoToneDetect70.py", line 543, in alert
  File "dist-packages/pyaudio.py", line 750, in open
IOError: [Errno -9997] Invalid sample rate
338.0 2839.28949409

0
after record
delay timer NAFD Fire ST1 16:15:19 on 01/18/18
Traceback (most recent call last):
  File "TwoToneDetect70.py", line 675, in alert
UnboundLocalError: local variable 'recordstream' referenced before assignment

So, I'm stuck. I think this has everything to do with my audio setup but I can't quite fix it. I have two USB Sound cards. The first card, 0, is for TTD70. The second card I will use for streaming to broadcastify. What is the error I am getting located above?

Also, TTD70 will not execute without PAVolume being open first.



For the record, two fixes were attempted:

1. Both usb sound cards were configured for input only. The TTD window had audio output going to a USB sound card. That was changed to the ALSA on-board sound card.
2. Pyaudio was installed. sudo pip install python-pyaudio
(not really sure which if either of these fixed the issue, but the program now sends emails with attachments!)

FTP server upload was also failing. This will happen if there are any spaces in the Description parameter in tones.cfg Use underscores.

Ryan's ftp server password includes a single quote ' This may be causing authentication errors. Still working on this one.
 

ffryan76

Member
Feed Provider
Joined
Nov 28, 2004
Messages
175
Location
South central, In
FTP with Raspberry Pi

This is sort of on topic but kinda not.
Has anyone tried to do an FTP on a pi for Twotonedetect mp3s? If you have, is it difficult to get it running? Do you have instructions a=on how to do it?
 

jeffycc

Member
Joined
Dec 23, 2004
Messages
78
Location
Nashua NH
TTD-No AMR/MP3 Emails

TTD Installed on Pi3, OS is Raspbian Stretch.

I get the Text-Only email when my tone goes off. I do not receive any AMR or MP3 email with the tone. Is this an issue with FFMPEG?

I did the command below:

sudo apt-get install ffmpeg

After install, I had to go find the ffmpeg which I found under directory .usr/bin

Is this the correct ffmpeg?

Thanks!
Jeff
 
Status
Not open for further replies.
Top