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
  #741 (permalink)  
Old 03-31-2018, 4:44 PM
Member
  Audio Feed Provider
Audio Feed Provider
 
Join Date: Feb 2011
Location: Massachusetts
Posts: 967
Default

Quote:
Originally Posted by tdpearce View Post
it seems I may need to run this x-terminal-emulator, perhaps?
I am afraid that you are already over my head on this, Tom! I haven’t yet figured out how to make the executable version of TTD autostart.

One thing that I would suggest you try is to insert a delay of say 10 sec. into your Exec= line for TTD. Give PAVu a chance to get fully loaded.
Reply With Quote
Sponsored links
  #742 (permalink)  
Old 04-01-2018, 8:27 AM
Member
   
Join Date: Feb 2008
Posts: 8
Default

Lol and that is over my head.....any idea how to insert a delay into that?

As far as the auto start procedure, I used this link to get it to run:

https://www.raspberrypi.org/forums/v...ic.php?t=66206

Just in case you wanted to take a look at it.
Reply With Quote
  #743 (permalink)  
Old 04-01-2018, 8:40 AM
Member
  Audio Feed Provider
Audio Feed Provider
 
Join Date: Feb 2011
Location: Massachusetts
Posts: 967
Default

Here is one of my Exec= lines that starts with a 10 sec delay:

Exec=/bin/sh -c "sleep 10; cd /home/pi/TTD ;
Reply With Quote
  #744 (permalink)  
Old 04-01-2018, 2:09 PM
Member
   
Join Date: Feb 2008
Posts: 8
Default

Well I have changed how this autostarts by adding command lines to the the /home/pi/.config/lxsession/LXDE-pi/autostart file:

@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi
@xscreensaver -no-splash
@point-rpi
@sh /home/pi/myapp_startpulse.sh
@sh /home/pi/myapp_startTTD.sh

*******
myapp_startpulse.sh
*******
#!/usr/bin/sh
sleep 15
sudo /usr/bin/pavucontrol

***********
myapp_startTTD.sh
***********
#!/usr/bin/sh
sleep 30
sudo /home/pi/TTD/TwoToneDetect70

Both programs start after the expected delays, but I still have the same results. Both appear like they are working, but do not recognize my test tones but will recognize my test tones if I close them and restart them.
Reply With Quote
  #745 (permalink)  
Old 04-01-2018, 5:30 PM
Member
   
Join Date: Feb 2008
Posts: 8
Default Success!

Not sure why it's like this, but I noticed there are tones.cfg and config.cfg files located in the /home/pi/ directory as well as the /home/pi/TTD directory. Copied the 2 files that I had edited in /home/pi/TTD to /home/pi and it works perfectly now with both programs auto-starting.

Thanks for the help!
Reply With Quote
Sponsored links
  #746 (permalink)  
Old 04-03-2018, 12:35 PM
SOUTH300's Avatar
Member
  Audio Feed Provider
Audio Feed Provider
Amateur Radio Operator
Amateur Radio
 
Join Date: Jun 2002
Location: Carencro, LA
Posts: 215
Default Using TwoToneDetect simply to activate LED's

Has anyone used TwoToneDetect for this purpose? Everything that I have researched indicates that what I am trying to do is possible, but wanted to put it here to see if I will run into any issues.

I am building a box, that will house several LED lights. I will use TTD on a Raspberry Pi as indicated in this thread. I will not be using the email feature, nor am I planning to have any network/internet connection to the box. Whenever a valid tone set is recieved, I would like to use the Alert Command feature to run a python script to activate an LED light. The Raspberry Pi would need to run headless, and I am thinking of putting a reset switch on the box, to reboot the Pi should any trouble arise without having to connect a keyboard/monitor to troubleshoot. I have been able to find all necessary information to get everything running, but do any of you see any issues that may present itself with this setup? Here is my ultimate goal. However, if need be I can seperate the project and use two Pi's.

(1) Raspberry Pi, 2 sound cards, two instances of TTD running on the Pi headless. Activating a total of 14 LED's. Seven LEDs controlled by one instance/sound card, and Seven by the other.

