View Single Post
Posts: 4 | Thanked: 1 time | Joined on Feb 2010
#11
Instal alarmed, and put following code in /usr/local/bin/radio-alarm:

Code:
#!/bin/sh

ssid=`/sbin/iwgetid -s`

test $ssid = "YOUR_HOME_NETWORK" && dbus-send --print-reply --dest=com.nokia.mediaplayer /com/nokia/mediaplayer com.nokia.mediaplayer.mime_open string:YOUR_HTTP_RADIO_LINK > /dev/null
YOUR_HOME_NETWORK - your home WiFi SSID; that's for stopping execution if you're not connected in your LAN, you can omit it if you're OK with using your 2G/3G connection for Internet radio

YOUR_HTTP_RADIO_LINK - http:// link for your radio station, it can also be file:///home/user/_something_something.pls, just remember to put it there.

Save the script and set it executable. Run it from the user account to test if everything works as intended. Add new action in alarmed: execute command /usr/local/sbin/radio-alarm at specified time.

Last edited by maromader; 2010-07-30 at 17:34.
 

The Following User Says Thank You to maromader For This Useful Post: