RadioReference on Facebook   RadioReference on Twitter   RadioReference Blog
 

Go Back   The RadioReference.com Forums > Computer Aided Monitoring and Programming > Streaming / Broadcasting / Audio Recording


Streaming / Broadcasting / Audio Recording - Interested in putting your scanner online for others to hear? Want to listen to other radios on the internet. This forum is here for you to discuss these topics related to streaming scanners online.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-04-2016, 9:46 PM
nated1992's Avatar
Member
  Audio Feed Provider
Audio Feed Provider
 
Join Date: Feb 2013
Location: Asheville NC
Posts: 160
Lightbulb Two Tone Detect and Batch file - Alert System

Hey i have been playing with two tone detect using a batch file to set off station tones when we receive a call. I wrote a short bat script which plays a audio file then when the record time starts the audio is past threw and i figured out how to rout this threw the computer and to our station amplifier to feed the speakers. With testing it i found it gets really clear sound and allows for configuring specific alert tones such as it announcing engine call on a tone or EMS call for another. I also found i liked it better then the Informer we had.

Has any one had any other use with this..

Im curious to find away to make it control other stuff such as lights or doors...

Thus would have to be software controlled. For apparent reason a relay isn't practical

So who else has used two tone and batch files and what have you came up with?
Reply With Quote
Sponsored links
  #2 (permalink)  
Old 04-05-2016, 8:09 AM
Member
  Audio Feed Provider
Audio Feed Provider
 
Join Date: Feb 2011
Location: Massachusetts
Posts: 985
Default

Quote:
Originally Posted by nated1992 View Post
Hey i have been playing with two tone detect using a batch file to set off station tones when we receive a call. I wrote a short bat script which plays a audio file then when the record time starts the audio is past threw and i figured out how to rout this threw the computer and to our station amplifier to feed the speakers. With testing it i found it gets really clear sound and allows for configuring specific alert tones such as it announcing engine call on a tone or EMS call for another. I also found i liked it better then the Informer we had.

Has any one had any other use with this..

Im curious to find away to make it control other stuff such as lights or doors...

Thus would have to be software controlled. For apparent reason a relay isn't practical

So who else has used two tone and batch files and what have you came up with?
My experience is with the raspberry pi $35 micro computer and python scripts rather than windows. Yes, you can make it do nearly anything that you can think of. You will need a relay that is CONTROLLED by the software. Then use this relay to control lights, open doors, etc. while you are at it you can also set up a web page on the pi that you can access from your smart phone with buttons that allow you to do all these things manually from your phone also.

Do a search on Amazon for sainsmart relay. http://www.amazon.com/SainSmart-2-CH...=sr_1_5&sr=8-5

Be careful with overhead door control. You don't want someone in Over Yonder closing the door as your apparatus is driving through it! One of the most useful applications I can think of would be to control an electric door striker on a personnel door at an unmanned station. Your tones could make the door go unlocked for say 15 minutes upon tone activation. Or you could put a "open button" for your bay door on the outside of the station and wire the relay to make it active only for that 15 minute post-tone window.

I know of another user also putting together a station audio alerting system as you describe, using a pi.
Reply With Quote
  #3 (permalink)  
Old 04-05-2016, 8:14 AM
Member
  Audio Feed Provider
Audio Feed Provider
 
Join Date: Feb 2011
Location: Massachusetts
Posts: 985
Default The basics

Here are the basics:

Raspberry Pi Garage Door Opener
Reply With Quote
  #4 (permalink)  
Old 04-05-2016, 9:31 AM
Member
  Premium Subscriber
Premium Subscriber
Amateur Radio Operator
Amateur Radio
 
Join Date: Jun 2010
Location: Kennebeck County Maine
Posts: 8
Default Paging 2 tones

I build tone alert units for FD and volunteers, I also decode tones.
I have mine trip a gamewell bell for fire and a horn for the rescue / ambulance.
need more info k4stb@aol.com use gamewell in subject line
denis
Reply With Quote
  #5 (permalink)  
Old 04-05-2016, 9:44 AM
nated1992's Avatar
Member
  Audio Feed Provider
Audio Feed Provider
 
Join Date: Feb 2013
Location: Asheville NC
Posts: 160
Default

Quote:
Originally Posted by DC31 View Post
My experience is with the raspberry pi $35 micro computer and python scripts rather than windows. Yes, you can make it do nearly anything that you can think of. You will need a relay that is CONTROLLED by the software. Then use this relay to control lights, open doors, etc. while you are at it you can also set up a web page on the pi that you can access from your smart phone with buttons that allow you to do all these things manually from your phone also.

Do a search on Amazon for sainsmart relay. http://www.amazon.com/SainSmart-2-CH...=sr_1_5&sr=8-5