OR if I run into issues:

(1) Raspberry Pi, One Sound Card, TTD, 7 LEDs
(1) Raspberry Pi, One Sound Card, TTD, 7 LEDs

Ideas?

Thanks
Oren
Reply With Quote
  #747 (permalink)  
Old 04-03-2018, 2:24 PM
Member
  Audio Feed Provider
Audio Feed Provider
 
Join Date: Feb 2011
Location: Massachusetts
Posts: 967
Default

Yes, what you are describing is all doable with one raspberry pi. You will need Andy’s instructions (twotonedetect.net) on how to source the two sound cards individually for the two instances of TTD. You really have no internet where this is going? Lots easier to manage headless with an internet connection.

As far as your reset button, just unplug it to power cycle it.

Try connecting to it using a direct ethernet connection to a laptop. Again, lots easier than hooking up monitor/keyboard.

You will need 14 addressable gpio pins on the pi, but I think that shouldn’t be a problem.

The raspberry pi OS now comes with node-red installed. You might want to research its capabilities as a means of controlling LEDs as well as just about anything else you can think of. nodered.org
Reply With Quote
  #748 (permalink)  
Old 04-03-2018, 2:54 PM
SOUTH300's Avatar
Member
  Audio Feed Provider
Audio Feed Provider
Amateur Radio Operator
Amateur Radio
 
Join Date: Jun 2002
Location: Carencro, LA
Posts: 215
Default

Thank you for the reply. I do have internet where this will be going, but i am not sure how much red tape I will need to negotiate to plug the Pi into their network. I agree it will be easier, I was just making sure TTD will in fact operate without an internet connection in case I have to go that route. And that it will operate with out sending emails.

Do you have experience with node-red? I browsed the documentation, and it looks like it is very versatile. I suppose it will create the batch script for me, in order to activate it with TTD, and keep me from having to write multiple scripts?

One other hurdle I need to cross, is to have some sort of indication that all is working and powered up. I was thinking of a simple power LED, but with Node-Red, I may be able to use an RGB led, and have it progress through power, booting, and standby conditions. Need something to let the end user know that it is at least on. Would be nice if it could check the status of TTD and verifiy that it is loaded and standing by. Or, possibly an OLED that I can program to display status messages.

Any ideas?

Thanks for your responses.
Oren
Reply With Quote
  #749 (permalink)  
Old 04-03-2018, 3:54 PM
Member
  Audio Feed Provider
Audio Feed Provider
 
Join Date: Feb 2011
Location: Massachusetts
Posts: 967
Default

Quote:
Originally Posted by SOUTH300 View Post
Thank you for the reply. I do have internet where this will be going, but i am not sure how much red tape I will need to negotiate to plug the Pi into their network. I agree it will be easier, I was just making sure TTD will in fact operate without an internet connection in case I have to go that route. And that it will operate with out sending emails.

Do you have experience with node-red? I browsed the documentation, and it looks like it is very versatile. I suppose it will create the batch script for me, in order to activate it with TTD, and keep me from having to write multiple scripts?

One other hurdle I need to cross, is to have some sort of indication that all is working and powered up. I was thinking of a simple power LED, but with Node-Red, I may be able to use an RGB led, and have it progress through power, booting, and standby conditions. Need something to let the end user know that it is at least on. Would be nice if it could check the status of TTD and verifiy that it is loaded and standing by. Or, possibly an OLED that I can program to display status messages.

Any ideas?

Thanks for your responses.
Oren
Yes, I can confirm that TTD will operate without internet and without sending emails.. i had one simply set up to sound a buzzer when it decoded a tone set.

I am a novice with node-red, having learned by playing with it. You might be able to avoid a bunch of coding by having TTD send the tone set description to node red and then use node red to parse that to determine which LED to turn on. I believe that node-red can somehow also monitor that your pi is live and well.

IF you can get the pi internet connection, then set up RealVNC on the pi. My experience has been that with realvnc set up, i can move the pi to another location, plug into ethernet or wifi and access the pi remotely without the network admin allowing me any special privileges. Realvnc comes installed on the pi and is free for up to five pi’s.

