[sonos] Add support for Era 100 and Era 300 (#14920)
Closes #14802 Signed-off-by: Laurent Garnier <lg.hc@free.fr>
This commit is contained in:
@@ -11,11 +11,11 @@ This happens because of a TTL=1 for ALIVE packets send by Sonos devices, resulti
|
|||||||
## Supported Things
|
## Supported Things
|
||||||
|
|
||||||
All available Sonos (playback) devices are supported by this binding.
|
All available Sonos (playback) devices are supported by this binding.
|
||||||
This includes the One, One SL, Move, Roam, Roam SL, Play:1, Play:3, Play:5, Five, Connect, Connect:Amp, Port, Amp, SYMFONISK, Playbar, Playbase, Beam, Arc, Arc SL and Sub.
|
This includes the One, One SL, Move, Roam, Roam SL, Play:1, Play:3, Play:5, Five, Era 100, Era 300, Connect, Connect:Amp, Port, Amp, SYMFONISK, Playbar, Playbase, Beam, Arc, Arc SL and Sub.
|
||||||
The Bridge and Boost are not supported, but these devices do only have an auxiliary role in the Sonos network and do not have any playback capability.
|
The Bridge and Boost are not supported, but these devices do only have an auxiliary role in the Sonos network and do not have any playback capability.
|
||||||
All supported Sonos devices are registered as an audio sink in the framework.
|
All supported Sonos devices are registered as an audio sink in the framework.
|
||||||
|
|
||||||
When being defined in a \*.things file, the specific thing types One, OneSL, Move, Roam, RoamSL, PLAY1, PLAY3, PLAY5, Five, SYMFONISK, PLAYBAR, PLAYBASE, Beam, Arc, ArcSL, CONNECT, CONNECTAMP, Port and Amp should be used.
|
When being defined in a \*.things file, the specific thing types One, OneSL, Move, Roam, RoamSL, PLAY1, PLAY3, PLAY5, Five, Era100, Era300, SYMFONISK, PLAYBAR, PLAYBASE, Beam, Arc, ArcSL, CONNECT, CONNECTAMP, Port and Amp should be used.
|
||||||
|
|
||||||
Please note that these thing types are case sensitive (you need to define them **exactly as stated above**).
|
Please note that these thing types are case sensitive (you need to define them **exactly as stated above**).
|
||||||
|
|
||||||
@@ -72,12 +72,12 @@ The devices support the following channels:
|
|||||||
| favorite | String | W | Play the given favorite entry. The favorite entry has to be predefined in the Sonos Controller app | all |
|
| favorite | String | W | Play the given favorite entry. The favorite entry has to be predefined in the Sonos Controller app | all |
|
||||||
| heightlevel | Number | RW | Set or get the height level adjustment (value in range -10 / 10) | Arc, ArcSL |
|
| heightlevel | Number | RW | Set or get the height level adjustment (value in range -10 / 10) | Arc, ArcSL |
|
||||||
| led | Switch | RW | Set or get the status of the white LED on the front of the Zone Player | 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, Five, CONNECT, CONNECTAMP, PLAYBAR, PLAYBASE, Beam, Port |
|
| linein | Switch | R | Indicator set to ON when the line-in of the Zone Player is connected | PLAY5, Five, Era100, Era300, CONNECT, CONNECTAMP, PLAYBAR, PLAYBASE, Beam, Port |
|
||||||
| analoglinein | Switch | R | Indicator set to ON when the analog line-in of the Zone Player is connected | Amp |
|
| analoglinein | Switch | R | Indicator set to ON when the analog line-in of the Zone Player is connected | Amp |
|
||||||
| digitallinein | Switch | R | Indicator set to ON when the digital line-in of the Zone Player is connected | Amp |
|
| digitallinein | Switch | R | Indicator set to ON when the digital line-in of the Zone Player is connected | Amp |
|
||||||
| localcoordinator | Switch | R | Indicator set to ON if the this Zone Player is the Zone Group Coordinator | all |
|
| localcoordinator | Switch | R | Indicator set to ON if the this Zone Player is the Zone Group Coordinator | all |
|
||||||
| loudness | Switch | RW | Enable or disable the loudness | all |
|
| loudness | Switch | RW | Enable or disable the loudness | all |
|
||||||
| microphone | Switch | R | Indicator set to ON when the microphone is enabled | Arc, Beam, Move, One, Roam |
|
| microphone | Switch | R | Indicator set to ON when the microphone is enabled | Arc, Beam, Move, One, Roam, Era100, Era300 |
|
||||||
| mute | Switch | RW | Set or get the mute state of the master volume of the Zone Player | all |
|
| mute | Switch | RW | Set or get the mute state of the master volume of the Zone Player | all |
|
||||||
| nightmode | Switch | RW | Enable or disable the night mode feature | PLAYBAR, PLAYBASE, Beam, Amp |
|
| nightmode | Switch | RW | Enable or disable the night mode feature | PLAYBAR, PLAYBASE, Beam, Amp |
|
||||||
| notificationsound | String | W | Play a notification sound by a given URI | all |
|
| notificationsound | String | W | Play a notification sound by a given URI | all |
|
||||||
|
|||||||
@@ -53,12 +53,14 @@ public class SonosBindingConstants {
|
|||||||
public static final ThingTypeUID MOVE_THING_TYPE_UID = new ThingTypeUID(BINDING_ID, "Move");
|
public static final ThingTypeUID MOVE_THING_TYPE_UID = new ThingTypeUID(BINDING_ID, "Move");
|
||||||
public static final ThingTypeUID ROAM_THING_TYPE_UID = new ThingTypeUID(BINDING_ID, "Roam");
|
public static final ThingTypeUID ROAM_THING_TYPE_UID = new ThingTypeUID(BINDING_ID, "Roam");
|
||||||
public static final ThingTypeUID ROAM_SL_THING_TYPE_UID = new ThingTypeUID(BINDING_ID, "RoamSL");
|
public static final ThingTypeUID ROAM_SL_THING_TYPE_UID = new ThingTypeUID(BINDING_ID, "RoamSL");
|
||||||
|
public static final ThingTypeUID ERA_100_THING_TYPE_UID = new ThingTypeUID(BINDING_ID, "Era100");
|
||||||
|
public static final ThingTypeUID ERA_300_THING_TYPE_UID = new ThingTypeUID(BINDING_ID, "Era300");
|
||||||
public static final ThingTypeUID ZONEPLAYER_THING_TYPE_UID = new ThingTypeUID(BINDING_ID, "zoneplayer");
|
public static final ThingTypeUID ZONEPLAYER_THING_TYPE_UID = new ThingTypeUID(BINDING_ID, "zoneplayer");
|
||||||
|
|
||||||
public static final Set<ThingTypeUID> WITH_LINEIN_THING_TYPES_UIDS = Set.of(PLAY5_THING_TYPE_UID,
|
public static final Set<ThingTypeUID> WITH_LINEIN_THING_TYPES_UIDS = Set.of(PLAY5_THING_TYPE_UID,
|
||||||
FIVE_THING_TYPE_UID, PLAYBAR_THING_TYPE_UID, PLAYBASE_THING_TYPE_UID, BEAM_THING_TYPE_UID,
|
FIVE_THING_TYPE_UID, PLAYBAR_THING_TYPE_UID, PLAYBASE_THING_TYPE_UID, BEAM_THING_TYPE_UID,
|
||||||
CONNECT_THING_TYPE_UID, CONNECTAMP_THING_TYPE_UID, PORT_THING_TYPE_UID, ARC_THING_TYPE_UID,
|
CONNECT_THING_TYPE_UID, CONNECTAMP_THING_TYPE_UID, PORT_THING_TYPE_UID, ARC_THING_TYPE_UID,
|
||||||
ARC_SL_THING_TYPE_UID);
|
ARC_SL_THING_TYPE_UID, ERA_100_THING_TYPE_UID, ERA_300_THING_TYPE_UID);
|
||||||
|
|
||||||
public static final Set<ThingTypeUID> WITH_ANALOG_LINEIN_THING_TYPES_UIDS = Set.of(AMP_THING_TYPE_UID);
|
public static final Set<ThingTypeUID> WITH_ANALOG_LINEIN_THING_TYPES_UIDS = Set.of(AMP_THING_TYPE_UID);
|
||||||
|
|
||||||
@@ -69,7 +71,7 @@ public class SonosBindingConstants {
|
|||||||
FIVE_THING_TYPE_UID, PLAYBAR_THING_TYPE_UID, PLAYBASE_THING_TYPE_UID, BEAM_THING_TYPE_UID,
|
FIVE_THING_TYPE_UID, PLAYBAR_THING_TYPE_UID, PLAYBASE_THING_TYPE_UID, BEAM_THING_TYPE_UID,
|
||||||
CONNECT_THING_TYPE_UID, CONNECTAMP_THING_TYPE_UID, PORT_THING_TYPE_UID, AMP_THING_TYPE_UID,
|
CONNECT_THING_TYPE_UID, CONNECTAMP_THING_TYPE_UID, PORT_THING_TYPE_UID, AMP_THING_TYPE_UID,
|
||||||
SYMFONISK_THING_TYPE_UID, ARC_THING_TYPE_UID, ARC_SL_THING_TYPE_UID, MOVE_THING_TYPE_UID,
|
SYMFONISK_THING_TYPE_UID, ARC_THING_TYPE_UID, ARC_SL_THING_TYPE_UID, MOVE_THING_TYPE_UID,
|
||||||
ROAM_THING_TYPE_UID, ROAM_SL_THING_TYPE_UID);
|
ROAM_THING_TYPE_UID, ROAM_SL_THING_TYPE_UID, ERA_100_THING_TYPE_UID, ERA_300_THING_TYPE_UID);
|
||||||
|
|
||||||
public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = new HashSet<>(SUPPORTED_KNOWN_THING_TYPES_UIDS);
|
public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = new HashSet<>(SUPPORTED_KNOWN_THING_TYPES_UIDS);
|
||||||
static {
|
static {
|
||||||
|
|||||||
@@ -24,6 +24,10 @@ thing-type.sonos.CONNECT.label = CONNECT
|
|||||||
thing-type.sonos.CONNECT.description = Represents SONOS CONNECT connector
|
thing-type.sonos.CONNECT.description = Represents SONOS CONNECT connector
|
||||||
thing-type.sonos.CONNECTAMP.label = CONNECT AMP
|
thing-type.sonos.CONNECTAMP.label = CONNECT AMP
|
||||||
thing-type.sonos.CONNECTAMP.description = Represents SONOS CONNECT:AMP amplifier
|
thing-type.sonos.CONNECTAMP.description = Represents SONOS CONNECT:AMP amplifier
|
||||||
|
thing-type.sonos.Era100.label = Era 100
|
||||||
|
thing-type.sonos.Era100.description = Represents SONOS Era 100 speaker
|
||||||
|
thing-type.sonos.Era300.label = Era 300
|
||||||
|
thing-type.sonos.Era300.description = Represents SONOS Era 300 speaker
|
||||||
thing-type.sonos.Five.label = Five
|
thing-type.sonos.Five.label = Five
|
||||||
thing-type.sonos.Five.description = Represents SONOS Five speaker
|
thing-type.sonos.Five.description = Represents SONOS Five speaker
|
||||||
thing-type.sonos.Move.label = Move
|
thing-type.sonos.Move.label = Move
|
||||||
|
|||||||
@@ -0,0 +1,73 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<thing:thing-descriptions bindingId="sonos"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xmlns:thing="https://openhab.org/schemas/thing-description/v1.0.0"
|
||||||
|
xsi:schemaLocation="https://openhab.org/schemas/thing-description/v1.0.0 https://openhab.org/schemas/thing-description-1.0.0.xsd">
|
||||||
|
|
||||||
|
<!-- Player Era 100 Thing Type -->
|
||||||
|
<thing-type id="Era100" listed="false">
|
||||||
|
<label>Era 100</label>
|
||||||
|
<description>Represents SONOS Era 100 speaker</description>
|
||||||
|
|
||||||
|
<channels>
|
||||||
|
<channel id="add" typeId="add"/>
|
||||||
|
<channel id="alarm" typeId="alarm"/>
|
||||||
|
<channel id="alarmproperties" typeId="alarmproperties"/>
|
||||||
|
<channel id="alarmrunning" typeId="alarmrunning"/>
|
||||||
|
<channel id="bass" typeId="bass"/>
|
||||||
|
<channel id="control" typeId="system.media-control"/>
|
||||||
|
<channel id="currentalbum" typeId="currentalbum"/>
|
||||||
|
<channel id="currentalbumart" typeId="currentalbumart"/>
|
||||||
|
<channel id="currentalbumarturl" typeId="currentalbumarturl"/>
|
||||||
|
<channel id="currentartist" typeId="system.media-artist"/>
|
||||||
|
<channel id="currenttitle" typeId="system.media-title"/>
|
||||||
|
<channel id="currenttrack" typeId="currenttrack"/>
|
||||||
|
<channel id="shuffle" typeId="shuffle"/>
|
||||||
|
<channel id="repeat" typeId="repeat"/>
|
||||||
|
<channel id="favorite" typeId="favorite"/>
|
||||||
|
<channel id="led" typeId="led"/>
|
||||||
|
<channel id="localcoordinator" typeId="localcoordinator"/>
|
||||||
|
<channel id="loudness" typeId="loudness"/>
|
||||||
|
<channel id="mute" typeId="system.mute"/>
|
||||||
|
<channel id="notificationsound" typeId="notificationsound"/>
|
||||||
|
<channel id="playlist" typeId="playlist"/>
|
||||||
|
<channel id="clearqueue" typeId="clearqueue"/>
|
||||||
|
<channel id="playlinein" typeId="playlinein"/>
|
||||||
|
<channel id="playqueue" typeId="playqueue"/>
|
||||||
|
<channel id="playtrack" typeId="playtrack"/>
|
||||||
|
<channel id="playuri" typeId="playuri"/>
|
||||||
|
<channel id="publicaddress" typeId="publicaddress"/>
|
||||||
|
<channel id="radio" typeId="radio"/>
|
||||||
|
<channel id="remove" typeId="remove"/>
|
||||||
|
<channel id="restore" typeId="restore"/>
|
||||||
|
<channel id="restoreall" typeId="restoreall"/>
|
||||||
|
<channel id="save" typeId="save"/>
|
||||||
|
<channel id="saveall" typeId="saveall"/>
|
||||||
|
<channel id="snooze" typeId="snooze"/>
|
||||||
|
<channel id="standalone" typeId="standalone"/>
|
||||||
|
<channel id="state" typeId="state"/>
|
||||||
|
<channel id="stop" typeId="stop"/>
|
||||||
|
<channel id="treble" typeId="treble"/>
|
||||||
|
<channel id="tuneinstationid" typeId="tuneinstationid"/>
|
||||||
|
<channel id="volume" typeId="system.volume"/>
|
||||||
|
<channel id="zonegroupid" typeId="zonegroupid"/>
|
||||||
|
<channel id="zonename" typeId="zonename"/>
|
||||||
|
<channel id="coordinator" typeId="coordinator"/>
|
||||||
|
<channel id="sleeptimer" typeId="sleeptimer"/>
|
||||||
|
<channel id="currenttransporturi" typeId="currenttransporturi"/>
|
||||||
|
<channel id="currenttrackuri" typeId="currenttrackuri"/>
|
||||||
|
<!-- Extended SONOS channels -->
|
||||||
|
<channel id="linein" typeId="linein"/>
|
||||||
|
<channel id="microphone" typeId="microphone"/>
|
||||||
|
</channels>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<property name="vendor">SONOS</property>
|
||||||
|
<property name="modelId">Era 100</property>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<representation-property>udn</representation-property>
|
||||||
|
|
||||||
|
<config-description-ref uri="thing-type:sonos:zoneplayer"/>
|
||||||
|
</thing-type>
|
||||||
|
</thing:thing-descriptions>
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<thing:thing-descriptions bindingId="sonos"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xmlns:thing="https://openhab.org/schemas/thing-description/v1.0.0"
|
||||||
|
xsi:schemaLocation="https://openhab.org/schemas/thing-description/v1.0.0 https://openhab.org/schemas/thing-description-1.0.0.xsd">
|
||||||
|
|
||||||
|
<!-- Player Era 300 Thing Type -->
|
||||||
|
<thing-type id="Era300" listed="false">
|
||||||
|
<label>Era 300</label>
|
||||||
|
<description>Represents SONOS Era 300 speaker</description>
|
||||||
|
|
||||||
|
<channels>
|
||||||
|
<channel id="add" typeId="add"/>
|
||||||
|
<channel id="alarm" typeId="alarm"/>
|
||||||
|
<channel id="alarmproperties" typeId="alarmproperties"/>
|
||||||
|
<channel id="alarmrunning" typeId="alarmrunning"/>
|
||||||
|
<channel id="bass" typeId="bass"/>
|
||||||
|
<channel id="control" typeId="system.media-control"/>
|
||||||
|
<channel id="currentalbum" typeId="currentalbum"/>
|
||||||
|
<channel id="currentalbumart" typeId="currentalbumart"/>
|
||||||
|
<channel id="currentalbumarturl" typeId="currentalbumarturl"/>
|
||||||
|
<channel id="currentartist" typeId="system.media-artist"/>
|
||||||
|
<channel id="currenttitle" typeId="system.media-title"/>
|
||||||
|
<channel id="currenttrack" typeId="currenttrack"/>
|
||||||
|
<channel id="shuffle" typeId="shuffle"/>
|
||||||
|
<channel id="repeat" typeId="repeat"/>
|
||||||
|
<channel id="favorite" typeId="favorite"/>
|
||||||
|
<channel id="led" typeId="led"/>
|
||||||
|
<channel id="localcoordinator" typeId="localcoordinator"/>
|
||||||
|
<channel id="loudness" typeId="loudness"/>
|
||||||
|
<channel id="mute" typeId="system.mute"/>
|
||||||
|
<channel id="notificationsound" typeId="notificationsound"/>
|
||||||
|
<channel id="playlist" typeId="playlist"/>
|
||||||
|
<channel id="clearqueue" typeId="clearqueue"/>
|
||||||
|
<channel id="playlinein" typeId="playlinein"/>
|
||||||
|
<channel id="playqueue" typeId="playqueue"/>
|
||||||
|
<channel id="playtrack" typeId="playtrack"/>
|
||||||
|
<channel id="playuri" typeId="playuri"/>
|
||||||
|
<channel id="publicaddress" typeId="publicaddress"/>
|
||||||
|
<channel id="radio" typeId="radio"/>
|
||||||
|
<channel id="remove" typeId="remove"/>
|
||||||
|
<channel id="restore" typeId="restore"/>
|
||||||
|
<channel id="restoreall" typeId="restoreall"/>
|
||||||
|
<channel id="save" typeId="save"/>
|
||||||
|
<channel id="saveall" typeId="saveall"/>
|
||||||
|
<channel id="snooze" typeId="snooze"/>
|
||||||
|
<channel id="standalone" typeId="standalone"/>
|
||||||
|
<channel id="state" typeId="state"/>
|
||||||
|
<channel id="stop" typeId="stop"/>
|
||||||
|
<channel id="treble" typeId="treble"/>
|
||||||
|
<channel id="tuneinstationid" typeId="tuneinstationid"/>
|
||||||
|
<channel id="volume" typeId="system.volume"/>
|
||||||
|
<channel id="zonegroupid" typeId="zonegroupid"/>
|
||||||
|
<channel id="zonename" typeId="zonename"/>
|
||||||
|
<channel id="coordinator" typeId="coordinator"/>
|
||||||
|
<channel id="sleeptimer" typeId="sleeptimer"/>
|
||||||
|
<channel id="currenttransporturi" typeId="currenttransporturi"/>
|
||||||
|
<channel id="currenttrackuri" typeId="currenttrackuri"/>
|
||||||
|
<!-- Extended SONOS channels -->
|
||||||
|
<channel id="linein" typeId="linein"/>
|
||||||
|
<channel id="microphone" typeId="microphone"/>
|
||||||
|
</channels>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<property name="vendor">SONOS</property>
|
||||||
|
<property name="modelId">Era 300</property>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<representation-property>udn</representation-property>
|
||||||
|
|
||||||
|
<config-description-ref uri="thing-type:sonos:zoneplayer"/>
|
||||||
|
</thing-type>
|
||||||
|
</thing:thing-descriptions>
|
||||||
Reference in New Issue
Block a user