Skip to content
This repository has been archived by the owner on May 7, 2020. It is now read-only.

Sonos: play TuneIn by a station id #4229

Merged
merged 1 commit into from Sep 16, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -108,6 +108,8 @@ channel-type.sonos.state.label = Etat du lecteur
channel-type.sonos.state.description = Etat de lecture de ce Sonos, par exemple PLAYING, STOPPED,...
channel-type.sonos.stop.label = Stop lecture
channel-type.sonos.stop.description = Stoppe la lecture par ce Sonos
channel-type.sonos.tuneinstationid.label = Id radio TuneIn
channel-type.sonos.tuneinstationid.description = Fournit l'id de radio TuneIn en cours ou lit la radio TuneIn � partir de son id de station
channel-type.sonos.volume.label = Volume
channel-type.sonos.volume.description = Indique ou modifie le volume de ce Sonos
channel-type.sonos.zonegroup.label = Zone Group
Expand Down
Expand Up @@ -44,6 +44,7 @@
<channel id="standalone" typeId="standalone" />
<channel id="state" typeId="state" />
<channel id="stop" typeId="stop" />
<channel id="tuneinstationid" typeId="tuneinstationid" />
<channel id="volume" typeId="volume" />
<channel id="zonegroup" typeId="zonegroup" />
<channel id="zonegroupid" typeId="zonegroupid" />
Expand Down
Expand Up @@ -45,6 +45,7 @@
<channel id="standalone" typeId="standalone" />
<channel id="state" typeId="state" />
<channel id="stop" typeId="stop" />
<channel id="tuneinstationid" typeId="tuneinstationid" />
<channel id="volume" typeId="volume" />
<channel id="zonegroup" typeId="zonegroup" />
<channel id="zonegroupid" typeId="zonegroupid" />
Expand Down
Expand Up @@ -45,6 +45,7 @@
<channel id="standalone" typeId="standalone" />
<channel id="state" typeId="state" />
<channel id="stop" typeId="stop" />
<channel id="tuneinstationid" typeId="tuneinstationid" />
<channel id="volume" typeId="volume" />
<channel id="zonegroup" typeId="zonegroup" />
<channel id="zonegroupid" typeId="zonegroupid" />
Expand Down
Expand Up @@ -45,6 +45,7 @@
<channel id="standalone" typeId="standalone" />
<channel id="state" typeId="state" />
<channel id="stop" typeId="stop" />
<channel id="tuneinstationid" typeId="tuneinstationid" />
<channel id="volume" typeId="volume" />
<channel id="zonegroup" typeId="zonegroup" />
<channel id="zonegroupid" typeId="zonegroupid" />
Expand Down
Expand Up @@ -45,6 +45,7 @@
<channel id="standalone" typeId="standalone" />
<channel id="state" typeId="state" />
<channel id="stop" typeId="stop" />
<channel id="tuneinstationid" typeId="tuneinstationid" />
<channel id="volume" typeId="volume" />
<channel id="zonegroup" typeId="zonegroup" />
<channel id="zonegroupid" typeId="zonegroupid" />
Expand Down
Expand Up @@ -44,6 +44,7 @@
<channel id="standalone" typeId="standalone" />
<channel id="state" typeId="state" />
<channel id="stop" typeId="stop" />
<channel id="tuneinstationid" typeId="tuneinstationid" />
<channel id="volume" typeId="volume" />
<channel id="zonegroup" typeId="zonegroup" />
<channel id="zonegroupid" typeId="zonegroupid" />
Expand Down
Expand Up @@ -45,6 +45,7 @@
<channel id="standalone" typeId="standalone" />
<channel id="state" typeId="state" />
<channel id="stop" typeId="stop" />
<channel id="tuneinstationid" typeId="tuneinstationid" />
<channel id="volume" typeId="volume" />
<channel id="zonegroup" typeId="zonegroup" />
<channel id="zonegroupid" typeId="zonegroupid" />
Expand Down
Expand Up @@ -256,6 +256,12 @@
<description>Stop the Zone Player</description>
</channel-type>

<channel-type id="tuneinstationid" advanced="true">
<item-type>String</item-type>
<label>TuneIn Station Id</label>
<description>Provide the current TuneIn station id or play the TuneIn radio given by its station id</description>
</channel-type>

