From 2bc0584d08f8f62e4644c8f2c73bacd5a99f63ed Mon Sep 17 00:00:00 2001 From: lolodomo Date: Tue, 25 Jul 2017 11:06:14 +0200 Subject: [PATCH] Sonos binding: add state description on few channels (#3800) Signed-off-by: Laurent Garnier --- .../ESH-INF/thing/channels.xml | 105 ++++++++++-------- .../binding/sonos/SonosBindingConstants.java | 14 +-- 2 files changed, 68 insertions(+), 51 deletions(-) diff --git a/extensions/binding/org.eclipse.smarthome.binding.sonos/ESH-INF/thing/channels.xml b/extensions/binding/org.eclipse.smarthome.binding.sonos/ESH-INF/thing/channels.xml index 38b77ee6fb4..e0fe45852ac 100644 --- a/extensions/binding/org.eclipse.smarthome.binding.sonos/ESH-INF/thing/channels.xml +++ b/extensions/binding/org.eclipse.smarthome.binding.sonos/ESH-INF/thing/channels.xml @@ -20,12 +20,20 @@ String Properties of the alarm currently running + Switch Set to ON if the alarm was triggered + + + + + Switch + + Suppress all songs from the current queue @@ -35,40 +43,67 @@ Player + + String + + UDN of the coordinator for the current group + + + String Name of the album currently playing + Image Cover art of the album currently playing + String Cover art URL of the album currently playing + String Name of the artist currently playing + String Title of the song currently playing + String Name of the current track or radio station currently playing + + + + + String + + URI of the current track + + + + + String + + URI of the current AV transport + @@ -87,6 +122,7 @@ Switch Indicator set to ON if the this Zone Player is the Zone Group Coordinator + @@ -114,12 +150,6 @@ Play the given playlist. The playlist has to predefined in the Sonos Controller app - - Switch - - Suppress all songs from the current queue - - Switch @@ -156,6 +186,12 @@ Remove the given Zone Player to the group of this Zone Player + + String + + Repeat track or queue playback + + Switch @@ -180,10 +216,24 @@ Save the state of all the Zone Players + + Switch + + Shuffle queue playback + + + + Number + + Set/show the duration of the SleepTimer in seconds + + + Number Snooze the running alarm, if any, with the given number of minutes + @@ -197,6 +247,7 @@ String The State channel contains state of the Zone Player, e.g. PLAYING, STOPPED,... + @@ -216,24 +267,21 @@ String XML formatted string with the current zonegroup configuration + String Id of the Zone Group the Zone Player belongs to + String Name of the Zone Group the Zone Player belongs to - - - - String - - UDN of the coordinator for the current group + @@ -241,6 +289,7 @@ Switch Indicator set to ON when the line-in of the Zone Player is connected + @@ -249,36 +298,4 @@ Play the Line-in of the the Zone Player corresponding to the given UIN - - Number - - Set/show the duration of the SleepTimer in seconds - - - - - - Switch - - Shuffle queue playback - - - - String - - Repeat track or queue playback - - - - String - - URI of the current AV transport - - - - String - - URI of the current track - - diff --git a/extensions/binding/org.eclipse.smarthome.binding.sonos/src/main/java/org/eclipse/smarthome/binding/sonos/SonosBindingConstants.java b/extensions/binding/org.eclipse.smarthome.binding.sonos/src/main/java/org/eclipse/smarthome/binding/sonos/SonosBindingConstants.java index cde1b5a1daf..d82c9e3adc2 100644 --- a/extensions/binding/org.eclipse.smarthome.binding.sonos/src/main/java/org/eclipse/smarthome/binding/sonos/SonosBindingConstants.java +++ b/extensions/binding/org.eclipse.smarthome.binding.sonos/src/main/java/org/eclipse/smarthome/binding/sonos/SonosBindingConstants.java @@ -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"; @@ -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"; @@ -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";