TwoToneDetect New TwoToneDetect in the works - Python based

MikeOrlando02

Member
Joined
Oct 8, 2015
Messages
97
Little bug with body text

Decided the [mp3] link was not working great as it only creates the link for the text users and MP3/AMR users just see a bad [mp3] link in the body. Used the remote admit to clear my body. A day later I was still seeing the [mp3] link. I logged into the local computer and looked at the tones file and body was blank. I continued to get the links in my messages. I had to close and restart TTD before it would stop including the previous body text.

Seems like a minor bug.
 

pete7919

Member
Joined
Feb 7, 2007
Messages
94
I'm having the same issue using V68 and I'm also using the redundant tone feature.

Yes. I've not been able to figure out as nothing is logged. The only way I've found around it is to schedule it to restart every day at 3am. Sometimes it's fine, but other times I'll miss a few hours between when it hangs and when the restart happens.
 

Westernbound

Member
Joined
Aug 11, 2014
Messages
35
Location
Dickens TX
Redundant Instructions

On the Redundant instructions page in tip #1 of the tips section the link that says "remote tones.cfg capabilities" goes to page not found.

marvin
 

aaknitt

Member
Feed Provider
Joined
Aug 27, 2005
Messages
1,300
Decided the [mp3] link was not working great as it only creates the link for the text users and MP3/AMR users just see a bad [mp3] link in the body.

I'll fix this in the next release.


Westernbound said:
On the Redundant instructions page in tip #1 of the tips section the link that says "remote tones.cfg capabilities" goes to page not found.

Fixed, thanks for the heads up.

Andy
 

bendsley

Member
Feed Provider
Joined
Dec 22, 2006
Messages
6
Location
Coshocton, OH
Error

I am getting the following error when trying to open TwoToneDetect in the debug:

"Please build and install the PortAudio Python bindings first"

I have gotten the error in the past and just tried a few more times and it opened, but this time I can not get it to open at all.
 

motomeso

Member
Premium Subscriber
Joined
Dec 19, 2002
Messages
952
Location
Ontario
How can I edit this if I don't want the machine to reboot? Just remove this line?

"tasklist /nh /fi "imagename eq %appName%" | find /i "%appName%" > nul || shutdown -r && goto EXIT"

I created the attached batch file script to monitor the TTD application running on a Windows PC. I added the batch file to Windows Scheduler to run hourly to monitor the application.

This script will check to see if TTD is running and if it is checks that it is not responding. If the TTD application is not running or unresponsive it attempts to start TTD. If the script is unable to load TTD it restarts the computer, presuming that you have TTD set to start when Windows loads.

I hope to build on this so if you have an FTP server the script can upload a log file showing if TTD was running on last check or not. That will be phase II of the project.

Just change the file type to .bat and place it in the same folder as TTD. Make sure appName is set to the exact name of the TTD EXE version you are running.


Hope this helps someone
 

aaknitt

Member
Feed Provider
Joined
Aug 27, 2005
Messages
1,300
Would you be able to do TTD monitoring for Linux?

Yes, there is a .pyc file included in the download that will run on Linux. However, it will require a number of dependencies to be installed. You can get some idea of what the dependencies are by looking at the Raspberry Pi page for TTD. Beyond that, just attempt to run the .pyc file and if there are errors, those error messages should tell you what dependencies are missing.

Andy
 

nsc

Member
Joined
Dec 15, 2013
Messages
7
Location
Kuressaare, Saaremaa
I created the attached batch file script to monitor the TTD application running on a Windows PC. I added the batch file to Windows Scheduler to run hourly to monitor the application.

This script will check to see if TTD is running and if it is checks that it is not responding. If the TTD application is not running or unresponsive it attempts to start TTD. If the script is unable to load TTD it restarts the computer, presuming that you have TTD set to start when Windows loads.

I hope to build on this so if you have an FTP server the script can upload a log file showing if TTD was running on last check or not. That will be phase II of the project.

Just change the file type to .bat and place it in the same folder as TTD. Make sure appName is set to the exact name of the TTD EXE version you are running.


Hope this helps someone

Anyone create TTDMon on Linux too?
 

DC31

Member
Feed Provider
Joined
Feb 19, 2011
Messages
1,547
Location
Massachusetts
Anyone create TTDMon on Linux too?

Yes, there is a simple script that runs at a prescribed interval. Mine runs every two minutes. If it does not find ttd running it restarts it and logs the hiccup. On my RPi I don't know that has ever really been called on. I am away and can send it to you when i return in a week or so
 

nsc

Member
Joined
Dec 15, 2013
Messages
7
Location
Kuressaare, Saaremaa
Yes, there is a simple script that runs at a prescribed interval. Mine runs every two minutes. If it does not find ttd running it restarts it and logs the hiccup. On my RPi I don't know that has ever really been called on. I am away and can send it to you when i return in a week or so

Thank you..I'm waiting :)
 

aaknitt

Member
Feed Provider
Joined
Aug 27, 2005
Messages
1,300
Anyone create TTDMon on Linux too?

What I do is use screen to run TTD in a detached shell window. I use two shell scripts for this. The first one, called TTDcheck.sh is executed once per minute via a cron task. This script uses grep to check to see if TwoToneDetect is already running. If not, it starts it in a detached screen session by calling startTTD.sh. All startTTD.sh does is start TwoToneDetect using a specific USB sound card, as I have more than one on the Pi that I'm using. If your'e only using a single USB sound card, you can start TTD directly in TTDcheck.sh. Both files are linked to for you to take a look at.

Andy
 

DC31

Member
Feed Provider
Joined
Feb 19, 2011
Messages
1,547
Location
Massachusetts
Does PulseAudio is only one way to use TwoToneDetection? or this way works too?

https://computers.tutsplus.com/articles/using-a-usb-audio-device-with-a-raspberry-pi--mac-55876

TTD requires pulse.

From TwoToneDetect.net:

Setting up pulseaudio

Unlike under Windows, we won’t be able to specify our USB sound card as the audio input to TwoToneDetect. This is because the Pi’s audio driver system doesn’t support different sampling rates for the sound card. It will only allow us to sample at the default rate. Instead, we’ll use pulseaudio as the input to TwoToneDetect, since pulseaudio will perform resampling from the USB sound card to TwoToneDetect. To set our audio input levels, we can use the pulse audio control GUI under XWindows. From a terminal window in the XWindows GUI, type pavucontrol to bring up the GUI. Click on the “Input” tab and set the volume of your USB sound card appropriately, using your radio with open squelch or tuned to a weather broadcast channel to get the levels correct. Set any other inputs to zero volume. Note: If you are running a GUI-less version of Raspbian (like Jessie Lite), you can use an environment variable to set the sound input device that you want to use with TTD. See the section below on “Running Multiple TwoToneDetect Instances” for instructions on how to do this.
 
Top