TwoToneDetect New TwoToneDetect in the works - Python based

ajalbarano

Member
Joined
Sep 26, 2009
Messages
63
Location
Duncansville, PA
Hmmm...No, I haven't seen that before. I've been running Pushbullet notifications from a Pi for a month or two now with no issues. Keep me posted.



Andy



Andy,

Wanted to let you know I reset my computer, talked to some people and am still baffled, as it randomly continues to occasionally pop that error up with different stations that worked before and after the error dispatch. And it uploads to twitter consistently. So do you think this is on Pushbullet’s end?


Sent from my iPhone using Tapatalk
 

ajalbarano

Member
Joined
Sep 26, 2009
Messages
63
Location
Duncansville, PA
Hmmm...No, I haven't seen that before. I've been running Pushbullet notifications from a Pi for a month or two now with no issues. Keep me posted.



Andy



Andy,

Sorry, just thought of something. The one u run, is it only uploading to pushbullet? Mine also emails to twitter and uploads there. Could they be interfering with each other? I could run another instance to just pushbullet if you think this is the possible problem.


Sent from my iPhone using Tapatalk
 

DC31

Member
Feed Provider
Joined
Feb 19, 2011
Messages
1,585
Location
Massachusetts
Last edited:

webstar22

RenfrewCountyScanner.com
Premium Subscriber
Joined
Dec 21, 2003
Messages
1,037
Location
Ontario, Canada
Something like this? I like your idea. Okay if I steal it?

I am doing it from a raspberry pi with the twitter upload using:

https://pypi.python.org/pypi/twitter#downloads

Yeah just like that. Yep you can use that.

From what I am reading it shouldn't be too hard to get TTD to do it but it's if Andy wants to do it.

I got my Phillps Hue Bulbs changing colours now based on the page type as well.
 

DC31

Member
Feed Provider
Joined
Feb 19, 2011
Messages
1,585
Location
Massachusetts
Yeah just like that. Yep you can use that.

From what I am reading it shouldn't be too hard to get TTD to do it but it's if Andy wants to do it.

I got my Phillps Hue Bulbs changing colours now based on the page type as well.

I am launching the twitter update from the post_email_command line. It doesn’t involve any changes to Andy’s basic TTD program. The python script that the command line launches is attached. If you can run a pyhton script from your TTD installation you should be able to figure it out. The most tedious part is getting the Oauth credentials figured out.
 

Attachments

  • D250F8A5-8A46-4BE8-BDC9-A2843B914946.jpg
    D250F8A5-8A46-4BE8-BDC9-A2843B914946.jpg
    48.6 KB · Views: 182

webstar22

RenfrewCountyScanner.com
Premium Subscriber
Joined
Dec 21, 2003
Messages
1,037
Location
Ontario, Canada
I got Python installed on my windows machine you think your script once I change the Oauth stuff would work? Could you attach your script as a .txt?
 

aaknitt

Member
Feed Provider
Joined
Aug 27, 2005
Messages
1,305
Andy,

Sorry, just thought of something. The one u run, is it only uploading to pushbullet? Mine also emails to twitter and uploads there. Could they be interfering with each other? I could run another instance to just pushbullet if you think this is the possible problem.


Sent from my iPhone using Tapatalk

Mine is doing Pushover, Pushbullet, and both text and audio emails all from within TTD...no external scripts.

Andy
 

webstar22

RenfrewCountyScanner.com
Premium Subscriber
Joined
Dec 21, 2003
Messages
1,037
Location
Ontario, Canada
Today my TTD v70 started recording for the full 60 seconds even after there is no audio.

I have this set release_time=5.0 ;amount of silence (in seconds) required before recording will stop (max=60 seconds) but it seems to be ignoring it.



Logs from a test.


Successfully retrieved local tone info at 16:47:54 on 12/23/17
Successfully retrieved local tone info at 16:47:54 on 12/23/17
Tone11
Tone16
Tone17
Tone18
Tone19
Tone21
Tone22
Tone23
Tone24
Tone25
Tone26
Tone27
Tone28
Tone29
Tone30
Tone31
Successfully retrieved local tone info at 16:47:54 on 12/23/17
1500.0 2206.63144364
1500.0 3719.88345231
1500.0 3929.68078799
1500.0 5475.25610084
1500.0 4406.46215293
1500.0 4368.60001267
1995.0 3528.92511449
1995.0 3393.90990605
1995.0 3500.04294237
1995.0 3640.67304052
1995.0 3790.6153428
1995.0 4326.53476971
1995.0 4096.53678364
1995.0 3982.23080001
1995.0 4340.15109692
1995.0 4406.22105373
1995.0 4729.69032459
1995.0 4979.79556237
1995.0 4974.33073298
1995.0 5148.67044594
1995.0 5001.01578389
TEST PAGES INTERNAL Tone Set Found