Be careful with overhead door control. You don't want someone in Over Yonder closing the door as your apparatus is driving through it! One of the most useful applications I can think of would be to control an electric door striker on a personnel door at an unmanned station. Your tones could make the door go unlocked for say 15 minutes upon tone activation. Or you could put a "open button" for your bay door on the outside of the station and wire the relay to make it active only for that 15 minute post-tone window.

I know of another user also putting together a station audio alerting system as you describe, using a pi.
Hey this sounds great i will have to look into it!
Reply With Quote
Sponsored links
  #6 (permalink)  
Old 04-05-2016, 9:54 AM
nated1992's Avatar
Member
  Audio Feed Provider
Audio Feed Provider
 
Join Date: Feb 2013
Location: Asheville NC
Posts: 160
Default

Quote:
Originally Posted by K1STBDENIS View Post
I build tone alert units for FD and volunteers, I also decode tones.
I have mine trip a gamewell bell for fire and a horn for the rescue / ambulance.
need more info k4stb@aol.com use gamewell in subject line
denis
Do you use software to do this our a pager and amplified charger... It sounds like the pager setups i have seen?
Reply With Quote
  #7 (permalink)  
Old 09-02-2016, 5:43 PM
Member
  Premium Subscriber
Premium Subscriber
Amateur Radio Operator
Amateur Radio
 
Join Date: Jan 2015
Posts: 1
Default

I have been working on setting up TwoToneDetect in order to turn on a red LED light to illuminate a room, flash either a Blue, Green, or Red light indicating which tones dropped, and turn the radio on to overhead speakers. I was trying to use the SainSmart relay board, but had nothing but problems. I found using the KMTronic relay board is MUCH easier to right .bat files for. I put the USBRelay.exe on the C drive and uses command line to turn the relays on and off.

I made another .bat file that acts as a failsafe and turns on the radio audio all the time when TwoToneDetect closes or the computer turns off. When TTD is opened, it turns off the failsafe and turns the radio off.
Reply With Quote
  #8 (permalink)  
Old 03-26-2017, 10:07 PM
davidVT's Avatar
Member
  Audio Feed Provider
Audio Feed Provider
 
Join Date: Aug 2010
Location: Washington County,Vermont
Posts: 102
Default Two Tone Detect and Batch file - Alert System

FYI I use MQTT , NODE-RED and inexpensive SONOFF wifi modules for alerting when my wood boiler needs wood or overheats. It works great!

I will soon connect the TTD system to NODE-RED in pursuit of alerting / turning on lights with pages.

I believe NODE-RED comes in the normal raspian OS for Pi and should coexist with TTD for those using TTD on Pi. NODE-RED will connect to the SONOFF wifi switch via your local wifi. You will also have to install a simple MQTT server (mosquito).

One could simply call a URL into NODE-RED from a batch file to trigger a light or other item with just NODE-RED and one of these wifi switches.

https://www.itead.cc/sonoff-wifi-wireless-switch.html

These switches need to have firmware changed to operate with MQTT&NODE-RED ( I prefer ESPEASY). The first time is challenging then quite easy after that. I am using the 4 channel SONOFF versions now. They might work well for having a different relay for different tones.

Once you get into NODE-RED there are a ton of things you can do with that including email, tweeting, etc.


Ah, boiler light just came on, time to go out and feed the beast....

Sent from my iPad using Tapatalk

Last edited by davidVT; 03-26-2017 at 10:35 PM..
Reply With Quote
  #9 (permalink)  
Old 03-26-2017, 10:39 PM
nated1992's Avatar
Member
  Audio Feed Provider
Audio Feed Provider
 
Join Date: Feb 2013
Location: Asheville NC
Posts: 160
Default

Quote:
Originally Posted by davidVT View Post
FYI I use MQTT , NODE-RED and inexpensive SONOFF wifi modules for alerting when my wood boiler needs wood or overheats. It works great!

I will soon connect the TTD system to NODE-RED in pursuit of alerting / turning on lights with pages.

I believe NODE-RED comes in the normal raspian OS for Pi and should coexist with TTD for those using TTD on Pi. NODE-RED will connect to the SONOFF wifi switch via your local wifi. You will also have to install a simple MQTT server (mosquito).

One could simply call a URL into NODE-RED from a batch file to trigger a light or other item with just NODE-RED and one of these wifi switches.

https://www.itead.cc/sonoff-wifi-wireless-switch.html

These switches need to have firmware changed to operate with MQTT&NODE-RED ( I prefer ESPEASY). The first time is challenging then quite easy after that. I am using the 4 channel SONOFF versions now. They might work well for having a different relay for different tones.

