From 8eab57c34f9eefeb8ed23b9ead8b826965c34d93 Mon Sep 17 00:00:00 2001 From: Bob A Date: Thu, 23 Apr 2020 16:00:04 -0400 Subject: [PATCH] [lutron] Ignore Connect Bridge mDNS discovery (#7455) Signed-off-by: Bob Adair --- .../discovery/LutronMdnsBridgeDiscoveryService.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bundles/org.openhab.binding.lutron/src/main/java/org/openhab/binding/lutron/internal/discovery/LutronMdnsBridgeDiscoveryService.java b/bundles/org.openhab.binding.lutron/src/main/java/org/openhab/binding/lutron/internal/discovery/LutronMdnsBridgeDiscoveryService.java index cd97445587551..bd32656db04ff 100644 --- a/bundles/org.openhab.binding.lutron/src/main/java/org/openhab/binding/lutron/internal/discovery/LutronMdnsBridgeDiscoveryService.java +++ b/bundles/org.openhab.binding.lutron/src/main/java/org/openhab/binding/lutron/internal/discovery/LutronMdnsBridgeDiscoveryService.java @@ -56,6 +56,7 @@ public class LutronMdnsBridgeDiscoveryService implements MDNSDiscoveryParticipan private static final String PRODFAM_RA2_SELECT = "RA2 Select"; private static final String PRODTYP_RA2_SELECT = "Main Repeater"; private static final String DEVCLASS_RA2_SELECT = "080E0401"; + private static final String DEVCLASS_CONNECT_BRIDGE = "08090301"; private static final String DEFAULT_LABEL = "Unknown Lutron bridge"; private static final Pattern HOSTNAME_REGEX = Pattern.compile("lutron-([0-9a-f]+)\\."); // ex: lutron-01f1529a.local @@ -107,14 +108,17 @@ public String getServiceType() { String bridgeHostName = ipAddresses[0].getHostName(); logger.debug("Lutron mDNS bridge hostname: {}", bridgeHostName); - if (devclass != null && devclass.equals(DEVCLASS_CASETA_SBP2)) { + if (DEVCLASS_CASETA_SBP2.equals(devclass)) { properties.put(PROPERTY_PRODFAM, PRODFAM_CASETA); properties.put(PROPERTY_PRODTYP, PRODTYP_CASETA_SBP2); label = PRODFAM_CASETA + " " + PRODTYP_CASETA_SBP2; - } else if (devclass != null && devclass.equals(DEVCLASS_RA2_SELECT)) { + } else if (DEVCLASS_RA2_SELECT.equals(devclass)) { properties.put(PROPERTY_PRODFAM, PRODFAM_RA2_SELECT); properties.put(PROPERTY_PRODTYP, PRODTYP_RA2_SELECT); label = PRODFAM_RA2_SELECT + " " + PRODTYP_RA2_SELECT; + } else if (DEVCLASS_CONNECT_BRIDGE.equals(devclass)) { + logger.debug("Lutron Connect Bridge discovered. Ignoring."); + return null; } else { logger.info("Lutron device with unknown DEVCLASS discovered via mDNS: {}. Configure device manually.", devclass);