![]() |
N900 as internet alarm clock radio
This sets up the N900 as an internet alarm clock radio, connecting to home Wi-Fi & starting PyRadio at a desired time.
It requires the applications Alarmed and PyRadio. Thanks to Nicolai for indicating the command line solutions at http://wiki.maemo.org/Phone_control#Networking The basic setup is: 1. Determine the Internet Access Point ID of your home ID 2. Create a timed command in Alarmed to connect to Wi-Fi at that IAP_ID 3. Create a timed command in Alarmed to start PyRadio shortly after connecting to Wi-Fi 4. Create a standard alarm in Alarmed for 10 or 30 minutes later, in case Wi-Fi or Pandora is down, for safety -- Details of procedure:- 1. Discover the ID for your home wi-fi in the saved connections: 1a. In XTerminal type gconftool -R /system/osso/connectivity/IAP 1b. Look in the text which returns for the line name = [name of your home wi-fi] 1c. look a couple of lines lower for the line /system/ossoconnectivity/IAP/ [then a long string of characters] 1d. The long string of characters is the IAP_ID of your home Wi-Fi. 1e. Copy & paste may not work from XTerminal, so minimize it so that you may refer to it again for the IAP_ID in a later step 2. Create a timed command in Alarmed to connect to Wi-Fi at that IAP_ID: 2a. Open Alarmed, then New Event 2b. Change Event Type from "Alarm" to "Command Execution" 2c. Change interval from "Every Minute" to "Daily" 2d. Name it "Clockradio Wi-Fi connect" or something 2e. Change "Time" to 5 minutes *before* you want the radio to play 2f. Change "Enter Command" to dbus-send --system --type=method_call --dest=com.nokia.icd /com/nokia/icd com.nokia.icd.connect string:* uint32:0 (All on one line, note the spaces, substitute your IAP_ID for *) 2g. Save the Event. 3. Create a timed command in Alarmed to start PyRadio 3a. Open Alarmed, then New Event 3b. Change Event Type from "Alarm" to "Command Execution" 3c. Change interval from "Every Minute" to "Daily" 3d. Name it "Daily ClockRadio" or something 3e. Change "Time" to the time you want the radio to play 3f. Change "Enter Command" to /opt/pyRadio/pyRadio.py 3g. Save the Event. 4. Create a standard alarm in Alarmed for 10 or 30 minutes later, in case Wi-Fi or Pandora is down, for safety If no typos, etc., at the set times connection to wi-fi will be made, and pyRadio will start up, on your last Pandora station at whatever volume you have left it. X minutes later a regular alarm will go off, just in case. |
Re: N900 as internet alarm clock radio
Loved the idea of having a radio alarm clock on my N900. I adapted the idea to make it easier and also install less applications.
It also works on multiple WiFi connections, if you leave your WiFi on auto-connect! Instead of using PyRadio I used the alarmed app to start my favourite local (internet) radio site via the media player. I did the following... In the Alarmed app Create a new event 'Command execution' Select 'Weekly' and tick 'Mon-Fri' or work days Select the 'time' to start the radio alarm Select a name for the alarm 'Rock Radio Alarm' I entered the following command:- dbus-send --print-reply --dest=com.nokia.mediaplayer /com/nokia/mediaplayer com.nokia.mediaplayer.mime_open string:http://streaming.gmgradio.com/rockradiomanchester.m3u > /dev/null If you copy this correctly you can wake up to Rock Radio Manchester in the morning. Alternatively replace:- http://streaming.gmgradio.com/rockradiomanchester.m3u ...for another stations address. Examples:- BBC Radio 1 http://sradio.tv/stream/1827.m3u Kerrang Radio http://sradio.tv/stream/979.m3u Planet Rock http://sradio.tv/stream/1828.m3u I would also recommend using the alarmed app to create a 'Alarm' 10-15 minutes after your radio starts, incase there is no internet connection available. |
Re: N900 as internet alarm clock radio
Great work!
I was just wondering...is it possible doing all these wonderful things while the phone is off? I mean, is it possible to create an event that triggers the phone to boot up and just then connects to wifi and later to the radio station? |
Re: N900 as internet alarm clock radio
I'd simply keep it in "offline" mode instead of fully off - it doesn't take much battery this way, and trying to enable wifi is going to be easier than waking the whole device.
|
Re: N900 as internet alarm clock radio
brilliant work sixwheeledbeast i have got the planet rock one working by copy/pasting the string but every time i try and replce the radio1 version in when it loads up i get a message stating playlist corrupted?
can anyone help by giving me the full string to copy/paste for radio1 cheers |
Re: N900 as internet alarm clock radio
BBC1 stream:
http://www.bbc.co.uk/radio/listen/live/r1.asx Other BBC radio streams: http://talk.maemo.org/showpost.php?p=548896&postcount=4 |
Re: N900 as internet alarm clock radio
thanks rotoflex but im still having problems ... will try again when i get home and see how it works on my wifi
|
Re: N900 as internet alarm clock radio
1 Attachment(s)
i also use alarmed application, but i run a short script to slowly increase the volume up to 70 %
the comand in alarmed looks like: sh /home/user/MyDocs/.documents/Internetradio.sh you can edit the file to get another radio station. thanks |
Re: N900 as internet alarm clock radio
BRILLIANTllll
Thanks to the rotoflex for creating this really useful post with the extra info on radio1 links and thanks to ixwheeledbeast for coming up with a simple way to run it. great work guys!!! |
Re: N900 as internet alarm clock radio
Update on my internet radio alarm clock.
Bit long winded, hope this helps. I have added a few extra command executions thanks to "berlinermaxe's" idea. The following is all the commands to create an internet radio alarm clock that increases volume over time. - Firstly set the volume of the device to a nice level. This ensures the radio will start at the correct volume every day. In the Alarmed app Create a new event 'Command execution' Select 'Weekly' and tick 'Mon-Fri' or work days. Set the 'time' to one minute before the radio alarm is to start. Select a name for the alarm 'Volume Set 55' Enter the following command:- Code:
dbus-send --type=method_call --dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer /com/nokia/mafw/renderer/gstrenderer com.nokia.mafw.extension.set_extension_property string:volume variant:uint32:55 Then we need to start the media player, as mentioned before "http://streaming.gmgradio.com/rockradiomanchester.m3u" can be replaced with your choice. In the Alarmed app Create a new event 'Command execution' Select 'Weekly' and tick 'Mon-Fri' or work days Select the 'time' to start the radio alarm Select a name for the alarm 'Radio Alarm' Enter the following command:- Code:
dbus-send --print-reply --dest=com.nokia.mediaplayer /com/nokia/mediaplayer com.nokia.mediaplayer.mime_open string:http://streaming.gmgradio.com/rockradiomanchester.m3u > /dev/null Then to increase the volume, so I have set this command 5 minutes after the radio start time. In the Alarmed app Create a new event 'Command execution' Select 'Weekly' and tick 'Mon-Fri' or work days Select the 'time' to increase the volume Select a name for the alarm 'Set Volume 65' Enter the following command:- Code:
dbus-send --type=method_call --dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer /com/nokia/mafw/renderer/gstrenderer com.nokia.mafw.extension.set_extension_property string:volume variant:uint32:65 Then to increase the volume again, so I have set this command 10 minutes after the radio start time. In the Alarmed app Create a new event 'Command execution' Select 'Weekly' and tick 'Mon-Fri' or work days Select the 'time' to increase the volume again Select a name for the alarm 'Set Volume 75' Enter the following command:- Code:
dbus-send --type=method_call --dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer /com/nokia/mafw/renderer/gstrenderer com.nokia.mafw.extension.set_extension_property string:volume variant:uint32:75 Okay so now the radio starts and slowly you are awakening. I now have a command to stop the radio, a command to start the alarm clock and then a command to put the volume back to full. This then means I don't have to manually change the volume and stop the radio playing. So in the morning; I wake up, stop the alarm and then my clever little N900 puts the volume back so the volume is correct for my car kit. So.... To stop the radio In the Alarmed app Create a new event 'Command execution' Select 'Weekly' and tick 'Mon-Fri' or work days. Select the 'time' to stop the radio. Select a name for the alarm 'Radio Stop' Enter the following command:- Code:
dbus-send --type=method_call --dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer /com/nokia/mafw/renderer/gstrenderer com.nokia.mafw.renderer.stop To start the alarm In the Alarmed app Create a new event 'Alarm' Select 'Weekly' and tick 'Mon-Fri' or work days. Select the 'time' start the alarm. - To put the volume to full again. In the Alarmed app Create a new event 'Command execution' Select 'Weekly' and tick 'Mon-Fri' or work days. Select the 'time' to two minutes after the radio alarm will stop. Select a name for the alarm 'Volume Set Full' Enter the following command:- Code:
dbus-send --type=method_call --dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer /com/nokia/mafw/renderer/gstrenderer com.nokia.mafw.extension.set_extension_property string:volume variant:uint32:100 Hope all this helps getting your N900 radio alarm clock working. |
All times are GMT. The time now is 02:07. |
vBulletin® Version 3.8.8