Frontier silicon radios via http

Hi,

unfortunately the fs binding supports only basic communication.
It is possible to control the radio additionally via http.

The following example shows how to switch the mode to Network Storage and play a song stored in a file structure.

Create a session ID
http://ip_addr/fsapi/CREATE_SESSION?pin=1234

output is :

<fsapiResponse>
<status>FS_OK</status>
<sessionId>1421653603</sessionId>
</fsapiResponse>

die generated sid is used for the further communication

switch to mode 7 (nas)
http://ip_addr/fsapi/SET/netRemote.sys.mode?pin=1234&sid=1421653603&value=7

reset navigation
http://ip_addr/fsapi/SET/netRemote.nav.state?pin=1234&sid=1421653603&value=0
http://ip_addr/fsapi/SET/netRemote.nav.state?pin=1234&sid=1421653603&value=1

use this command to get the current file structure
http://ip_addr/fsapi/LIST_GET_NEXT/netRemote.nav.list/-1?pin=1234&sid=1421653603&maxItems=20

Navigate to file to play
chose folder 0 in current structure
http://ip_addr/fsapi/SET/netRemote.nav.action.navigate?pin=1234&sid=1421653603&value=0
chose folder 0 in current structure
http://ip_addr/fsapi/SET/netRemote.nav.action.navigate?pin=1234&sid=1421653603&value=0
chose folder 0 in current structure**
http://ip_addr/fsapi/SET/netRemote.nav.action.navigate?pin=1234&sid=1421653603&value=0

chose song 2 in current file
http://ip_addr/fsapi/SET/netRemote.nav.action.selectItem?pin=1234&sid=1421653603&value=2

Do somebody have an idea how to implement that html sequence to a widget ? Especially hot to read back the sid from the first call ?

Thanks in advance,
Chris

See OAuth2 using just OH Rules and myopenhab.org which also needs to have a session token. You have it easier since you can supply the token as it off the url instead of in the header, but the over all approach should be the same.

Hi Chris,

did you manage to control your radio via http? I’d like to do the same and especially to have some different group presets where I can easily switch from one setup to another. Any help would be appreciated.

If you have a solution, it would be great if you can share it here.

Many thanks

Juergen

Hi Juergen,
basically it it possible to control the radio via http see the examples above.
My question was how to navigate and play songs from the local NAS in the openHAB view.
What exactly would you like to store as group settings ?
You can control some basic functions like source, volume ,… with the available binding.
I use openHAB ton control a group of radios. Switching on one device is enough to activate all radios in the group - I send a command to each radio of the group to control the volume , mute ,… . Typically the Internet Radio is active which is playing directly after the start. Switch Internet Radio Channel could be done with the available binding.

Best Regards,
Chris

Hi Chris,

I have not tested the binding so far but your description confirms my assumptions from what I read. But that’s only a part I would like to do. I use up to now 5 radios and I would like to group sometimes radio 1+2 or 1+3+4 or everything independently. Since I have a family with small kids loving audio books from CD’s I have to reconfigure the groups many times depending where the kids are playing. For this it would be really convenient to press one button to have a different group setting.

Regards

Juergen

Hi,
I dont know how to group radios via http and don’t think it is possible via the binding.
An easy work-around would be to have a group with all radios and set the the volume of the devices to 0 that are not used , but then it is not possible to play different things in different groups.
Setting the volume for devices individually is possible with the binding.

Regards
Chris

you find here more details :

looks that it is possible to create groups via http

/fsapi/SET/netRemote.multiroom.group.create?pin=1337&value=GroupName

and add devices :

/fsapi/SET/netRemote.multiroom.group.group.addClient?pin=1337&value=[Device-udn]

… then it is still the problem how to call the http command from habpanel.

Regards,
Chris