TwoToneDetect New TwoToneDetect in the works - Python based

longreacher

Member
Joined
Mar 11, 2011
Messages
24
Location
NB
Hi Andy,
Thanks for the help (again). I've made those corrections, and am still running into the same error. I wonder if it might be due to my trying to upgrade to v69. I might try a clean install on a backup pi tonight to see if I can get better results.
Here is the output of my latest error message.

python ftpuploader.py sample.mp3 lrfd.orgfree.com/ username password --remotepath /callmp3/


Traceback (most recent call last):
File "ftpuploader.py", line 34, in <module>
ftp.connect(host,port,10)
File "/usr/lib/python2.7/ftplib.py", line 132, in connect
self.sock = socket.create_connection((self.host, self.port), self.timeout)
gaierror: [Errno -2] Name or service not known
could not upload sample.mp3 to lrfd.orgfree.com/


Thanks for the help guys.. Between your guidance and an "AHA" moment, we're up and running. (I hadn't made the change on our remote file, and so tones.cfg kept getting rewritten.) Doh.



I'm wondering about the behavior of "text_email_send = after record" vs. "text_email_send = both".
I had it sent to "both", and it did send 2 text messages, but I didn't see any difference between them. What advantage does setting that to "both" have?

I'm working in a live system, so I get limited opportunities to test settings.
Thanks again
 

aaknitt

Member
Feed Provider
Joined
Aug 27, 2005
Messages
1,300
Thanks for the help guys.. Between your guidance and an "AHA" moment, we're up and running. (I hadn't made the change on our remote file, and so tones.cfg kept getting rewritten.) Doh.



I'm wondering about the behavior of "text_email_send = after record" vs. "text_email_send = both".
I had it sent to "both", and it did send 2 text messages, but I didn't see any difference between them. What advantage does setting that to "both" have?

I'm working in a live system, so I get limited opportunities to test settings.
Thanks again

"Both" is used if you want to send a message out as soon as the tone drops, but also send a link to an uploaded file after the recording is completed.

Andy
 

webby52

Member
Premium Subscriber
Joined
Jun 26, 2004
Messages
43
Location
Hopewell, NJ
I'm having a weird issue...all of a sudden about 2 weeks ago, my TTDv68 is no longer sending audio files to any cellular subscribers. All the email addresses go thru just fine, yet no one gets the text messages. Not even the initial alert when tone is seen with no attachment. I've been back and forth with my VZW rep and they claim they have white listed my IP address and domain, yet still nothing. The email shows that its going thru but then gets hung up being delivered...I find it odd that its not delivering to any cellular address... not just VZW.
 

BigRedBox80

Member
Feed Provider
Joined
Apr 23, 2015
Messages
170
I'm having some issues with the redundant feature and I'm not sure why. I'm getting double messages sent.


Code:
[REDUNDANT]
file_access = ftp				;options are 'local' or 'ftp'
tone_tracking_file = redundant_tones_1.txt	;for local, use: c:\path\to\filename.txt
TTD_tracking_file = redundant_TTD_1.txt	;for local, use: c:\path\to\filename.txt
redundant_delay = 0				;number of seconds to wait before checking file after a tone set is found.  For primary TTD, set to 0 
redundant_window = 60				;number of seconds to allow timestamps between two tone sets to be different and still be considered the same tone
redundant_down_alert_time = 400			;number of seconds before the admin will be alerted that an instance of the program is offline
redundant_admin_email = email@address.co		;email address to send notifications to
redundant_instance_alias = Station		;Alias to identify this instance of TTD
FTP INFO HERE

Code:
[REDUNDANT]
file_access = ftp				;options are 'local' or 'ftp'
tone_tracking_file = redundant_tones_1.txt	;for local, use: c:\path\to\filename.txt
TTD_tracking_file = redundant_TTD_1.txt		;for local, use: c:\path\to\filename.txt
redundant_delay = 70				;number of seconds to wait before checking file after a tone set is found.  For primary TTD, set to 0 
redundant_window = 60				;number of seconds to allow timestamps between two tone sets to be different and still be considered the same tone
redundant_down_alert_time = 400			;number of seconds before the admin will be alerted that an instance of the program is offline
redundant_admin_email = email@address.co		;email address to send notifications to
redundant_instance_alias = Backup             ;Alias to identify this instance of TTD
FTP INFO HERE

Clocks are in sync within milliseconds of each other.

Logs from the Backup device
Code:
FireDept Tone Set Found
delay timer FireDept 13:16:22 on 11/16/17

delay done FireDept 13:16:23 on 11/16/17
waiting for audio FireDept 13:16:23 on 11/16/17
threshold value: 181.019335984
mono

