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

Commit

Permalink
Sonos binding: add state description on few channels (#3800)
Browse files Browse the repository at this point in the history
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
  • Loading branch information
lolodomo authored and kaikreuzer committed Jul 25, 2017
1 parent 1f70312 commit 2bc0584
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 51 deletions.
Expand Up @@ -20,12 +20,20 @@
<item-type>String</item-type>
<label>Alarm Properties</label>
<description>Properties of the alarm currently running</description>
<state readOnly="true" />
</channel-type>

<channel-type id="alarmrunning" advanced="true">
<item-type>Switch</item-type>
<label>Alarm is running</label>
<description>Set to ON if the alarm was triggered</description>
<state readOnly="true" />
</channel-type>

<channel-type id="clearqueue" advanced="true">
<item-type>Switch</item-type>
<label>Clear Queue</label>
<description>Suppress all songs from the current queue</description>
</channel-type>

<channel-type id="control">
Expand All @@ -35,40 +43,67 @@
<category>Player</category>
</channel-type>

<channel-type id="coordinator" advanced="true">
<item-type>String</item-type>
<label>Coordinator</label>
<description>UDN of the coordinator for the current group</description>
<state readOnly="true" />
</channel-type>

<channel-type id="currentalbum">
<item-type>String</item-type>
<label>Current Album</label>
<description>Name of the album currently playing</description>
<state readOnly="true" />
</channel-type>

<channel-type id="currentalbumart">
<item-type>Image</item-type>
<label>Current Album Cover Art</label>
<description>Cover art of the album currently playing</description>
<state readOnly="true" />
</channel-type>

<channel-type id="currentalbumarturl" advanced="true">
<item-type>String</item-type>
<label>Current Album Cover Art URL</label>
<description>Cover art URL of the album currently playing</description>
<state readOnly="true" />
</channel-type>

<channel-type id="currentartist">
<item-type>String</item-type>
<label>Current Artist</label>
<description>Name of the artist currently playing</description>
<state readOnly="true" />
</channel-type>

<channel-type id="currenttitle">
<item-type>String</item-type>
<label>Current Title</label>
<description>Title of the song currently playing</description>
<state readOnly="true" />
</channel-type>

<channel-type id="currenttrack" advanced="true">
<item-type>String</item-type>
<label>Current Track</label>
<description>Name of the current track or radio station currently playing</description>
<state readOnly="true" />
</channel-type>

<channel-type id="currenttrackuri" advanced="true">
<item-type>String</item-type>
<label>Current track URI</label>
<description>URI of the current track</description>
<state readOnly="true" />
</channel-type>

<channel-type id="currenttransporturi" advanced="true">
<item-type>String</item-type>
<label>Current AV transport URI</label>
<description>URI of the current AV transport</description>
<state readOnly="true" />
</channel-type>

<channel-type id="favorite" advanced="true">
Expand All @@ -87,6 +122,7 @@
<item-type>Switch</item-type>
<label>Local Coordinator</label>
<description>Indicator set to ON if the this Zone Player is the Zone Group Coordinator</description>
<state readOnly="true" />
</channel-type>

<channel-type id="mute" advanced="true">
Expand Down Expand Up @@ -114,12 +150,6 @@
<description>Play the given playlist. The playlist has to predefined in the Sonos Controller app</description>
</channel-type>

<channel-type id="clearqueue" advanced="true">
<item-type>Switch</item-type>
<label>Clear Queue</label>
<description>Suppress all songs from the current queue</description>
</channel-type>

<channel-type id="playqueue" advanced="true">
<item-type>Switch</item-type>
<label>Play Queue</label>
Expand Down Expand Up @@ -156,6 +186,12 @@
<description>Remove the given Zone Player to the group of this Zone Player</description>
</channel-type>

<channel-type id="repeat" advanced="true">
<item-type>String</item-type>
<label>Repeat</label>
<description>Repeat track or queue playback</description>
</channel-type>

<channel-type id="restore" advanced="true">
<item-type>Switch</item-type>
<label>Restore</label>
Expand All @@ -180,10 +216,24 @@
<description>Save the state of all the Zone Players</description>
</channel-type>

<channel-type id="shuffle" advanced="true">
<item-type>Switch</item-type>
<label>Shuffle</label>
<description>Shuffle queue playback</description>
</channel-type>

<channel-type id="sleeptimer" advanced="true">
<item-type>Number</item-type>
<label>Sleep Timer</label>
<description>Set/show the duration of the SleepTimer in seconds</description>
<state min="0" max="68399" step="1" readOnly="false" pattern="%d s" />
</channel-type>

<channel-type id="snooze" advanced="true">
<item-type>Number</item-type>
<label>Snooze</label>
<description>Snooze the running alarm, if any, with the given number of minutes</description>
<state readOnly="false" pattern="%d min" />
</channel-type>

<channel-type id="standalone" advanced="true">
Expand All @@ -197,6 +247,7 @@
<item-type>String</item-type>
<label>State</label>
<description>The State channel contains state of the Zone Player, e.g. PLAYING, STOPPED,...</description>
<state readOnly="true" />
</channel-type>

<channel-type id="stop" advanced="true">
Expand All @@ -216,31 +267,29 @@
<item-type>String</item-type>
<label>Zone Group</label>
<description>XML formatted string with the current zonegroup configuration</description>
<state readOnly="true" />
</channel-type>

<channel-type id="zonegroupid" advanced="true">
<item-type>String</item-type>
<label>Zone Group ID</label>
<description>Id of the Zone Group the Zone Player belongs to</description>
<state readOnly="true" />
</channel-type>

<channel-type id="zonename">
<item-type>String</item-type>
<label>Zone Name</label>
<description>Name of the Zone Group the Zone Player belongs to</description>
</channel-type>

<channel-type id="coordinator" advanced="true">
<item-type>String</item-type>
<label>Coordinator</label>
<description>UDN of the coordinator for the current group</description>
<state readOnly="true" />
</channel-type>

<!-- Extended channels (for SONOS PLAY5, CONNECT & CONNECT:AMP only) -->
<channel-type id="linein" advanced="true">
<item-type>Switch</item-type>
<label>Line-in connected</label>
<description>Indicator set to ON when the line-in of the Zone Player is connected</description>
<state readOnly="true" />
</channel-type>

<channel-type id="playlinein" advanced="true">
Expand All @@ -249,36 +298,4 @@
<description>Play the Line-in of the the Zone Player corresponding to the given UIN</description>
</channel-type>

<channel-type id="sleeptimer" advanced="true">
<item-type>Number</item-type>
<label>Sleep Timer</label>
<description>Set/show the duration of the SleepTimer in seconds</description>
<state min="0" max="68399" step="1" readOnly="false">
</state>
</channel-type>

<channel-type id="shuffle" advanced="true">
<item-type>Switch</item-type>
<label>Shuffle</label>
<description>Shuffle queue playback</description>
</channel-type>

<channel-type id="repeat" advanced="true">
<item-type>String</item-type>
<label>Repeat</label>
<description>Repeat track or queue playback</description>
</channel-type>

<channel-type id="currenttransporturi" advanced="true">
<item-type>String</item-type>
<label>Current AV transport URI</label>
<description>URI of the current AV transport</description>
</channel-type>

<channel-type id="currenttrackuri" advanced="true">
<item-type>String</item-type>
<label>Current track URI</label>
<description>URI of the current track</description>
</channel-type>

</thing:thing-descriptions>
Expand Up @@ -52,13 +52,17 @@ public class SonosBindingConstants {
public final static String ALARM = "alarm";
public final static String ALARMPROPERTIES = "alarmproperties";
public final static String ALARMRUNNING = "alarmrunning";
public final static String CLEARQUEUE = "clearqueue";
public final static String CONTROL = "control";
public final static String COORDINATOR = "coordinator";
public final static String CURRENTALBUM = "currentalbum";
public final static String CURRENTALBUMART = "currentalbumart";
public final static String CURRENTALBUMARTURL = "currentalbumarturl";
public final static String CURRENTARTIST = "currentartist";
public final static String CURRENTTITLE = "currenttitle";
public final static String CURRENTTRACK = "currenttrack";
public final static String CURRENTTRACKURI = "currenttrackuri";
public final static String CURRENTTRANSPORTURI = "currenttransporturi";
public final static String FAVORITE = "favorite";
public final static String LED = "led";
public final static String LINEIN = "linein";
Expand All @@ -68,17 +72,19 @@ public class SonosBindingConstants {
public final static String NOTIFICATIONVOLUME = "notificationvolume";
public final static String PLAYLINEIN = "playlinein";
public final static String PLAYLIST = "playlist";
public final static String CLEARQUEUE = "clearqueue";
public final static String PLAYQUEUE = "playqueue";
public final static String PLAYTRACK = "playtrack";
public final static String PLAYURI = "playuri";
public final static String PUBLICADDRESS = "publicaddress";
public final static String RADIO = "radio";
public final static String REMOVE = "remove";
public final static String REPEAT = "repeat";
public final static String RESTORE = "restore";
public final static String RESTOREALL = "restoreall";
public final static String SAVE = "save";
public final static String SAVEALL = "saveall";
public final static String SHUFFLE = "shuffle";
public final static String SLEEPTIMER = "sleeptimer";
public final static String SNOOZE = "snooze";
public final static String STANDALONE = "standalone";
public final static String STATE = "state";
Expand All @@ -87,13 +93,7 @@ public class SonosBindingConstants {
public final static String ZONEGROUP = "zonegroup";
public final static String ZONEGROUPID = "zonegroupid";
public final static String ZONENAME = "zonename";
public final static String COORDINATOR = "coordinator";
public final static String MODELID = "modelId";
public final static String SLEEPTIMER = "sleeptimer";
public final static String SHUFFLE = "shuffle";
public final static String REPEAT = "repeat";
public final static String CURRENTTRANSPORTURI = "currenttransporturi";
public final static String CURRENTTRACKURI = "currenttrackuri";

// List of properties
public static final String IDENTIFICATION = "identification";
Expand Down

0 comments on commit 2bc0584

Please sign in to comment.