For starters, here is a sample python script that starts a flow in node red when a tone set is detected:

import urllib2
response = urllib2.urlopen('http://localhost:1880/start/')
html = response.read()

I realize that it probably doesn’t mean much to you at this point. It doesn’t mean much to me either. The script is named something like script.py and is launched by alert_command=python script.py. That communicates to an “http in” node on node red and triggers the flow. As the attached image shows, the flow triggers a high priority alert through pushover.
Attached Images
 
Reply With Quote
  #750 (permalink)  
Old 04-03-2018, 4:19 PM
SOUTH300's Avatar
Member
  Audio Feed Provider
Audio Feed Provider
Amateur Radio Operator
Amateur Radio
 
Join Date: Jun 2002
Location: Carencro, LA
Posts: 215
Default

Okay, that helps alot. I appreciate all the info!

Oren
Reply With Quote
  #751 (permalink)  
Old 04-04-2018, 1:42 AM
krokus's Avatar
Member
  Premium Subscriber
Premium Subscriber
 
Join Date: Jun 2006
Location: Southeastern Michigan
Posts: 3,360
Default

Quote:
Originally Posted by SOUTH300 View Post
Has anyone used TwoToneDetect for this purpose? Everything that I have researched indicates that what I am trying to do is possible, but wanted to put it here to see if I will run into any issues.

I am building a box, that will house several LED lights. I will use TTD on a Raspberry Pi as indicated in this thread. I will not be using the email feature, nor am I planning to have any network/internet connection to the box. Whenever a valid tone set is recieved, I would like to use the Alert Command feature to run a python script to activate an LED light. The Raspberry Pi would need to run headless, and I am thinking of putting a reset switch on the box, to reboot the Pi should any trouble arise without having to connect a keyboard/monitor to troubleshoot. I have been able to find all necessary information to get everything running, but do any of you see any issues that may present itself with this setup? Here is my ultimate goal. However, if need be I can seperate the project and use two Pi's.

(1) Raspberry Pi, 2 sound cards, two instances of TTD running on the Pi headless. Activating a total of 14 LED's. Seven LEDs controlled by one instance/sound card, and Seven by the other.

OR if I run into issues:

(1) Raspberry Pi, One Sound Card, TTD, 7 LEDs
(1) Raspberry Pi, One Sound Card, TTD, 7 LEDs

Ideas?

Thanks
Oren
A Minitor, G1, G4, G5, or RE729, will turn on a circuit, when used with a base. It is much simpler to set up, unless you are doing this as an exercise.

Sent using Tapatalk
__________________
Generic radio geek, in southeast Michigan.
PSR-500, TM-742, TM-V71,TH-78, HTX-420, IC-2AT, IC-2E (clone), Pro-39, BC-235XLT, TK-290, XTS-5000
Reply With Quote
  #752 (permalink)  
Old 04-05-2018, 9:32 PM
davidVT's Avatar
Member
  Audio Feed Provider
Audio Feed Provider
 
Join Date: Aug 2010
Location: Washington County,Vermont
Posts: 102
Default

Quote:
Originally Posted by SOUTH300 View Post
Thank you for the reply. I do have internet where this will be going, but i am not sure how much red tape I will need to negotiate to plug the Pi into their network. I agree it will be easier, I was just making sure TTD will in fact operate without an internet connection in case I have to go that route. And that it will operate with out sending emails.



Do you have experience with node-red? I browsed the documentation, and it looks like it is very versatile. I suppose it will create the batch script for me, in order to activate it with TTD, and keep me from having to write multiple scripts?



One other hurdle I need to cross, is to have some sort of indication that all is working and powered up. I was thinking of a simple power LED, but with Node-Red, I may be able to use an RGB led, and have it progress through power, booting, and standby conditions. Need something to let the end user know that it is at least on. Would be nice if it could check the status of TTD and verifiy that it is loaded and standing by. Or, possibly an OLED that I can program to display status messages.



Any ideas?



Thanks for your responses.

Oren