threshold exceeded
recording audio FireDept 13:16:23 on 11/16/17
iterations: 400

checking redundant_TTD_1.txt on ftp.domain.net at 13:16:46 on 11/16/17
['Backup TTD\t1510859673.09\n', 'Station\t1510859750.99\n']
found a duplicate for Backup TTD at 1510859673.09
['Backup TTD\t1510859807.37\n', 'Station\t1510859750.99\n']


Waiting for Silence FireDept 13:17:00 on 11/16/17
Done recording FireDept 13:17:00 on 11/16/17

done writing WAV FireDept 13:17:00 on 11/16/17

done converting to MP3 FireDept 13:17:00 on 11/16/17

done converting to AMR FireDept 13:17:02 on 11/16/17

waiting 70 seconds to check remote redundant_tones_1.txt file on ftp.domain.net for FireDept

checking redundant_tones_1.txt on ftp.domain.net for FireDept at 13:18:12 on 11/16/17
sending from backup with delay = 70 at 13:18:13 on 11/16/17
logging in
logged in
MP3 Group Email sent to "Person"<jwr@domain.com>, "Whos"<FireDeptfire@ds1.whosresponding.com> 
logging in
logged in
successfully updated redundant_tones_1.txt on ftp.domain.net with FireDept at 13:18:15 on 11/16/17

Text Group Email sent to "Whos"<FireDeptfire-160301@ds1.whosresponding.com> 
checking redundant_TTD_1.txt on ftp.domain.net at 13:19:01 on 11/16/17
['Backup TTD\t1510859807.37\n', 'Station\t1510859885.91\n']
found a duplicate for Backup TTD at 1510859807.37
['Backup TTD\t1510859941.76\n', 'Station\t1510859885.91\n']
 
Joined
Aug 7, 2012
Messages
4
Audio Boom New Requirements

I run the Northampton County Dispatch page and upgraded my account due to the new rules going into affect. Under the new terms it creates a new account if there's no subject field in email pointing to your Audioboom account. Is there a setting to add a subject to email being sent out?

Jake (audioBoom)
Nov 20, 14:35 WET

HI Dan,

Thanks for getting in touch

In order for boomail to continue to work, you need to add in "@Northampton-County-Pa-Fire-EMS-Dispatch-Audio" to the subject headers of every email that you send.

Let me know when you've changed this in your system and I'll move all the posts over.

Jake
 

ryolsen8

Member
Feed Provider
Joined
May 1, 2011
Messages
482
Location
BEE07
U and P not accepted

Evening Andy,

The main computer ended up crashing, so we had to get a replacement. I copied and pasted the Config and tones files from the old program, and for my Gmail, I have the App password set-up. I re-set that up for the new computer, and figured it would work. I am getting this error, however for all pages. None of them are going through. Any ideas?


Waiting for Silence NorthLand Municipal Ambulance-Frederic 03:49:16 on 11/19/17
Done recording NorthLand Municipal Ambulance-Frederic 03:49:16 on 11/19/17
1021.0 1830.99900807
done writing WAV NorthLand Municipal Ambulance-Frederic 03:49:16 on 11/19/17
ffmpeg not found, sending as WAV file instead of mp3
801.0 1600.12745017
908.0 2000.06340251
logging in
1172.0 1437.38215336
Traceback (most recent call last):
File "TTD.py", line 72, in mail
File "smtplib.py", line 622, in login
SMTPAuthenticationError: (535, '5.7.8 Username and Password not accepted. Learn more at\n5.7.8 https://support.google.com/mail/?p=BadCredentials k19sm4042279itb.18 - gsmtp')
Email not sent via smtp.gmail.com on port 465 using SSL on attempt 1 trying again in five seconds for NorthLand Municipal Ambulance-Frederic page received at 03:48:42 on 11/19/17
1032.0 1600.95750135
720.0 23815.6893138
252.0 13283.504189
295.0 2621.64401887
Traceback (most recent call last):
File "TTD.py", line 36, in mail
ValueError: list.remove(x): x not in list
Email not sent via smtp.gmail.com on port 465 using SSL on attempt 2 trying again in five seconds for NorthLand Municipal Ambulance-Frederic page received at 03:48:42 on 11/19/17
Traceback (most recent call last):
File "TTD.py", line 36, in mail
ValueError: list.remove(x): x not in list
Email not sent via smtp.gmail.com on port 465 using SSL on attempt 3 trying again in five seconds for NorthLand Municipal Ambulance-Frederic page received at 03:48:42 on 11/19/17
max retries exceeded, failed to send email
247.0 1266.4171829
1344.0 970.038254693
1462.0 5626.62987196
483.0 11630.1263013
430.0 11175.552157
387.0 8455.45954345
570.0 16702.5166496
543.0 13722.1569593
489.0 13179.7936014
682.0 14665.1686641
344.0 5890.59347378
365.0 3612.78384038
903.0 1409.96257146
1451.0 1406.69234762
1376.0 1434.48940852
742.0 1516.67188288
1306.0 1293.45049355
1080.0 1741.2285938
414.0 6663.34842589
365.0 7804.73888871
532.0 11172.9695684
1032.0 11172.4569448
634.0 2923.10102898
 