0
before record
delay timer TEST PAGES INTERNAL 16:48:04 on 12/23/17
1995.0 5128.39685725
0
delay done TEST PAGES INTERNAL 16:48:05 on 12/23/17
waiting for audio TEST PAGES INTERNAL 16:48:05 on 12/23/17
threshold value: 512.0
mono
2005.0 1836.00617761
mono
mono
mono
mono
2237.0 1731.32723925
threshold exceeded
recording audio TEST PAGES INTERNAL 16:48:05 on 12/23/17
iterations: 20
322.0 945.937057077
317.0 417.557580608
704.0 995.822828748
478.0 885.278504403
505.0 1307.30622953
1973.0 285.736331251
2032.0 10333.0557657
Waiting for Silence TEST PAGES INTERNAL 16:48:07 on 12/23/17
Done recording TEST PAGES INTERNAL 16:49:03 on 12/23/17
done writing WAV TEST PAGES INTERNAL 16:49:03 on 12/23/17
done converting to MP3 TEST PAGES INTERNAL 16:49:03 on 12/23/17
done converting to AMR TEST PAGES INTERNAL 16:49:04 on 12/23/17
setting mail server up
set up mail server
starting TLS
done starting TLS
logging in
logged in
 
Last edited:

DC31

Member
Feed Provider
Joined
Feb 19, 2011
Messages
1,585
Location
Massachusetts
I got Python installed on my windows machine you think your script once I change the Oauth stuff would work? Could you attach your script as a .txt?

First, see if you can install the twitter package. Then, see if you can run twitter to get an OAuth token and OAuth secret. You are going to need that stuff before my script will help you at all.
 

webstar22

RenfrewCountyScanner.com
Premium Subscriber
Joined
Dec 21, 2003
Messages
1,037
Location
Ontario, Canada
Step one worked. C:\>pip install twitter
Collecting twitter
Downloading twitter-1.18.0-py2.py3-none-any.whl (54kB)
100% |████████████████████████████████| 61kB 426kB/s
Installing collected packages: twitter
Successfully installed twitter-1.18.0

C:\>
 

jhsands

Member
Feed Provider
Joined
Sep 6, 2006
Messages
557
Location
Texarkana, Arkansas
I did some calculations for those that have expressed concern about PushBullet's 2GB limit. The mean size for twenty of my dispatch MP3's over a month was 65.43 KB. That gives you enough space for 30,000+ MP3's. I used 2,000,000 KB as 2 GB and didn't employ the 1,000 vs 1,024 bytes or other factors.

Let me know if you can use up that much space...
 

webstar22

RenfrewCountyScanner.com
Premium Subscriber
Joined
Dec 21, 2003
Messages
1,037
Location
Ontario, Canada
So I rebooted my windows 7 machine that does my streaming and now TTD gives me this. All the sound cards are there as they were before the reboot.


EXCEPTION

Successfully retrieved local tone info at 17:05:44 on 12/30/17
Successfully retrieved local tone info at 17:05:44 on 12/30/17
Tone11
Tone16
Tone17
Tone18
Tone19
Tone21
Tone22
Tone23
Tone24
Tone25
Tone26
Tone27
Tone28
Tone29
Tone30
Tone31
Successfully retrieved local tone info at 17:05:44 on 12/30/17
Traceback (most recent call last):
File "TwoToneDetect70.py", line 1006, in <module>
File "site-packages\pyaudio.py", line 747, in open
IOError: [Errno Device unavailable] -9985

I have Python 3 installed on the machine for other stuff could there be issues with that?
 

aaknitt

Member
Feed Provider
Joined
Aug 27, 2005
Messages
1,305
So I rebooted my windows 7 machine that does my streaming and now TTD gives me this. All the sound cards are there as they were before the reboot.


EXCEPTION

Successfully retrieved local tone info at 17:05:44 on 12/30/17
Successfully retrieved local tone info at 17:05:44 on 12/30/17
Tone11
Tone16
Tone17
Tone18
Tone19
Tone21
Tone22
Tone23
Tone24
Tone25
Tone26
Tone27
Tone28
Tone29
Tone30
Tone31
Successfully retrieved local tone info at 17:05:44 on 12/30/17
Traceback (most recent call last):
File "TwoToneDetect70.py", line 1006, in <module>
File "site-packages\pyaudio.py", line 747, in open
IOError: [Errno Device unavailable] -9985

I have Python 3 installed on the machine for other stuff could there be issues with that?

I'm wondering if the sound card indexes got changed by the system during reboot. I'd suggest manually editing your config.cfg file to set the record and playback device indexes both to 0, restart TTD, manually select the intended sound card again via the GUI, and then restart TTD again.

Andy
 

webstar22

RenfrewCountyScanner.com
Premium Subscriber
Joined
Dec 21, 2003
Messages
1,037
Location
Ontario, Canada
Ahh that was it. I tried to change them to 1 before I posted I didn't think 0 was valid but it worked.
 

nosoup4u

Member
Feed Provider
Joined
Jan 30, 2002
Messages
2,201
Location
High Bridge, NJ
For those of you who got this running on the newest Pi, is this line still needed in the cmdline.txt file?

dwc_otg.speed=1
 

DC31

Member
Feed Provider
Joined
Feb 19, 2011
Messages
1,585
Location
Massachusetts
I have had TTD70 running on a pi3 for a month or two now. I don't have that line in my file:

cat cmdline.txt
dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=PARTUUID=16250288-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles
 
Top