Notices


Reply
Thread Tools
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:
Posts: 569 | Thanked: 462 times | Joined on Jul 2010 @ USA
#12
An 'else' condition to play an audio file on repeat or a media player playlist if there is no wifi connection would be insurance against no alarm.
 
Posts: 299 | Thanked: 241 times | Joined on Oct 2009 @ Singapore
#13
Originally Posted by rotoflex View Post
An 'else' condition to play an audio file on repeat or a media player playlist if there is no wifi connection would be insurance against no alarm.
Bar the missing Internet connection, the main risk of failure is due to the N900 running out of power. I'm afraid there's no 'else' statement for that...

Anyway, the way I would use it is to link it to a podcast instead, more specifically a 'static' link to the latest news from my favourite source (Sveriges Radio). I might post back if I get it to work. I want to wake up with news even if my alarm is set at 6:40AM and the latest news were at 6AM.
__________________
My Maemo Apps:
QTeachMe
- Flashcard app
MobiTifo (which was formerly known as QSportsEvent) - Sports leagues tracking (mainly football).
 
Guest | Posts: n/a | Thanked: 0 times | Joined on
#14
Is there any way a talented person out there could wrap this together into a simple application, perhaps even giving an selection of top radio stations or just the bookmarked stations from Media Player? That, for me, would be a real killer application and from what I see on this post, most of the work has been done, I just wish I had the skills!
 
Posts: 277 | Thanked: 319 times | Joined on Jan 2010
#15
It would be cool if the standard alarm clock could trigger all sorts of events. I have z-wave network at home and I can send http-requests to my server that controls my lights. So if I could make a specific alarm (like wake up) send a http-request to my server on my LAN, I would have an alarm clock that switches my lights on.

I'm sure this wouldn't be a huge amount of work to develop, but the last time I tried to program something it was in BASIC on a c64 and even that failed miserably...
 
Posts: 2,290 | Thanked: 4,134 times | Joined on Apr 2010 @ UK
#16
Anybody still after help with this please see the following thread for additional ideas.

http://talk.maemo.org/showthread.php?t=64519

Are these threads worth merging?
 
rokafellaskank's Avatar
Posts: 83 | Thanked: 4 times | Joined on Mar 2010 @ Birmingham England
#17
Originally Posted by oldpmaguy View Post
That's a great idea, using the internet radio as an alarm clock audio source. I haven't woken up to music since I was a kid.


And this isn't a bad idea either...


If only we could get the N900 to turn her off when we wanted, as well... %^p
Oh how I lol'ed!
 
Reply


 
Forum Jump


All times are GMT. The time now is 23:45.