ryolsen8

Member
Feed Provider
Joined
May 1, 2011
Messages
482
Location
BEE07
Issue

That’s just it - I’ve tried that twice now.

Andy-

I did reset up a whole new gmail account, and re-set up the app password. When a run did go out, it did not send. Same issue as before. username and password not accepted.
 

JH49

Member
Joined
Jun 22, 2016
Messages
11
Andy-

I did reset up a whole new gmail account, and re-set up the app password. When a run did go out, it did not send. Same issue as before. username and password not accepted.

64 bit encoded password? I forgot about doing that when I edited the config file with notepad.
 

ryolsen8

Member
Feed Provider
Joined
May 1, 2011
Messages
482
Location
BEE07
64 bit encoded password? I forgot about doing that when I edited the config file with notepad.

The old computer was a 64 bit, and the new one is too. The old one was Windows 7 and this one is 10... Not sure if that would matter in this respect.
 

DC31

Member
Feed Provider
Joined
Feb 19, 2011
Messages
1,547
Location
Massachusetts
The old computer was a 64 bit, and the new one is too. The old one was Windows 7 and this one is 10... Not sure if that would matter in this respect.

He is referring to base 64 coding of your password. Base64decode.org

If you use the Edit Config button in the TTD window, the program does the encoding for you. If you are editting config.cfg with Notepad then you will need to encode the password yourself before entering it in Notepad.

The line starting &#8220;ffmpeg not found&#8221; also shows another error. You don&#8217;t have ffmpeg installed prpoerly on the new computer. Check the instructions on TwoToneDetect.net
 
Last edited:

aaknitt

Member
Feed Provider
Joined
Aug 27, 2005
Messages
1,300
I run the Northampton County Dispatch page and upgraded my account due to the new rules going into affect. Under the new terms it creates a new account if there's no subject field in email pointing to your Audioboom account. Is there a setting to add a subject to email being sent out?

Jake (audioBoom)
Nov 20, 14:35 WET

HI Dan,

Thanks for getting in touch

In order for boomail to continue to work, you need to add in "@Northampton-County-Pa-Fire-EMS-Dispatch-Audio" to the subject headers of every email that you send.

Let me know when you've changed this in your system and I'll move all the posts over.

Jake

I'll look into adding this for v70.

Andy
 

aaknitt

Member
Feed Provider
Joined
Aug 27, 2005
Messages
1,300
I'm having some issues with the redundant feature and I'm not sure why. I'm getting double messages sent.


Code:
[REDUNDANT]
file_access = ftp				;options are 'local' or 'ftp'
tone_tracking_file = redundant_tones_1.txt	;for local, use: c:\path\to\filename.txt
TTD_tracking_file = redundant_TTD_1.txt	;for local, use: c:\path\to\filename.txt
redundant_delay = 0				;number of seconds to wait before checking file after a tone set is found.  For primary TTD, set to 0 
redundant_window = 60				;number of seconds to allow timestamps between two tone sets to be different and still be considered the same tone
redundant_down_alert_time = 400			;number of seconds before the admin will be alerted that an instance of the program is offline
redundant_admin_email = email@address.co		;email address to send notifications to
redundant_instance_alias = Station		;Alias to identify this instance of TTD
FTP INFO HERE

Code:
[REDUNDANT]
file_access = ftp				;options are 'local' or 'ftp'
tone_tracking_file = redundant_tones_1.txt	;for local, use: c:\path\to\filename.txt
TTD_tracking_file = redundant_TTD_1.txt		;for local, use: c:\path\to\filename.txt
redundant_delay = 70				;number of seconds to wait before checking file after a tone set is found.  For primary TTD, set to 0 
redundant_window = 60				;number of seconds to allow timestamps between two tone sets to be different and still be considered the same tone
redundant_down_alert_time = 400			;number of seconds before the admin will be alerted that an instance of the program is offline
redundant_admin_email = email@address.co		;email address to send notifications to
redundant_instance_alias = Backup             ;Alias to identify this instance of TTD
FTP INFO HERE

