]> git.basschouten.com Git - openhab-addons.git/commitdiff
[hue] Fix NUPnP discovery (#14871)
authorJacob Laursen <jacob-github@vindvejr.dk>
Sat, 22 Apr 2023 20:42:35 +0000 (22:42 +0200)
committerGitHub <noreply@github.com>
Sat, 22 Apr 2023 20:42:35 +0000 (22:42 +0200)
* Fix NUPnP discovery

Fixes #14852

* Declare hybrid connection due to cloud discovery

---------

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
bundles/org.openhab.binding.hue/src/main/java/org/openhab/binding/hue/internal/discovery/HueBridgeNupnpDiscovery.java
bundles/org.openhab.binding.hue/src/main/resources/OH-INF/addon/addon.xml
itests/org.openhab.binding.hue.tests/src/main/java/org/openhab/binding/hue/internal/discovery/HueBridgeNupnpDiscoveryOSGITest.java

index 45cf01272a8814df958eb4c7a975d212daf9ae2e..5adcc716b074f0bcac7435d046257520194b7c50 100644 (file)
@@ -49,7 +49,7 @@ import com.google.gson.reflect.TypeToken;
 @NonNullByDefault
 public class HueBridgeNupnpDiscovery extends AbstractDiscoveryService {
 
-    private static final String MODEL_NAME_PHILIPS_HUE = "\"name\":\"Philips Hue\"";
+    private static final String MODEL_NAME_PHILIPS_HUE = "\"name\":\"Philips hue\"";
     protected static final String BRIDGE_INDICATOR = "fffe";
     private static final String DISCOVERY_URL = "https://discovery.meethue.com/";
     protected static final String LABEL_PATTERN = "Philips Hue (%s)";
index da2b5ff59c1b1dab2a3ad8d603de33770de55ca7..15d1023faf0b1d2d7b05fecdab26344f3c058da6 100644 (file)
@@ -6,6 +6,6 @@
        <type>binding</type>
        <name>Hue Binding</name>
        <description>The Hue Binding integrates the Philips Hue system. It allows to control Hue bulbs.</description>
-       <connection>local</connection>
+       <connection>hybrid</connection>
 
 </addon:addon>
index 2540e942200d05bdccc330269c7a6a1c091990a8..5d9ceb18da8833182d910ea85e048029eb42ba53 100644 (file)
@@ -57,7 +57,7 @@ public class HueBridgeNupnpDiscoveryOSGITest extends JavaOSGiTest {
     final String validBridgeDiscoveryResult = "[{\"id\":\"" + sn1 + "\",\"internalipaddress\":" + ip1 + "},{\"id\":\""
             + sn2 + "\",\"internalipaddress\":" + ip2 + "}]";
     String discoveryResult;
-    String expBridgeDescription = "{\"name\":\"Philips Hue\",\"datastoreversion\":\"113\",\"swversion\":\"1948086000\",\"apiversion\":\"1.48.0\",\"mac\":\"00:11:22:33:44\",\"bridgeid\":\"$SN\",\"factorynew\":false,\"replacesbridgeid\":null,\"modelid\":\"BSB002\",\"starterkitid\":\"\"}";
+    String expBridgeDescription = "{\"name\":\"Philips hue\",\"datastoreversion\":\"149\",\"swversion\":\"1957113050\",\"apiversion\":\"1.57.0\",\"mac\":\"00:11:22:33:44\",\"bridgeid\":\"$SN\",\"factorynew\":false,\"replacesbridgeid\":null,\"modelid\":\"BSB002\",\"starterkitid\":\"\"}";
 
     private void checkDiscoveryResult(DiscoveryResult result, String expIp, String expSn) {
         assertThat(result.getBridgeUID(), nullValue());