<channel-type id="volume">
<item-type>Dimmer</item-type>
<label>Volume</label>
Expand Down
92 changes: 48 additions & 44 deletions extensions/binding/org.eclipse.smarthome.binding.sonos/README.md
Expand Up @@ -36,50 +36,54 @@ Thing sonos:PLAY1:1 [ udn="RINCON_000E58D8403A0XXXX", refresh=60]

The devices support the following channels:

| Channel Type ID | Item Type | Description | Thing types |
|-----------------|------------------------|--------------|----------------- |------------- |---|
| add | String | Add a Zone Player to the group of the given Zone Player | all |
| alarm | Switch | Set the first occurring alarm either ON or OFF. Alarms first have to be defined through the Sonos Controller app | all |
| alarmproperties | String | Properties of the alarm currently running | all |
| alarmrunning | Switch | Set to ON if the alarm was triggered | all |
| control | Player | This channel supports controlling the zoneplayer, e.g. start/stop/next/previous | all |
| coordinator | String | UDN of the coordinator for the current group | all |
| currentalbum | String | Name of the album currently playing | all |
| currentalbumart | Image | Cover art of the album currently playing | all |
| currentalbumarturl | String | Cover art URL of the album currently playing | all |
| currentartist | String | Name of the artist currently playing | all |
| currenttitle | String | Title of the song currently playing | all |
| currenttrack | String | This channel indicates the name of the track or radio station currently playing | all |
| currenttrackuri | String | URI of the current track | all |
| currenttransporturi | String | URI of the current AV transport | all |
| favorite | String | Play the given favorite entry. The favorite entry has to be predefined in the Sonos Controller app | all |
| led | Switch | Set or get the status of the white led on the front of the Zone Player | all |
| localcoordinator | Switch | Indicator set to ON if the this Zone Player is the Zone Group Coordinator | all |
| mute | Switch | Set or get the mute state of the master volume of the Zone Player | all |
| notificationsound | String | Play a notification sound by a given URI | all |
| notificationvolume | Dimmer | Set the volume applied to a notification sound | all |
| playlinein | String | This channel supports playing the audio source connected to the line-in of the zoneplayer identified by the Thing UID or UPnP UDN provided by the String. | PLAY5, CONNECT, CONNECTAMP |
| playlist | String | Play the given playlist. The playlist has to predefined in the Sonos Controller app | all |
| playqueue | Switch | Play the songs from the current queue | all |
| playtrack | Number | Play the given track number from the current queue | all |
| playuri | String | Play the given URI | all |
| publicaddress | Switch | Put all Zone Players in one group, and stream audio from the line-in from the Zone Player that triggered the command | PLAY5, CONNECT, CONNECTAMP |
| radio | String | Play the given radio station. The radio station has to be predefined in the Sonos Controller app | all |
| remove | String | Remove the given Zone Player from the group of this Zone Player | all |
| repeat | String | Repeat the current track or queue. The accepted values are OFF, ONE and ALL | all |
| restore | Switch | Restore the state of the Zone Player | all |
| restoreall | Switch | Restore the state of all the Zone Players | all |
| volume | Dimmer | This channel supports setting the master volume of the zoneplayer | all |
| save | Switch | Save the state of the Zone Player | all |
| saveall | Switch | Save the state of all the Zone Players | all |
| shuffle | Switch | Shuffle the queue playback | all |
| snooze | Switch | Snooze the running alarm, if any, with the given number of minutes | all |
| standalone | Switch | Make the Zone Player leave its Group and become a standalone Zone Player | all |
| state | String | The State channel contains state of the Zone Player, e.g. PLAYING, STOPPED,... | all |
| stop | Switch | Stop the Zone Player | all |
| zonegroup | String | XML formatted string with the current zonegroup configuration | all |
| zonegroupid | String | Id of the Zone Group the Zone Player belongs to | all |
| zonename | String | Name of the Zone Group the Zone Player belongs to | all |
| Channel Type ID | Item Type | Access Mode | Description | Thing types |
|---------------------|-----------|-------------|--------------|-------------|
| add | String | W | Add the given Zone Player to the group of this Zone Player | all |
| alarm | Switch | W | Set the first occurring alarm either ON or OFF. Alarms first have to be defined through the Sonos Controller app | all |
| alarmproperties | String | R | Properties of the alarm currently running | all |
| alarmrunning | Switch | R | Set to ON if the alarm was triggered | all |
| clearqueue | Switch | W | Suppress all songs from the current queue | all |
| control | Player | RW | Control the Zone Player, e.g. start/stop/next/previous/ffward/rewind | all |
| coordinator | String | R | UDN of the coordinator for the current group | all |
| currentalbum | String | R | Name of the album currently playing | all |
| currentalbumart | Image | R | Cover art of the album currently playing | all |
| currentalbumarturl | String | R | Cover art URL of the album currently playing | all |
| currentartist | String | R | Name of the artist currently playing | all |
| currenttitle | String | R | Title of the song currently playing | all |
| currenttrack | String | R | Name of the current track or radio station currently playing | all |
| currenttrackuri | String | R | URI of the current track | all |
| currenttransporturi | String | R | URI of the current AV transport | all |
| favorite | String | W | Play the given favorite entry. The favorite entry has to be predefined in the Sonos Controller app | all |
| led | Switch | RW | Set or get the status of the white led on the front of the Zone Player | all |
| linein | Switch | R | Indicator set to ON when the line-in of the Zone Player is connected | PLAY5, CONNECT, CONNECTAMP, PLAYBASE |
| localcoordinator | Switch | R | Indicator set to ON if the this Zone Player is the Zone Group Coordinator | all |
| mute | Switch | RW | Set or get the mute state of the master volume of the Zone Player | all |
| notificationsound | String | W | Play a notification sound by a given URI | all |
| notificationvolume | Dimmer | RW | Set the volume applied to a notification sound | all |
| playlinein | String | W | This channel supports playing the audio source connected to the line-in of the zoneplayer identified by the Thing UID or UPnP UDN provided by the String. | PLAY5, CONNECT, CONNECTAMP, PLAYBASE |
| playlist | String | W | Play the given playlist. The playlist has to predefined in the Sonos Controller app | all |
| playqueue | Switch | W | Play the songs from the current queue | all |
| playtrack | Number | W | Play the given track number from the current queue | all |
| playuri | String | W | Play the given URI | all |
| publicaddress | Switch | W | Put all Zone Players in one group, and stream audio from the line-in from the Zone Player that triggered the command | all |
| radio | String | W | Play the given radio station. The radio station has to be predefined in the Sonos Controller app | all |
| remove | String | W | Remove the given Zone Player from the group of this Zone Player | all |
| repeat | String | RW | Repeat the track or queue playback. The accepted values are OFF, ONE and ALL | all |
| restore | Switch | W | Restore the state of the Zone Player | all |
| restoreall | Switch | W | Restore the state of all the Zone Players | all |
| save | Switch | W | Save the state of the Zone Player | all |
| saveall | Switch | W | Save the state of all the Zone Players | all |
| shuffle | Switch | RW | Shuffle the queue playback | all |
| sleeptimer | Number | RW | Set/show the duration of the SleepTimer in seconds | all |
| snooze | Number | W | Snooze the running alarm, if any, with the given number of minutes | all |
| standalone | Switch | W | Make the Zone Player leave its Group and become a standalone Zone Player | all |
| state | String | R | The State channel contains state of the Zone Player, e.g. PLAYING, STOPPED,... | all |
| stop | Switch | W | Stop the Zone Player | all |
| tuneinstationid | String | RW | Provide the current TuneIn station id or play the TuneIn radio given by its station id | all |
| volume | Dimmer | RW | Set or get the master volume of the Zone Player | all |
| zonegroup | String | R | XML formatted string with the current zonegroup configuration | all |
| zonegroupid | String | R | Id of the Zone Group the Zone Player belongs to | all |
| zonename | String | R | Name of the Zone associated to the Zone Player | all |

## Audio Support

Expand Down
Expand Up @@ -89,6 +89,7 @@ public class SonosBindingConstants {
public final static String STANDALONE = "standalone";
public final static String STATE = "state";
public final static String STOP = "stop";
public final static String TUNEINSTATIONID = "tuneinstationid";
public final static String VOLUME = "volume";
public final static String ZONEGROUP = "zonegroup";
public final static String ZONEGROUPID = "zonegroupid";
Expand Down