As a nice little thought problem, I decided to try and figure out a way to interrupt RadioDJ for weather watches and warnings–and I believe I’ve found a solution that works for my installation.
*NOTE: this solution is definitely NOT recommended for any sort of broadcast use–that’s what all that wonderful EAS equipment is for…
My first thought was to hook up an old NWR to the PC and have a tone detector monitor the input–a thought I might revisit–however, I ended up settling on a solution where a message received via IM triggers an AutoHotkey script. (…this idea came after a ton of other attempts at trying to find ways to push data to the PC, rather than having it poll at certain intervals.)
Unfortunately, I can’t jump in and give all the good details on the AHK script that I made–this is due to the fact that your system will be configured differently than mine, plus I really wouldn’t want to have you put that much faith in something I had some troubles with.
But, anyway… the basic idea to how I put everything together is this:
- I receive an SMS from the weather service on my personal phone.
- Using a neat little program installed on my phone, the message is forwarded to my AIM account via AOL’s SMS gateway. (…which will eventually get shut-down–I mean, everyone’s been killing off their gateways; honestly I was shocked to find AOL still had one in existence!)
- The program (SMS Forwarder) searches incoming messages beginning with “New Event.” or “Event Modified.”
- SMS Forwarder then replaces the found string with “Send *MY_AOL_USERNAME* and forwards it all to 246246
- My RadioDJ PC receives the message via Pidgin and “pounces” upon it.
- I configured Pidgin to have a “recurring” pounce that responds to any message received from my mobile number. I chose Pidgin simply because I remembered that it could execute a specified command when it sees/receives a message from a user. Another reason why I chose Pidgin is that I can tell it to sit in the system tray and not do any other attention grabbing or screen stealing stuff.
- My AHK script–which has been converted to an *.exe–is activated by the Pidgin pounce.
- AHK loads and plays a preconfigured RadioDJ playlist–which only consists of a manual event for interrupting the current song and all other events.
As stated before, I really can’t delve into how the AutoHotkey script works. Similarly, I’m not going to go into detail on the creation of my manual event. Sorry. But, here’s the gist of it, so that you can try to figure it out on your own, if you’d like:
- Pause playback of the current song
- Disable AutoDJ
- Pause all events
- Load and playback the NWS stream from the database into Auxilary Player 1
- I found where someone setup a stream for my area’s NWS broadcast on Weather Underground. You may have luck doing the same…
- Wait 2 minutes
- I decided to use two minutes as the delay before returning to normal playback, based upon info I found that stated this was the old “standard” for delayed return in decades past. (Don’t ask me where I found this–I can’t remember.)
- Stop playback of Aux Player 1
- Unpause playback
- Re-enable AutoDJ
- Re-enable Events
…as for the “playlist”: load up the playlist builder, insert the manual event, and save the playlist.
Obviously, there’s a lot more tinkering that could be done to the whole process in order to make it act a lot more like a “real” station’s setup–which is why I say I’m thinking about revisiting my idea of hooking a NWR up to the PC.
Unfortunately, there’s a couple points of failure in my setup–reliance upon my receiving an SMS, using AIM to trigger the playback of that stream, and the stream itself. If I were to use a radio and detect it’s tone, I’d eliminate those three points… but, I still face the potential failure of the radio receiving signal, and the possibility of having false-positives in tone-detection if I use and older radio that won’t reset without user intervention. (…I discovered that I’d need to do a lot of tweaking to the detection level of the given tone, as a poor quality signal can distort and create the tones I’d be looking for.)
…but, for now, this is a workable solution as I’m only using the program for my own enjoyment. 😉
One thought on “Interrupting RadioDJ for WX Alerts”