Many, but not all, internet radios come with a remote control. Sometimes they are very simple credit-card sized devices, sometimes they can be big dedicated boxes needing two hands to use with all sorts in between.
Basic models tend to use infrared and more sophisticated use TCP/IP over Wi-Fi - with a proprietary application protocol on top.
The underlying firmware in the Reiva-based radios generally have infrared control enabled even if there is no infrared hardware included in the radio. This fact has been exploited by a few people who have opened up their radios and inserted a supported infrared detector (one directly wired to the Barracuda board and another simply using the USB connection ... but I cannot find it while writing this).
Some other Reciva users have gone down a software route by using the unofficial Sharpfin patch to run a small web server on the radio and have it present a simple web interface that in turn performs some radio management commands. An example of this is documented in the Sharpfin mailing list.
However, Reciva have been working away quietly in the background and have implemented a way to achieve almost complete control of the radio (including managing the alarms, examining presets, tuning to radio stations and even browing the menu).
The initial implementation of UPnP-AV (aka DLNA) within the Reciva software performed the basic minimum - allowing it to access a media server and allowing the user to browse the music then select and play tracks.
This was extended to all external control points to send music to it - but the big addition was to add a Reciva specific service (RecivaRadio:0.0) that opened up much more of the proprietary capabilities of the radios.
A regular UPnP-AV controller will not know how to use these functions - so using them requires custom software. But the open nature of this (standard protocols and self-documenting web services calls) means that building something is relatively straight-forward ... using existing tools I was reading presets, searching the database and changing stations in less than 15 minutes.
This service is what I presume is being used by the Grace Digital remote control for the iPhone & iPod Touch.
If you plan to build something then here are some pointers - and let me know via a comment here or direct via other routes:
Check the power-on status - since some commands will not work if the radio is (soft) powered off.
Some of the calls require the use of a NavigatorId - obtain one with RegisterNavigator. This can then be used for the session - and should be released at the end with ReleaseNavigator (otherwise, I presume, the radio will eventually run out of memory).
The local controls at the radio appear to be disabled while controlling from remote - which may well be the most important reason to ReleaseNavigator.
Presets:
There can be more presets supported in the software than are accessible via the buttons on the device itself. Plus - the number available can be different on each radio. So use GetNumberOfPresets to determine how many there can be.
GetPreset returns the data of a single preset. Preset0 is a special case - it is automatically set to be the last station played.
Presets can be set in 2 ways - one is via SetPreset (see the return from a GetPreset to better understand the data required) and the other is to set the current playing station to a preset via SaveCurrentStationAsPreset
Tune to a given preset with PlayPreset.
Stations:
The station database can be searched (SearchForStationByName) and browsed (GetMenu).
It is also possible to get the station logo.
Here is an example of the return from one of these (GetPlaybackDetails):
<reciva>
<playback-details>
<state>Playing</state>
<station id="9256" custommenuid="0">
<logo>http://www.dandelionradio.com/images/logo.jpg</logo>
</station>
<playlist-entry></playlist-entry>
<stream id="fa3be23929b7339f9d2ce90f2c84ec37">
<url>http://www.dandelionradio.com/DandelionRadio.pls</url>
<title>Dandelion Radio</title>
<album-art-url>http://www.dandelionradio.com/images/logo.jpg</album-art-url>
</stream>
</playback-details>
</reciva>
Volume:
Take care here - some devices have an analogue volume control. So if the volume is turned down at the radio then you will not be able to adjust it from remote.
I have not yet managed to navgate the sub-menus - the item ids do not seem to work when I try them ... work in progress.
Some of the commands return an error (for example GetIsUpgradeAvailable) and there may well be differences between firmware versions (GetCurrentServicePack) - plus it returns all possible source types even if the hardware is not installed - so try to make your code flexible and extensible.
There is a lot more in there - such as:
- Volume controls (up / down / mute)
- Playlists (view list, change order, remove item)
- Soft Power (on / off)
- Alarms (view, set, delete)
- Reply (equivalent to hitting the reply buttton)
- Device (hardware id, upgrade, language)
For those who do not know how to examine the available services - but who are simply interested in knowing what is there ... I have uploaded a dump of the available set from firmware v257-a-865-a-400 (very recent beta) to the very useful "UPnP/AV Device Capability Database" being run as part of a research project at Institut für Pervasive Computing of Johannes Kepler Universität, Linz, Austria.
The specific entry for the recent firmware is at:
http://www.upnp-database.info/service.jsp?serviceId=464
You could help developers who do not have access to all radios/firmware by making your own upload of data by downloading the Magpie tool from their site. It would be particularly interesting to see the output from a Reciva-based Grace radio to check if there are any extra capabilities that are being used by their remote ... but I suspect that they have no more than is in the current firmware. If you do download and run the tool then make sure that it is not blocked by your firewall - and let it sit listening for a few minutes while waiting for a radio to advertise itself. Powering the radio off and on is likely to make it broadcast immediately. The radio should then appear on the left. Click on it - and it should start analysing. Once complete you can upload via the "Submit Data" button in the top left. After you finish the process you can view you new data on the site.
Note - there is not much point uploading data for a device/firmware combination that is already there so do browse the device list first (some of the names might not be obvious - and there a devices from all sorts of suppliers not just Reciva of course).