Clocks are in sync within milliseconds of each other.

Logs from the Backup device
Code:
FireDept Tone Set Found
delay timer FireDept 13:16:22 on 11/16/17

delay done FireDept 13:16:23 on 11/16/17
waiting for audio FireDept 13:16:23 on 11/16/17
threshold value: 181.019335984
mono

threshold exceeded
recording audio FireDept 13:16:23 on 11/16/17
iterations: 400

checking redundant_TTD_1.txt on ftp.domain.net at 13:16:46 on 11/16/17
['Backup TTD\t1510859673.09\n', 'Station\t1510859750.99\n']
found a duplicate for Backup TTD at 1510859673.09
['Backup TTD\t1510859807.37\n', 'Station\t1510859750.99\n']


Waiting for Silence FireDept 13:17:00 on 11/16/17
Done recording FireDept 13:17:00 on 11/16/17

done writing WAV FireDept 13:17:00 on 11/16/17

done converting to MP3 FireDept 13:17:00 on 11/16/17

done converting to AMR FireDept 13:17:02 on 11/16/17

waiting 70 seconds to check remote redundant_tones_1.txt file on ftp.domain.net for FireDept

checking redundant_tones_1.txt on ftp.domain.net for FireDept at 13:18:12 on 11/16/17
sending from backup with delay = 70 at 13:18:13 on 11/16/17
logging in
logged in
MP3 Group Email sent to "Person"<jwr@domain.com>, "Whos"<FireDeptfire@ds1.whosresponding.com> 
logging in
logged in
successfully updated redundant_tones_1.txt on ftp.domain.net with FireDept at 13:18:15 on 11/16/17

Text Group Email sent to "Whos"<FireDeptfire-160301@ds1.whosresponding.com> 
checking redundant_TTD_1.txt on ftp.domain.net at 13:19:01 on 11/16/17
['Backup TTD\t1510859807.37\n', 'Station\t1510859885.91\n']
found a duplicate for Backup TTD at 1510859807.37
['Backup TTD\t1510859941.76\n', 'Station\t1510859885.91\n']

Can you send me your redundant_tones_1.txt file to andy@twotonedetect.net ? After you send it to me, wipe it out from your FTP server and see if that takes care of it. I have a feeling it may have gotten corrupted somehow.

Andy
 

firechuck911

Member
Feed Provider
Joined
Jan 14, 2006
Messages
19
Location
Chester Il
Downloaded version 69 today and AVG is blocking the two tone editor file saying it is a virus. Anyone else having this problem?
 

aaknitt

Member
Feed Provider
Joined
Aug 27, 2005
Messages
1,300
I'm having some issues with the redundant feature and I'm not sure why. I'm getting double messages sent.


Code:
[REDUNDANT]
file_access = ftp				;options are 'local' or 'ftp'
tone_tracking_file = redundant_tones_1.txt	;for local, use: c:\path\to\filename.txt
TTD_tracking_file = redundant_TTD_1.txt	;for local, use: c:\path\to\filename.txt
redundant_delay = 0				;number of seconds to wait before checking file after a tone set is found.  For primary TTD, set to 0 
redundant_window = 60				;number of seconds to allow timestamps between two tone sets to be different and still be considered the same tone
redundant_down_alert_time = 400			;number of seconds before the admin will be alerted that an instance of the program is offline
redundant_admin_email = email@address.co		;email address to send notifications to
redundant_instance_alias = Station		;Alias to identify this instance of TTD
FTP INFO HERE

Code:
[REDUNDANT]
file_access = ftp				;options are 'local' or 'ftp'
tone_tracking_file = redundant_tones_1.txt	;for local, use: c:\path\to\filename.txt
TTD_tracking_file = redundant_TTD_1.txt		;for local, use: c:\path\to\filename.txt
redundant_delay = 70				;number of seconds to wait before checking file after a tone set is found.  For primary TTD, set to 0 
redundant_window = 60				;number of seconds to allow timestamps between two tone sets to be different and still be considered the same tone
redundant_down_alert_time = 400			;number of seconds before the admin will be alerted that an instance of the program is offline
redundant_admin_email = email@address.co		;email address to send notifications to
redundant_instance_alias = Backup             ;Alias to identify this instance of TTD
FTP INFO HERE

Clocks are in sync within milliseconds of each other.

Logs from the Backup device
Code:
FireDept Tone Set Found
delay timer FireDept 13:16:22 on 11/16/17

