From 74552420bae66eef271a844d96660f180e3a7617 Mon Sep 17 00:00:00 2001 From: Lars Finander Date: Tue, 14 Mar 2017 19:28:15 -0600 Subject: [PATCH 1/3] Hue: Re-add Hue bridge if deleted -Add Hue Bridge if missing during deviceSync --- smartapps/smartthings/hue-connect.src/hue-connect.groovy | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/smartapps/smartthings/hue-connect.src/hue-connect.groovy b/smartapps/smartthings/hue-connect.src/hue-connect.groovy index 047a8dd..26128be 100644 --- a/smartapps/smartthings/hue-connect.src/hue-connect.groovy +++ b/smartapps/smartthings/hue-connect.src/hue-connect.groovy @@ -472,8 +472,6 @@ def addBridge() { log.error "Failed to create Hue Bridge device" } } - } else { - log.debug "found ${d.displayName} with id $selectedHue already exists" } } } @@ -715,6 +713,9 @@ def doDeviceSync(){ log.warn "state.updating failed to clear" } + if (selectedHue) { + addBridge() + } convertBulbListToMap() poll() ssdpSubscribe() From 65f5597ccc66028af01f38ddde8db42f6f6246da Mon Sep 17 00:00:00 2001 From: Vinay Rao Date: Tue, 14 Mar 2017 21:00:22 -0700 Subject: [PATCH 2/3] Revert "Hue: Re-add Hue bridge if deleted" --- smartapps/smartthings/hue-connect.src/hue-connect.groovy | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/smartapps/smartthings/hue-connect.src/hue-connect.groovy b/smartapps/smartthings/hue-connect.src/hue-connect.groovy index 26128be..047a8dd 100644 --- a/smartapps/smartthings/hue-connect.src/hue-connect.groovy +++ b/smartapps/smartthings/hue-connect.src/hue-connect.groovy @@ -472,6 +472,8 @@ def addBridge() { log.error "Failed to create Hue Bridge device" } } + } else { + log.debug "found ${d.displayName} with id $selectedHue already exists" } } } @@ -713,9 +715,6 @@ def doDeviceSync(){ log.warn "state.updating failed to clear" } - if (selectedHue) { - addBridge() - } convertBulbListToMap() poll() ssdpSubscribe() From 0f00c3c7c060bdaceb6d35e2d6f1d80b12eec51b Mon Sep 17 00:00:00 2001 From: Vinay Rao Date: Thu, 16 Mar 2017 04:37:35 -0700 Subject: [PATCH 3/3] Revert "Revert "Hue: Re-add Hue bridge if deleted"" --- smartapps/smartthings/hue-connect.src/hue-connect.groovy | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/smartapps/smartthings/hue-connect.src/hue-connect.groovy b/smartapps/smartthings/hue-connect.src/hue-connect.groovy index 047a8dd..26128be 100644 --- a/smartapps/smartthings/hue-connect.src/hue-connect.groovy +++ b/smartapps/smartthings/hue-connect.src/hue-connect.groovy @@ -472,8 +472,6 @@ def addBridge() { log.error "Failed to create Hue Bridge device" } } - } else { - log.debug "found ${d.displayName} with id $selectedHue already exists" } } } @@ -715,6 +713,9 @@ def doDeviceSync(){ log.warn "state.updating failed to clear" } + if (selectedHue) { + addBridge() + } convertBulbListToMap() poll() ssdpSubscribe()