I am assuming you want to identify 14 unique code sets to these 14 LEDs?
Can you use a sequence rather than unique LEDs? Example 0001, 0010, 0011, etc? Would decrease the number of LEDs and GPIOs for example.
In my case I would use a 4 channel sonoff and nodered. (I already do this for a 3 code set of the services I run on. )
That can give you 16 unique signals with 4 channels.
I see no reason you can not run without internet once this is up and running. The sonoff will talk wifi and I believe you can connect the wifi Pi3 on a closed wifi network if that is within your project rules.
The headless running and reliability is fairly well documented.
One Pi, one 4ch sonoff which will control 4 AC circuits.
YMMV
Good luck


Sent from my iPhone using Tapatalk
Reply With Quote
  #753 (permalink)  
Old 04-06-2018, 4:19 AM
Member
  Audio Feed Provider
Audio Feed Provider
 
Join Date: Feb 2011
Location: Massachusetts
Posts: 967
Default

davidVT, you are always coming up with good ideas! So, you mad3 me start thinking sbout this project again. With 14 tone sets, it is going to be hard to remember which set goes with code 1011 (or was that 1101) or which color LED. How about using a mini LCD display to show the text that TTD has in the tone set description? I don’t have any experience with these but the process seems pretty well documented:

https://www.raspberrypi-spy.co.uk/20...-using-python/
Reply With Quote
  #754 (permalink)  
Old 04-07-2018, 7:07 AM
davidVT's Avatar
Member
  Audio Feed Provider
Audio Feed Provider
 
Join Date: Aug 2010
Location: Washington County,Vermont
Posts: 102
Default TwoToneDetect on a Raspberry Pi - How To

Quote:
Originally Posted by DC31 View Post
davidVT, you are always coming up with good ideas! So, you mad3 me start thinking sbout this project again. With 14 tone sets, it is going to be hard to remember which set goes with code 1011 (or was that 1101) or which color LED. How about using a mini LCD display to show the text that TTD has in the tone set description? I don’t have any experience with these but the process seems pretty well documented:

https://www.raspberrypi-spy.co.uk/20...-using-python/


DC31
Getting time to play this year has been a struggle....
That link will not open for me.

I do see South300 mentioned OLED as a possibility.

Thinking the built-in NodeRed, a small LED/OLED display and the gpio LEDs probably meet all the needs unless I miss something.

Need to dig into what the 14 LEDs are trying to do a little. Doing a rewind, what is the desired objective for these 14 signals?

For my Node-Red 'http in', I use TTD to call a URL of the nodered server (can be same box) /TTDbridge with a tone name via a script called from TTD alert:



Node-Red will parse that and send unique output to MQTT for distribution to my Sonoff 4 channel to turn on an AC circuit telling me which department was toned. In this case the output can go to GPIO pins rather than the mqtt and sonoff complexity.


Sent from my iPad using Tapatalk

Last edited by davidVT; 04-07-2018 at 8:01 AM..
Reply With Quote
  #755 (permalink)  
Old 04-07-2018, 9:57 AM
Member
  Audio Feed Provider
Audio Feed Provider
 
Join Date: Feb 2011
Location: Massachusetts
Posts: 967
Default

Quote:
Originally Posted by davidVT View Post
DC31
Getting time to play this year has been a struggle....
That link will not open for me.

I do see South300 mentioned OLED as a possibility.

Thinking the built-in NodeRed, a small LED/OLED display and the gpio LEDs probably meet all the needs unless I miss something.

Need to dig into what the 14 LEDs are trying to do a little. Doing a rewind, what is the desired objective for these 14 signals?

For my Node-Red 'http in', I use TTD to call a URL of the nodered server (can be same box) /TTDbridge with a tone name via a script called from TTD alert:



Node-Red will parse that and send unique output to MQTT for distribution to my Sonoff 4 channel to turn on an AC circuit telling me which department was toned. In this case the output can go to GPIO pins rather than the mqtt and sonoff complexity.


Sent from my iPad using Tapatalk
Sorry about the link. Here is another similar one:

