From 235e3f5507166385083d2266582e8af18145eed8 Mon Sep 17 00:00:00 2001 From: Michael Hudson Date: Tue, 12 Apr 2016 18:23:28 -0600 Subject: [PATCH 1/4] Added fingerprint for NYCE door hinge sensor --- .../nyce-open-closed-sensor.src/nyce-open-closed-sensor.groovy | 1 + 1 file changed, 1 insertion(+) diff --git a/devicetypes/smartthings/nyce-open-closed-sensor.src/nyce-open-closed-sensor.groovy b/devicetypes/smartthings/nyce-open-closed-sensor.src/nyce-open-closed-sensor.groovy index 00428f6..eef9273 100644 --- a/devicetypes/smartthings/nyce-open-closed-sensor.src/nyce-open-closed-sensor.groovy +++ b/devicetypes/smartthings/nyce-open-closed-sensor.src/nyce-open-closed-sensor.groovy @@ -24,6 +24,7 @@ metadata { command "enrollResponse" + fingerprint inClusters: "0000,0001,0003,0500,0020", manufacturer: "NYCE", model: "3010", deviceJoinName: "NYCE Door Hinge Sensor" fingerprint inClusters: "0000,0001,0003,0406,0500,0020", manufacturer: "NYCE", model: "3011", deviceJoinName: "NYCE Door/Window Sensor" fingerprint inClusters: "0000,0001,0003,0500,0020", manufacturer: "NYCE", model: "3011", deviceJoinName: "NYCE Door/Window Sensor" fingerprint inClusters: "0000,0001,0003,0406,0500,0020", manufacturer: "NYCE", model: "3014", deviceJoinName: "NYCE Tilt Sensor" From 327f8dfb00f8265eccd40dca1a030212af641c16 Mon Sep 17 00:00:00 2001 From: Lars Finander Date: Tue, 19 Apr 2016 15:05:21 -0700 Subject: [PATCH 2/4] DVCSMP-1716 Philips Hue: Invalid hue parameter used in setColor -Replaced transition with transitiontime according to Hue API --- smartapps/smartthings/hue-connect.src/hue-connect.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/smartapps/smartthings/hue-connect.src/hue-connect.groovy b/smartapps/smartthings/hue-connect.src/hue-connect.groovy index 44ccdc0..6f6d6aa 100644 --- a/smartapps/smartthings/hue-connect.src/hue-connect.groovy +++ b/smartapps/smartthings/hue-connect.src/hue-connect.groovy @@ -824,7 +824,7 @@ def setColor(childDevice, huesettings) { value.bri = Math.min(Math.round(huesettings.level * 255 / 100), 255) } value.alert = huesettings.alert ? huesettings.alert : "none" - value.transition = huesettings.transition ? huesettings.transition : 4 + value.transitiontime = huesettings.transitiontime ? huesettings.transitiontime : 4 // Make sure to turn off light if requested if (huesettings.switch == "off") From 84de336a1a32780e0d71c89e729c86b344fb0e5f Mon Sep 17 00:00:00 2001 From: Luke Bredeson Date: Wed, 20 Apr 2016 16:07:11 -0500 Subject: [PATCH 3/4] SHARD-159: Wemo (Connect) updated() fails in certain IP change scenarios --- .../wemo-connect.src/wemo-connect.groovy | 99 +++++++++---------- 1 file changed, 48 insertions(+), 51 deletions(-) diff --git a/smartapps/smartthings/wemo-connect.src/wemo-connect.groovy b/smartapps/smartthings/wemo-connect.src/wemo-connect.groovy index af89807..35cbf4f 100644 --- a/smartapps/smartthings/wemo-connect.src/wemo-connect.groovy +++ b/smartapps/smartthings/wemo-connect.src/wemo-connect.groovy @@ -236,23 +236,22 @@ def addSwitches() { d = getChildDevices()?.find { it.deviceNetworkId == selectedSwitch.value.mac || it.device.getDataValue("mac") == selectedSwitch.value.mac } - } - - if (!d) { - log.debug "Creating WeMo Switch with dni: ${selectedSwitch.value.mac}" - d = addChildDevice("smartthings", "Wemo Switch", selectedSwitch.value.mac, selectedSwitch?.value.hub, [ - "label": selectedSwitch?.value?.name ?: "Wemo Switch", - "data": [ - "mac": selectedSwitch.value.mac, - "ip": selectedSwitch.value.ip, - "port": selectedSwitch.value.port - ] - ]) - def ipvalue = convertHexToIP(selectedSwitch.value.ip) - d.sendEvent(name: "currentIP", value: ipvalue, descriptionText: "IP is ${ipvalue}") - log.debug "Created ${d.displayName} with id: ${d.id}, dni: ${d.deviceNetworkId}" - } else { - log.debug "found ${d.displayName} with id $dni already exists" + if (!d) { + log.debug "Creating WeMo Switch with dni: ${selectedSwitch.value.mac}" + d = addChildDevice("smartthings", "Wemo Switch", selectedSwitch.value.mac, selectedSwitch?.value.hub, [ + "label": selectedSwitch?.value?.name ?: "Wemo Switch", + "data": [ + "mac": selectedSwitch.value.mac, + "ip": selectedSwitch.value.ip, + "port": selectedSwitch.value.port + ] + ]) + def ipvalue = convertHexToIP(selectedSwitch.value.ip) + d.sendEvent(name: "currentIP", value: ipvalue, descriptionText: "IP is ${ipvalue}") + log.debug "Created ${d.displayName} with id: ${d.id}, dni: ${d.deviceNetworkId}" + } else { + log.debug "found ${d.displayName} with id $dni already exists" + } } } } @@ -267,23 +266,22 @@ def addMotions() { d = getChildDevices()?.find { it.deviceNetworkId == selectedMotion.value.mac || it.device.getDataValue("mac") == selectedMotion.value.mac } - } - - if (!d) { - log.debug "Creating WeMo Motion with dni: ${selectedMotion.value.mac}" - d = addChildDevice("smartthings", "Wemo Motion", selectedMotion.value.mac, selectedMotion?.value.hub, [ - "label": selectedMotion?.value?.name ?: "Wemo Motion", - "data": [ - "mac": selectedMotion.value.mac, - "ip": selectedMotion.value.ip, - "port": selectedMotion.value.port - ] - ]) - def ipvalue = convertHexToIP(selectedMotion.value.ip) - d.sendEvent(name: "currentIP", value: ipvalue, descriptionText: "IP is ${ipvalue}") - log.debug "Created ${d.displayName} with id: ${d.id}, dni: ${d.deviceNetworkId}" - } else { - log.debug "found ${d.displayName} with id $dni already exists" + if (!d) { + log.debug "Creating WeMo Motion with dni: ${selectedMotion.value.mac}" + d = addChildDevice("smartthings", "Wemo Motion", selectedMotion.value.mac, selectedMotion?.value.hub, [ + "label": selectedMotion?.value?.name ?: "Wemo Motion", + "data": [ + "mac": selectedMotion.value.mac, + "ip": selectedMotion.value.ip, + "port": selectedMotion.value.port + ] + ]) + def ipvalue = convertHexToIP(selectedMotion.value.ip) + d.sendEvent(name: "currentIP", value: ipvalue, descriptionText: "IP is ${ipvalue}") + log.debug "Created ${d.displayName} with id: ${d.id}, dni: ${d.deviceNetworkId}" + } else { + log.debug "found ${d.displayName} with id $dni already exists" + } } } } @@ -298,23 +296,22 @@ def addLightSwitches() { d = getChildDevices()?.find { it.deviceNetworkId == selectedLightSwitch.value.mac || it.device.getDataValue("mac") == selectedLightSwitch.value.mac } - } - - if (!d) { - log.debug "Creating WeMo Light Switch with dni: ${selectedLightSwitch.value.mac}" - d = addChildDevice("smartthings", "Wemo Light Switch", selectedLightSwitch.value.mac, selectedLightSwitch?.value.hub, [ - "label": selectedLightSwitch?.value?.name ?: "Wemo Light Switch", - "data": [ - "mac": selectedLightSwitch.value.mac, - "ip": selectedLightSwitch.value.ip, - "port": selectedLightSwitch.value.port - ] - ]) - def ipvalue = convertHexToIP(selectedLightSwitch.value.ip) - d.sendEvent(name: "currentIP", value: ipvalue, descriptionText: "IP is ${ipvalue}") - log.debug "created ${d.displayName} with id $dni" - } else { - log.debug "found ${d.displayName} with id $dni already exists" + if (!d) { + log.debug "Creating WeMo Light Switch with dni: ${selectedLightSwitch.value.mac}" + d = addChildDevice("smartthings", "Wemo Light Switch", selectedLightSwitch.value.mac, selectedLightSwitch?.value.hub, [ + "label": selectedLightSwitch?.value?.name ?: "Wemo Light Switch", + "data": [ + "mac": selectedLightSwitch.value.mac, + "ip": selectedLightSwitch.value.ip, + "port": selectedLightSwitch.value.port + ] + ]) + def ipvalue = convertHexToIP(selectedLightSwitch.value.ip) + d.sendEvent(name: "currentIP", value: ipvalue, descriptionText: "IP is ${ipvalue}") + log.debug "created ${d.displayName} with id $dni" + } else { + log.debug "found ${d.displayName} with id $dni already exists" + } } } } From 481d13a5710f9a7e111eaa99dfbcbc4df18b3707 Mon Sep 17 00:00:00 2001 From: jackchi Date: Mon, 4 Apr 2016 11:46:28 -0700 Subject: [PATCH 4/4] [CHF-112] Add Health Check capability to SmartThings SmartSense products --- .../smartthings/smartpower-outlet.src/smartpower-outlet.groovy | 1 + .../smartsense-moisture-sensor.groovy | 1 + .../smartsense-motion-sensor.groovy | 1 + .../smartsense-multi-sensor.src/smartsense-multi-sensor.groovy | 1 + .../smartsense-open-closed-accelerometer-sensor.groovy | 3 ++- .../smartsense-temp-humidity-sensor.groovy | 1 + 6 files changed, 7 insertions(+), 1 deletion(-) diff --git a/devicetypes/smartthings/smartpower-outlet.src/smartpower-outlet.groovy b/devicetypes/smartthings/smartpower-outlet.src/smartpower-outlet.groovy index 176bcca..ec46979 100644 --- a/devicetypes/smartthings/smartpower-outlet.src/smartpower-outlet.groovy +++ b/devicetypes/smartthings/smartpower-outlet.src/smartpower-outlet.groovy @@ -31,6 +31,7 @@ metadata { capability "Configuration" capability "Refresh" capability "Sensor" + capability "Health Check" // indicates that device keeps track of heartbeat (in state.heartbeat) attribute "heartbeat", "string" diff --git a/devicetypes/smartthings/smartsense-moisture-sensor.src/smartsense-moisture-sensor.groovy b/devicetypes/smartthings/smartsense-moisture-sensor.src/smartsense-moisture-sensor.groovy index 599ba97..1dd3f72 100644 --- a/devicetypes/smartthings/smartsense-moisture-sensor.src/smartsense-moisture-sensor.groovy +++ b/devicetypes/smartthings/smartsense-moisture-sensor.src/smartsense-moisture-sensor.groovy @@ -31,6 +31,7 @@ metadata { capability "Refresh" capability "Temperature Measurement" capability "Water Sensor" + capability "Health Check" command "enrollResponse" diff --git a/devicetypes/smartthings/smartsense-motion-sensor.src/smartsense-motion-sensor.groovy b/devicetypes/smartthings/smartsense-motion-sensor.src/smartsense-motion-sensor.groovy index a840d48..78dd31f 100644 --- a/devicetypes/smartthings/smartsense-motion-sensor.src/smartsense-motion-sensor.groovy +++ b/devicetypes/smartthings/smartsense-motion-sensor.src/smartsense-motion-sensor.groovy @@ -31,6 +31,7 @@ metadata { capability "Battery" capability "Temperature Measurement" capability "Refresh" + capability "Health Check" command "enrollResponse" diff --git a/devicetypes/smartthings/smartsense-multi-sensor.src/smartsense-multi-sensor.groovy b/devicetypes/smartthings/smartsense-multi-sensor.src/smartsense-multi-sensor.groovy index 21d31b0..234ce9d 100644 --- a/devicetypes/smartthings/smartsense-multi-sensor.src/smartsense-multi-sensor.groovy +++ b/devicetypes/smartthings/smartsense-multi-sensor.src/smartsense-multi-sensor.groovy @@ -35,6 +35,7 @@ metadata { capability "Acceleration Sensor" capability "Refresh" capability "Temperature Measurement" + capability "Health Check" command "enrollResponse" fingerprint inClusters: "0000,0001,0003,0402,0500,0020,0B05,FC02", outClusters: "0019", manufacturer: "CentraLite", model: "3320" diff --git a/devicetypes/smartthings/smartsense-open-closed-accelerometer-sensor.src/smartsense-open-closed-accelerometer-sensor.groovy b/devicetypes/smartthings/smartsense-open-closed-accelerometer-sensor.src/smartsense-open-closed-accelerometer-sensor.groovy index 1e0daf6..9467bdc 100644 --- a/devicetypes/smartthings/smartsense-open-closed-accelerometer-sensor.src/smartsense-open-closed-accelerometer-sensor.groovy +++ b/devicetypes/smartthings/smartsense-open-closed-accelerometer-sensor.src/smartsense-open-closed-accelerometer-sensor.groovy @@ -23,8 +23,9 @@ capability "Acceleration Sensor" capability "Refresh" capability "Temperature Measurement" - command "enrollResponse" + capability "Health Check" + command "enrollResponse" } simulator { diff --git a/devicetypes/smartthings/smartsense-temp-humidity-sensor.src/smartsense-temp-humidity-sensor.groovy b/devicetypes/smartthings/smartsense-temp-humidity-sensor.src/smartsense-temp-humidity-sensor.groovy index 146df12..304dd78 100644 --- a/devicetypes/smartthings/smartsense-temp-humidity-sensor.src/smartsense-temp-humidity-sensor.groovy +++ b/devicetypes/smartthings/smartsense-temp-humidity-sensor.src/smartsense-temp-humidity-sensor.groovy @@ -20,6 +20,7 @@ metadata { capability "Refresh" capability "Temperature Measurement" capability "Relative Humidity Measurement" + capability "Health Check" fingerprint endpointId: "01", inClusters: "0001,0003,0020,0402,0B05,FC45", outClusters: "0019,0003" }