Once you get into NODE-RED there are a ton of things you can do with that including email, tweeting, etc.


Ah, boiler light just came on, time to go out and feed the beast....

Sent from my iPad using Tapatalk
I will have to look into this I've been doing a lot with it and have came up with a pretty good system
Reply With Quote
  #10 (permalink)  
Old 03-26-2017, 10:42 PM
Member
  Audio Feed Provider
Audio Feed Provider
 
Join Date: Feb 2011
Location: Massachusetts
Posts: 985
Default

Quote:
Originally Posted by davidVT View Post
FYI I use MQTT , NODE-RED and inexpensive SONOFF wifi modules for alerting when my wood boiler needs wood or overheats. It works great!

I will soon connect the TTD system to NODE-RED in pursuit of alerting / turning on lights with pages.
I believe NODE-RED comes in the normal raspian OS for Pi and should coexist with TTD for those using TTD on Pi. NODE-RED will connect to the SONOFF wifi switch via your local wifi.

One could simply call a URL into NODE-RED from a batch file to trigger a light or other item with just NODE-RED and one of these wifi switches.

https://www.itead.cc/sonoff-wifi-wireless-switch.html

These switches need to have firmware changed to operate with NODE-RED. The first time is challenging then quite easy after that. I am using the 4 channel SONOFF versions now. They might work well for having a different relay for different tones.

Once you get into NODE-RED there are a ton of things you can do with that including email, tweeting, etc.


Ah, boiler light just came on, time to go out and feed the beast....

Sent from my iPad using Tapatalk
Interesting. Are you controlling your wifi switches locally, or is that being done through a remote server as outlined on the Sonoff pages?

I have my domestic hot water heated by my wood boiler using a dedicated circulator pump and heat exchanger. A pi monitors top and bottom temperatures in the hot water tank and controls the circulator through Cayenne (mydevices.com). I have found their server a little unreliable so have also hard coded a high temp limit directly into the pi as a backup to the Cayenne control. Curious as to how reliable you have found the sonoff server, if your setup uses it.

I have had no trouble controlling a SainSmart relay with my pi.
Reply With Quote
  #11 (permalink)  
Old 03-26-2017, 11:50 PM
davidVT's Avatar
Member
  Audio Feed Provider
Audio Feed Provider
 
Join Date: Aug 2010
Location: Washington County,Vermont
Posts: 102
Default Two Tone Detect and Batch file - Alert System

I like the Sainsmart relay idea. I need some switches for low power switching and those might work well. I am moving away from Pi towards esp8266 for wifi hardware control. Will see if these relays will work on the slightly lower voltage.

The SONOFF are only switching mains voltage so 110vac in most cases here but ok in Europe also.

The SONOFF server is replaced with a local MQTT server and NODE-RED which both can easily run on the Pi. My MQTT is on a virtual Debian box. The SONOFF needs to have it's firmware flashed to use the above for which there are many options. I use EASYESP which does what I need. What I like about EASYESP is that it has local rules. Example you could connect a temp sensor to the SONOFF and use that SONOFF to not only do the communication to your local server but also program a fail safe temperature to power the circulator on it's own. Of course a mechanical thermal snap switch or aquastat could do that also but what is the fun in that?

My 4 relay SONOFF also now has a RJ45 jack to support a string of one wire temperature sensors.

So, sensors feed MQTT server which feeds NODE-RED. NR evaluates the temp data and makes decisions to alert us by turning on SONOFF switches with lights attached.
The setup is IOT so house lights are on sunset timers etc.
I can log into the house from anywhere and check on things.
IFTTT can see my phone when I get home so to automatically turn lights on via a URL to NODe-RED if needed..

Some good YouTube stuff on the SONOFF mods.

