| batterycharging | Switch | R | Indicator set to ON when the battery is charging | Move |
| batterylevel | Number | R | Current battery level | Move |
| clearqueue | Switch | W | Suppress all songs from the current queue | all |
+| codec | String | R | Name of codec currently being decoded | Arc, Arc SL, PLAYBAR, PLAYBASE, Beam, Amp |
| control | Player | RW | Control the Zone Player, e.g. PLAY/PAUSE/NEXT/PREVIOUS | all |
| coordinator | String | R | UDN of the coordinator for the current group | all |
| currentalbum | String | R | Name of the album currently playing | all |
public static final String BATTERYCHARGING = "batterycharging";
public static final String BATTERYLEVEL = "batterylevel";
public static final String CLEARQUEUE = "clearqueue";
+ public static final String CODEC = "codec";
public static final String CONTROL = "control";
public static final String COORDINATOR = "coordinator";
public static final String CURRENTALBUM = "currentalbum";
case "SurroundEnabled":
case "SurroundMode":
case "SurroundLevel":
+ case "HTAudioIn":
case "MusicSurroundLevel":
case "HeightChannelLevel":
val = attributes == null ? null : attributes.getValue("val");
case "SurroundLevel":
updateChannel(SURROUNDTVLEVEL);
break;
+ case "HTAudioIn":
+ updateChannel(CODEC);
+ break;
case "MusicSurroundLevel":
updateChannel(SURROUNDMUSICLEVEL);
break;
newState = new DecimalType(value);
}
break;
+ case CODEC:
+ value = getCodec();
+ if (value != null) {
+ newState = new StringType(value);
+ }
+ break;
case HEIGHTLEVEL:
value = getHeightLevel();
if (value != null) {
return stateMap.get("MusicSurroundLevel");
}
+ public @Nullable String getCodec() {
+ String codec = stateMap.get("HTAudioIn");
+ if (codec != null) {
+ switch (codec) {
+ case "0":
+ case "21":
+ codec = "noSignal";
+ break;
+ case "22":
+ case "33554454":
+ codec = "silence";
+ break;
+ case "32":
+ codec = "DTS";
+ break;
+ case "59":
+ case "63":
+ codec = "dolbyAtmos";
+ break;
+ case "33554434":
+ codec = "DD20";
+ break;
+ case "33554494":
+ codec = "PCM20";
+ break;
+ case "84934713":
+ codec = "DD51";
+ break;
+ case "84934714":
+ codec = "DDPlus51";
+ break;
+ case "84934718":
+ codec = "PCM51";
+ break;
+ default:
+ codec = "Unknown - " + codec;
+ }
+ }
+ return codec;
+ }
+
public @Nullable String getSubwooferEnabled() {
return stateMap.get("SubEnabled");
}
<channel id="currenttrackuri" typeId="currenttrackuri"/>
<!-- Extended SONOS channels -->
<channel id="analoglinein" typeId="linein"/>
+ <channel id="codec" typeId="codec"/>
<channel id="publicanalogaddress" typeId="publicaddress"/>
<channel id="digitallinein" typeId="linein"/>
<channel id="publicdigitaladdress" typeId="publicaddress"/>
<channel id="currenttransporturi" typeId="currenttransporturi"/>
<channel id="currenttrackuri" typeId="currenttrackuri"/>
<!-- Extended SONOS channels -->
+ <channel id="codec" typeId="codec"/>
<channel id="linein" typeId="linein"/>
<channel id="microphone" typeId="microphone"/>
<channel id="nightmode" typeId="nightmode"/>
<channel id="currenttransporturi" typeId="currenttransporturi"/>
<channel id="currenttrackuri" typeId="currenttrackuri"/>
<!-- Extended SONOS channels -->
+ <channel id="codec" typeId="codec"/>
<channel id="linein" typeId="linein"/>
<channel id="nightmode" typeId="nightmode"/>
<channel id="speechenhancement" typeId="speechenhancement"/>
<channel id="currenttransporturi" typeId="currenttransporturi"/>
<channel id="currenttrackuri" typeId="currenttrackuri"/>
<!-- Extended SONOS channels -->
+ <channel id="codec" typeId="codec"/>
<channel id="linein" typeId="linein"/>
<channel id="microphone" typeId="microphone"/>
<channel id="nightmode" typeId="nightmode"/>
<channel id="currenttransporturi" typeId="currenttransporturi"/>
<channel id="currenttrackuri" typeId="currenttrackuri"/>
<!-- Extended SONOS channels -->
+ <channel id="codec" typeId="codec"/>
<channel id="linein" typeId="linein"/>
<channel id="nightmode" typeId="nightmode"/>
<channel id="speechenhancement" typeId="speechenhancement"/>
<channel id="currenttransporturi" typeId="currenttransporturi"/>
<channel id="currenttrackuri" typeId="currenttrackuri"/>
<!-- Extended SONOS channels -->
+ <channel id="codec" typeId="codec"/>
<channel id="linein" typeId="linein"/>
<channel id="nightmode" typeId="nightmode"/>
<channel id="speechenhancement" typeId="speechenhancement"/>
<description>Suppress all songs from the current queue</description>
</channel-type>
+ <channel-type id="codec" advanced="true">
+ <item-type>String</item-type>
+ <label>Codec</label>
+ <description>Name of codec currently being decoded</description>
+ <state readOnly="true">
+ <options>
+ <option value="noSignal">No Signal</option>
+ <option value="silence">Silence</option>
+ <option value="DTS">DTS</option>
+ <option value="dolbyAtmos">Dolby Atmos</option>
+ <option value="DD20">Dolby Digital 2.0</option>
+ <option value="PCM20">Dolby Multichannel PCM 2.0</option>
+ <option value="DD51">Dolby Digital 5.1</option>
+ <option value="DDPlus51">Dolby Digital Plus 5.1</option>
+ <option value="PCM51">Dolby Multichannel PCM 5.1</option>
+ </options>
+ <limitToOptions>false</limitToOptions>
+ </state>
+ </channel-type>
+
<channel-type id="coordinator" advanced="true">
<item-type>String</item-type>
<label>Coordinator</label>