https://raspberrypi.stackexchange.co...-a-i2c-adapter
Reply With Quote
  #756 (permalink)  
Old 04-13-2018, 10:06 AM
Member
  Audio Feed Provider
Audio Feed Provider
 
Join Date: Feb 2011
Location: Massachusetts
Posts: 967
Default

Quote:
Originally Posted by SOUTH300 View Post
Has anyone used TwoToneDetect for this purpose? Everything that I have researched indicates that what I am trying to do is possible, but wanted to put it here to see if I will run into any issues.

I am building a box, that will house several LED lights. I will use TTD on a Raspberry Pi as indicated in this thread. I will not be using the email feature, nor am I planning to have any network/internet connection to the box. Whenever a valid tone set is recieved, I would like to use the Alert Command feature to run a python script to activate an LED light. The Raspberry Pi would need to run headless, and I am thinking of putting a reset switch on the box, to reboot the Pi should any trouble arise without having to connect a keyboard/monitor to troubleshoot. I have been able to find all necessary information to get everything running, but do any of you see any issues that may present itself with this setup? Here is my ultimate goal. However, if need be I can seperate the project and use two Pi's.

(1) Raspberry Pi, 2 sound cards, two instances of TTD running on the Pi headless. Activating a total of 14 LED's. Seven LEDs controlled by one instance/sound card, and Seven by the other.

OR if I run into issues:

(1) Raspberry Pi, One Sound Card, TTD, 7 LEDs
(1) Raspberry Pi, One Sound Card, TTD, 7 LEDs

Ideas?

Thanks
Oren

Oren,

Just thought that I would report back. I purchased an I2C LCD screen to try this out. It was fairly simple and straightforward. Here is the LCD I purchased:

https://www.amazon.com/gp/slredirect...getName=sp_atf

Or search Amazon for Keyestudio 1602

Simply hook up four wires. Connect to the 5 v. power pin, you won't hurt your pi.

Here is the article that I followed to get it working:

How to Setup an I2C LCD on the Raspberry Pi - Circuit Basics

Once you get it to scroll or blink a message or whatever you want, then you can start integrating with TTD.

Create a file in your TTD folder called blink.py

Paste this following text into that file:

import I2C_LCD_driver
import time
import argparse

parser = argparse.ArgumentParser()
parser.add_argument("description")
args = parser.parse_args()

desc = args.description

mylcd = I2C_LCD_driver.lcd()

for x in range (1,10):

mylcd.lcd_display_string(desc)
time.sleep(1)
mylcd.lcd_clear()
time.sleep(1)

Then save it.

Note that the I2C_LCD_driver file needs to be in your TTD folder also.

Now, in your tones.cfg file add an alert_command = python blink.py [d] for each tone set that you want to display on the LCD.

When that tone set decodes it will send the Description = parameter to the LCD screen and blink it ten times.

The CircuitBasics page above describes now to modify the code if you want it scrolling or some other option.

It doesn't handle stacked tones well.

With some modifications, I expect that it would also work with and OLED display.

Good luck with it.

Jim
Reply With Quote
  #757 (permalink)  
Old 04-13-2018, 10:40 AM
SOUTH300's Avatar
Member
  Audio Feed Provider
Audio Feed Provider
Amateur Radio Operator
Amateur Radio
 
Join Date: Jun 2002
Location: Carencro, LA
Posts: 215
Default

Quote:
Originally Posted by DC31 View Post
Oren,

Just thought that I would report back. I purchased an I2C LCD screen to try this out. It was fairly simple and straightforward. Here is the LCD I purchased:

https://www.amazon.com/gp/slredirect...getName=sp_atf

Or search Amazon for Keyestudio 1602

Simply hook up four wires. Connect to the 5 v. power pin, you won't hurt your pi.

Here is the article that I followed to get it working:

How to Setup an I2C LCD on the Raspberry Pi - Circuit Basics

Once you get it to scroll or blink a message or whatever you want, then you can start integrating with TTD.

Create a file in your TTD folder called blink.py

Paste this following text into that file:

import I2C_LCD_driver
import time
import argparse

parser = argparse.ArgumentParser()
parser.add_argument("description")
args = parser.parse_args()

desc = args.description

mylcd = I2C_LCD_driver.lcd()

for x in range (1,10):

mylcd.lcd_display_string(desc)
time.sleep(1)
mylcd.lcd_clear()
time.sleep(1)

Then save it.

Note that the I2C_LCD_driver file needs to be in your TTD folder also.

Now, in your tones.cfg file add an alert_command = python blink.py [d] for each tone set that you want to display on the LCD.

When that tone set decodes it will send the Description = parameter to the LCD screen and blink it ten times.

The CircuitBasics page above describes now to modify the code if you want it scrolling or some other option.

It doesn't handle stacked tones well.

With some modifications, I expect that it would also work with and OLED display.

Good luck with it.

Jim
That is awesome Jim. Thanks a bunch for the info.

Oren


Sent from my SAMSUNG-SM-G935A using Tapatalk
Reply With Quote
  #758 (permalink)  
Old 04-15-2018, 8:20 PM
davidVT's Avatar
Member
  Audio Feed Provider
Audio Feed Provider
 
Join Date: Aug 2010
Location: Washington County,Vermont
Posts: 102
Default

Quote:
Originally Posted by DC31 View Post
Oren,



Just thought that I would report back. I purchased an I2C LCD screen to try this out. It was fairly simple and straightforward. Here is the LCD I purchased:



https://www.amazon.com/gp/slredirect...getName=sp_atf



Or search Amazon for Keyestudio 1602



Simply hook up four wires. Connect to the 5 v. power pin, you won't hurt your pi.



Here is the article that I followed to get it working:



How to Setup an I2C LCD on the Raspberry Pi - Circuit Basics



Once you get it to scroll or blink a message or whatever you want, then you can start integrating with TTD.



Create a file in your TTD folder called blink.py



Paste this following text into that file:



import I2C_LCD_driver

import time

import argparse



parser = argparse.ArgumentParser()

parser.add_argument("description")

args = parser.parse_args()



desc = args.description



mylcd = I2C_LCD_driver.lcd()



for x in range (1,10):



mylcd.lcd_display_string(desc)

time.sleep(1)

mylcd.lcd_clear()

time.sleep(1)



Then save it.



Note that the I2C_LCD_driver file needs to be in your TTD folder also.



Now, in your tones.cfg file add an alert_command = python blink.py [d] for each tone set that you want to display on the LCD.



When that tone set decodes it will send the Description = parameter to the LCD screen and blink it ten times.



The CircuitBasics page above describes now to modify the code if you want it scrolling or some other option.



It doesn't handle stacked tones well.



With some modifications, I expect that it would also work with and OLED display.



Good luck with it.



Jim


Jim,
Nice work.
Can you clarify part as keyestudio 2004 or 1602??
Thank you


Sent from my iPhone using Tapatalk
Reply With Quote
  #759 (permalink)  
Old 04-15-2018, 8:47 PM
Member
  Audio Feed Provider
Audio Feed Provider
 
Join Date: Feb 2011
Location: Massachusetts
Posts: 967
Default

Quote:
Originally Posted by davidVT View Post
Jim,
Nice work.
Can you clarify part as keyestudio 2004 or 1602??
Thank you


Sent from my iPhone using Tapatalk
I used the 1602, the link may have taken you to a 2004. They are 16 characters, 2 lines or 20 characters, 4 lines. Either should work.

The key is that you get an I2C display. Only four wires to hook up.

Jim
Reply With Quote
  #760 (permalink)  
Old 04-17-2018, 6:58 PM
Member
  Premium Subscriber
Premium Subscriber
 
Join Date: Dec 2003
Location: Earth Sector 001
Posts: 819
Default

For a LED I am using one of these https://blink1.thingm.com/ the software comes with an API and a webserver you can fire off commands to it. I have TTD run a batch file that runs curl and hits C:\LEDCURL\curl.exe http://192.168.1.20:8934/blink1/patt...ame=fireengine and my LED goes off in my office.
Reply With Quote
Reply

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 2:59 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