]> git.basschouten.com Git - openhab-addons.git/commitdiff
[magentatv] Fix port on MR400 discovery (reports 49153, has to be 49152) (#9421)
authorMarkus Michels <markus7017@gmail.com>
Fri, 18 Dec 2020 20:32:09 +0000 (21:32 +0100)
committerGitHub <noreply@github.com>
Fri, 18 Dec 2020 20:32:09 +0000 (12:32 -0800)
Signed-off-by: Markus Michels <markus7017@gmail.com>
bundles/org.openhab.binding.magentatv/src/main/java/org/openhab/binding/magentatv/internal/discovery/MagentaTVDiscoveryParticipant.java

index 461c033204b1bddebacdb4e118ff14c620b8c0a6..c20e9884450f8b631fdfbd86964c228d9e7283a2 100644 (file)
@@ -74,6 +74,9 @@ public class MagentaTVDiscoveryParticipant implements UpnpDiscoveryParticipant {
                         .substring(device.getIdentity().getUdn().getIdentifierString().length() - 12);
                 String mac = hex.substring(0, 2) + ":" + hex.substring(2, 4) + ":" + hex.substring(4, 6) + ":"
                         + hex.substring(6, 8) + ":" + hex.substring(8, 10) + ":" + hex.substring(10, 12);
+                if (port.equals("49153")) { // MR400 reports the rong
+                    port = MR400_DEF_REMOTE_PORT;
+                }
                 properties.put(PROPERTY_VENDOR, VENDOR + "(" + manufacturer + ")");
                 properties.put(PROPERTY_MODEL_ID, modelName);
                 properties.put(PROPERTY_HARDWARE_VERSION, device.getDetails().getModelDetails().getModelNumber());