From 61e8b09bf4a69cee41380432501eb9cc2a8871c2 Mon Sep 17 00:00:00 2001 From: lolodomo Date: Tue, 27 Apr 2021 19:15:09 +0200 Subject: [PATCH] [sonos] Add support for Sonos Roam (#10596) Fix #10588 Signed-off-by: Laurent Garnier --- .../sonos/internal/SonosBindingConstants.java | 11 +-- .../src/main/resources/OH-INF/thing/Roam.xml | 70 +++++++++++++++++++ 2 files changed, 76 insertions(+), 5 deletions(-) create mode 100644 bundles/org.openhab.binding.sonos/src/main/resources/OH-INF/thing/Roam.xml diff --git a/bundles/org.openhab.binding.sonos/src/main/java/org/openhab/binding/sonos/internal/SonosBindingConstants.java b/bundles/org.openhab.binding.sonos/src/main/java/org/openhab/binding/sonos/internal/SonosBindingConstants.java index 66797f1a0c7..bdde548775f 100644 --- a/bundles/org.openhab.binding.sonos/src/main/java/org/openhab/binding/sonos/internal/SonosBindingConstants.java +++ b/bundles/org.openhab.binding.sonos/src/main/java/org/openhab/binding/sonos/internal/SonosBindingConstants.java @@ -52,6 +52,7 @@ public class SonosBindingConstants { public static final ThingTypeUID ARC_THING_TYPE_UID = new ThingTypeUID(BINDING_ID, "Arc"); public static final ThingTypeUID ARC_SL_THING_TYPE_UID = new ThingTypeUID(BINDING_ID, "ArcSL"); 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 ZONEPLAYER_THING_TYPE_UID = new ThingTypeUID(BINDING_ID, "zoneplayer"); public static final Set WITH_LINEIN_THING_TYPES_UIDS = Stream.of(PLAY5_THING_TYPE_UID, @@ -65,11 +66,11 @@ public class SonosBindingConstants { public static final Set WITH_DIGITAL_LINEIN_THING_TYPES_UIDS = Stream.of(AMP_THING_TYPE_UID) .collect(Collectors.toSet()); - public static final Set SUPPORTED_KNOWN_THING_TYPES_UIDS = Stream - .of(ONE_THING_TYPE_UID, ONE_SL_THING_TYPE_UID, PLAY1_THING_TYPE_UID, PLAY3_THING_TYPE_UID, - PLAY5_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, - SYMFONISK_THING_TYPE_UID, ARC_THING_TYPE_UID, ARC_SL_THING_TYPE_UID, MOVE_THING_TYPE_UID) + public static final Set SUPPORTED_KNOWN_THING_TYPES_UIDS = Stream.of(ONE_THING_TYPE_UID, + ONE_SL_THING_TYPE_UID, PLAY1_THING_TYPE_UID, PLAY3_THING_TYPE_UID, PLAY5_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, SYMFONISK_THING_TYPE_UID, + ARC_THING_TYPE_UID, ARC_SL_THING_TYPE_UID, MOVE_THING_TYPE_UID, ROAM_THING_TYPE_UID) .collect(Collectors.toSet()); public static final Set SUPPORTED_THING_TYPES_UIDS = new HashSet<>(SUPPORTED_KNOWN_THING_TYPES_UIDS); diff --git a/bundles/org.openhab.binding.sonos/src/main/resources/OH-INF/thing/Roam.xml b/bundles/org.openhab.binding.sonos/src/main/resources/OH-INF/thing/Roam.xml new file mode 100644 index 00000000000..01ad16f27ec --- /dev/null +++ b/bundles/org.openhab.binding.sonos/src/main/resources/OH-INF/thing/Roam.xml @@ -0,0 +1,70 @@ + + + + + + + Represents SONOS Roam speaker + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SONOS + Roam + + + udn + + + +