delay done FireDept 13:16:23 on 11/16/17
waiting for audio FireDept 13:16:23 on 11/16/17
threshold value: 181.019335984
mono

threshold exceeded
recording audio FireDept 13:16:23 on 11/16/17
iterations: 400

checking redundant_TTD_1.txt on ftp.domain.net at 13:16:46 on 11/16/17
['Backup TTD\t1510859673.09\n', 'Station\t1510859750.99\n']
found a duplicate for Backup TTD at 1510859673.09
['Backup TTD\t1510859807.37\n', 'Station\t1510859750.99\n']


Waiting for Silence FireDept 13:17:00 on 11/16/17
Done recording FireDept 13:17:00 on 11/16/17

done writing WAV FireDept 13:17:00 on 11/16/17

done converting to MP3 FireDept 13:17:00 on 11/16/17

done converting to AMR FireDept 13:17:02 on 11/16/17

waiting 70 seconds to check remote redundant_tones_1.txt file on ftp.domain.net for FireDept

checking redundant_tones_1.txt on ftp.domain.net for FireDept at 13:18:12 on 11/16/17
sending from backup with delay = 70 at 13:18:13 on 11/16/17
logging in
logged in
MP3 Group Email sent to "Person"<jwr@domain.com>, "Whos"<FireDeptfire@ds1.whosresponding.com> 
logging in
logged in
successfully updated redundant_tones_1.txt on ftp.domain.net with FireDept at 13:18:15 on 11/16/17

Text Group Email sent to "Whos"<FireDeptfire-160301@ds1.whosresponding.com> 
checking redundant_TTD_1.txt on ftp.domain.net at 13:19:01 on 11/16/17
['Backup TTD\t1510859807.37\n', 'Station\t1510859885.91\n']
found a duplicate for Backup TTD at 1510859807.37
['Backup TTD\t1510859941.76\n', 'Station\t1510859885.91\n']

For future reference, we figured out offline that this was due to ffmpeg not being installed correctly. The redundant feature only updates the tracking file on the FTP server if the mp3 email gets sent successfully. Without ffmpeg, the mp3 file wasn't getting generated and therefore couldn't be sent. The program was sending WAV files, but because the mp3 send failed the FTP file didn't get updated.

Andy
 

ffryan76

Member
Feed Provider
Joined
Nov 28, 2004
Messages
175
Location
South central, In
Using TTD I emailing audio dispatches to audioboom.com then audioboom was sending a post to a Facebook page. Audioboom went monetary. So now I'm looking for a similar way to do this. Anyone have ideas for posting the audio from TTD to Facebook page (not a personal account)?

Sent from my SM-G920V using Tapatalk
 

DC31

Member
Feed Provider
Joined
Feb 19, 2011
Messages
1,547
Location
Massachusetts
Using TTD I emailing audio dispatches to audioboom.com then audioboom was sending a post to a Facebook page. Audioboom went monetary. So now I'm looking for a similar way to do this. Anyone have ideas for posting the audio from TTD to Facebook page (not a personal account)?

Sent from my SM-G920V using Tapatalk

I don’t have any idea if it would work, but have you considered loading the TTD audio file up to an ftp server and then writing a little python script that posts the link to the server file to your FB page or wall? Something similar to the way push notifications work through TTD.

Here is some info that I found:
Python Facebook tutorial - post to Facebook page in 4 steps - nikhil's blog
 

ffryan76

Member
Feed Provider
Joined
Nov 28, 2004
Messages
175
Location
South central, In
I don’t have any idea if it would work, but have you considered loading the TTD audio file up to an ftp server and then writing a little python script that posts the link to the server file to your FB page or wall? Something similar to the way push notifications work through TTD.

Here is some info that I found:
Python Facebook tutorial - post to Facebook page in 4 steps - nikhil's blog
Thanks Jim. I guess the first step is learning how to make a ftp server. What would I use to build the python script?

Is it simpler to build it for Twitter then have Twitter post to Facebook Page?
 

DC31

Member
Feed Provider
Joined
Feb 19, 2011
Messages
1,547
Location
Massachusetts
Thanks Jim. I guess the first step is learning how to make a ftp server. What would I use to build the python script?

Is it simpler to build it for Twitter then have Twitter post to Facebook Page?

I don’t know about the “simpler” part. I am not much of a FB or TW person. There are also instructions to post to Twitter and someone in the Comments section says “Awesomely Simple”. The FB instructions didn’t leave me with that warm and fuzzy feeling...


Python Twitter tutorial - 5 steps to tweet a message from python script - nikhil's blog

Yes, setting up and making an ftp server work is another challenge. Not “simple” but not insurmountable either.
 
Top