UPDATE:
For just turning on a light, you can skip most of the above.
Use EASYESP firmware update on SONOFF and command the unit directly via a URL from TTD batch file.
Example: (the IP is one of the Sonoff's at my home)
http://192.168.0.183/control?cmd=GPIO,12,1
Turns relay on
http://192.168.0.183/control?cmd=GPIO,12,0
Turns relay off
(Or perhaps use the local rules for a timer to turn it off)

So on my TTD Pi I made a script (lighton.sh) and did chmod +x and ran if from the command line successfully. The SONOFF connected light came on!!
----lighton.sh---
content=$(wget http://192.168.0.183/control?cmd=GPIO,12,1)
echo $content
-----------------
Can someone help me with my TTD Pi for exactly how to put this script in tones.cfg and where the script needs to live so I can finish the test??


Remember with the MQTT server and NODE-RED you can control countless of these SONOFFs all over a house (or fire house) and make complicated rules for them etc etc


Sent from my iPad using Tapatalk

Last edited by davidVT; 03-27-2017 at 1:45 AM..
Reply With Quote
  #12 (permalink)  
Old 03-27-2017, 12:26 PM
Member
  Audio Feed Provider
Audio Feed Provider
 
Join Date: Feb 2011
Location: Massachusetts
Posts: 985
Default

Quote:
Originally Posted by davidVT View Post
I



So on my TTD Pi I made a script (lighton.sh) and did chmod +x and ran if from the command line successfully. The SONOFF connected light came on!!
----lighton.sh---
content=$(wget http://192.168.0.183/control?cmd=GPIO,12,1)
echo $content
-----------------
Can someone help me with my TTD Pi for exactly how to put this script in tones.cfg and where the script needs to live so I can finish the test??

From TwoToneDetect.net:

Version 51 Release Notes:
Added two optional parameters that can be added to each tone set in the tones.cfg file:
alert_command this is a command line that will be executed immediately upon detection of a valid tone set
post_email_command this is a command line that will be executed after a valid tone set has been detected and emails have been sent
The program will now re-read the email information from the tones.cfg file each time a valid tone set is detected. Note that it does NOT reread all info from the tones.cfg file, only the email info

So, add another line in your [ToneX] section: alert_command = lighton.sh

Your lighton.sh script needs to be in the same directory as your TTD program file.

I think that will work, the ones that i have used are python scripts and i use alert_command = python XXX.py

Jim
Reply With Quote
  #13 (permalink)  
Old 03-27-2017, 5:37 PM
davidVT's Avatar
Member
  Audio Feed Provider
Audio Feed Provider
 
Join Date: Aug 2010
Location: Washington County,Vermont
Posts: 102
Default

Thank you JIm. Now the wait for a test tone tonight!


Sent from my iPad using Tapatalk
Reply With Quote
  #14 (permalink)  
Old 03-27-2017, 6:29 PM
davidVT's Avatar
Member
  Audio Feed Provider
Audio Feed Provider
 
Join Date: Aug 2010
Location: Washington County,Vermont
Posts: 102
Default



Four channel din mount SONOFF all set for test tones. 3 of the 4 relay/LED combos are set to my three important tone sets. Just using the alert command script in TTD. Fingers crossed.

Currently the relay will simply be reset by the button on the unit. A timer can be implemented locally to reset but no time to do that for now.


Sent from my iPhone using Tapatalk
Reply With Quote
  #15 (permalink)  
Old 07-12-2018, 1:33 AM
davidVT's Avatar
Member
  Audio Feed Provider
Audio Feed Provider
 
Join Date: Aug 2010
Location: Washington County,Vermont
Posts: 102
Default

Just an interesting update:
There are new sonoff 'pro' 4 channel units with dry contacts rather than line powered contacts. That creates new options for using the sonoff with TTD for signaling and perhaps audio switching (ymmv).

https://www.itead.cc/sonoff-4ch-pro.html




Sent from my iPad using Tapatalk
Reply With Quote
  #16 (permalink)  
Old 08-07-2018, 11:55 AM
nated1992's Avatar
Member
  Audio Feed Provider
Audio Feed Provider
 
Join Date: Feb 2013
Location: Asheville NC
Posts: 160
Default

Quote:
Originally Posted by davidVT View Post
Just an interesting update:
There are new sonoff 'pro' 4 channel units with dry contacts rather than line powered contacts. That creates new options for using the sonoff with TTD for signaling and perhaps audio switching (ymmv).

https://www.itead.cc/sonoff-4ch-pro.html




Sent from my iPad using Tapatalk
I actually have a extremely stable version of this working on both Linux and Windows. The windows version uses USB Relays and the Linux uses the Pi GPIO pins.

I have a contract with The Maker of TTD to resale it as a whole unit, Or i sell just the pi and scripts with instructions on how to use it with TTD "Usually its easier to sale the whole unit If i would actually sell any" I hope to add more features to the scripts but currently...
Will do all the features of the TTD Software.
Will turn on relay boards USB or GPIO "I like the Pi version better"
Will sound an alert tone before playing the audio can do a different sound to each separate tone set "alternatively the audio can be constantly passed through to always here the scanner/radio"
The audio can be set to play for different duration 1 to whatever seconds
The relays can be set to time out or stay on until a rest is pressed.

I am sending a message today to see if i can get a editable version to the GUI to change and add some options for my scripts.
Reply With Quote
Reply

Tags
batch, detect, file, tone

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 12:21 AM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
All information here is Copyright 2012 by RadioReference.com LLC and Lindsay C. Blanton III.Ad Management by RedTyger
Copyright 2015 by RadioReference.com LLC Privacy Policy  |  Terms and Conditions