From cb1f933e96141fb5e2ec4ca10982ce5f8dcec324 Mon Sep 17 00:00:00 2001 From: Christoph Weitkamp Date: Wed, 28 Oct 2020 00:32:09 +0100 Subject: [PATCH] Added representation property for deCONZ Gateway (#8879) Signed-off-by: Christoph Weitkamp --- .../org/openhab/binding/deconz/internal/BindingConstants.java | 1 + .../deconz/internal/discovery/BridgeDiscoveryParticipant.java | 3 ++- .../src/main/resources/OH-INF/thing/thing-types.xml | 4 +++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/bundles/org.openhab.binding.deconz/src/main/java/org/openhab/binding/deconz/internal/BindingConstants.java b/bundles/org.openhab.binding.deconz/src/main/java/org/openhab/binding/deconz/internal/BindingConstants.java index 5b461e9078f..3edf3a01a1d 100644 --- a/bundles/org.openhab.binding.deconz/src/main/java/org/openhab/binding/deconz/internal/BindingConstants.java +++ b/bundles/org.openhab.binding.deconz/src/main/java/org/openhab/binding/deconz/internal/BindingConstants.java @@ -109,6 +109,7 @@ public class BindingConstants { public static final String CONFIG_HOST = "host"; public static final String CONFIG_HTTP_PORT = "httpPort"; public static final String CONFIG_APIKEY = "apikey"; + public static final String PROPERTY_UDN = "UDN"; public static final String UNIQUE_ID = "uid"; diff --git a/bundles/org.openhab.binding.deconz/src/main/java/org/openhab/binding/deconz/internal/discovery/BridgeDiscoveryParticipant.java b/bundles/org.openhab.binding.deconz/src/main/java/org/openhab/binding/deconz/internal/discovery/BridgeDiscoveryParticipant.java index dc946a268a6..bcaf26a0610 100644 --- a/bundles/org.openhab.binding.deconz/src/main/java/org/openhab/binding/deconz/internal/discovery/BridgeDiscoveryParticipant.java +++ b/bundles/org.openhab.binding.deconz/src/main/java/org/openhab/binding/deconz/internal/discovery/BridgeDiscoveryParticipant.java @@ -73,9 +73,10 @@ public class BridgeDiscoveryParticipant implements UpnpDiscoveryParticipant { properties.put(CONFIG_HOST, host); properties.put(CONFIG_HTTP_PORT, port); + properties.put(PROPERTY_UDN, UDN); return DiscoveryResultBuilder.create(uid).withProperties(properties).withLabel(name) - .withRepresentationProperty(UDN).build(); + .withRepresentationProperty(PROPERTY_UDN).build(); } @Override diff --git a/bundles/org.openhab.binding.deconz/src/main/resources/OH-INF/thing/thing-types.xml b/bundles/org.openhab.binding.deconz/src/main/resources/OH-INF/thing/thing-types.xml index 8262f6b4cd0..4d8c63f9ca4 100644 --- a/bundles/org.openhab.binding.deconz/src/main/resources/OH-INF/thing/thing-types.xml +++ b/bundles/org.openhab.binding.deconz/src/main/resources/OH-INF/thing/thing-types.xml @@ -6,7 +6,9 @@ - A running deCONZ software instance + A running deCONZ software instance. + + UDN