From ac4c3532876adef61141cac5fd0a88c4a85d4acb Mon Sep 17 00:00:00 2001 From: Parijat Das Date: Wed, 29 Mar 2017 10:43:02 -0700 Subject: [PATCH 1/5] Added health-check for Everspring Flood Sensor --- .../everspring-flood-sensor.src/.st-ignore | 2 + .../everspring-flood-sensor.src/README.md | 40 +++++++++++++++++++ .../everspring-flood-sensor.groovy | 3 ++ 3 files changed, 45 insertions(+) create mode 100644 devicetypes/smartthings/everspring-flood-sensor.src/.st-ignore create mode 100644 devicetypes/smartthings/everspring-flood-sensor.src/README.md diff --git a/devicetypes/smartthings/everspring-flood-sensor.src/.st-ignore b/devicetypes/smartthings/everspring-flood-sensor.src/.st-ignore new file mode 100644 index 0000000..71af75c --- /dev/null +++ b/devicetypes/smartthings/everspring-flood-sensor.src/.st-ignore @@ -0,0 +1,2 @@ +.st-ignore +README.md \ No newline at end of file diff --git a/devicetypes/smartthings/everspring-flood-sensor.src/README.md b/devicetypes/smartthings/everspring-flood-sensor.src/README.md new file mode 100644 index 0000000..b8e5bde --- /dev/null +++ b/devicetypes/smartthings/everspring-flood-sensor.src/README.md @@ -0,0 +1,40 @@ +# Everspring Flood Sensor + +Cloud Execution + +Works with: + +* [Everspring Water Detector](https://www.smartthings.com/works-with-smartthings/sensors/everspring-water-detector) + +## Table of contents + +* [Capabilities](#capabilities) +* [Health](#device-health) +* [Battery](#battery-specification) +* [Troubleshooting](#troubleshooting) + +## Capabilities + +* **Water Sensor** - can detect presence of water (dry or wet) +* **Configuration** - _configure()_ command called when device is installed or device preferences updated +* **Sensor** - detects sensor events +* **Battery** - defines device uses a battery +* **Health Check** - indicates ability to get device health notifications + +## Device Health + +Everspring Water Detector is a Z-wave sleepy device and wakes up every 4 hours. +Device-Watch allows 2 check-in misses from device plus some lag time. So Check-in interval = (2*4*60 + 2)mins = 482 mins. + +* __482min__ checkInterval + +## Battery Specification + +Three AA 1.5V batteries are required. + +## Troubleshooting + +If the device doesn't pair when trying from the SmartThings mobile app, it is possible that the device is out of range. +Pairing needs to be tried again by placing the device closer to the hub. +Instructions related to pairing, resetting and removing the device from SmartThings can be found in the following link: +* [Everspring Water Detector Troubleshooting Tips](https://support.smartthings.com/hc/en-us/articles/202088304-Everspring-Water-Detector) \ No newline at end of file diff --git a/devicetypes/smartthings/everspring-flood-sensor.src/everspring-flood-sensor.groovy b/devicetypes/smartthings/everspring-flood-sensor.src/everspring-flood-sensor.groovy index 3c72f29..29e1bf5 100644 --- a/devicetypes/smartthings/everspring-flood-sensor.src/everspring-flood-sensor.groovy +++ b/devicetypes/smartthings/everspring-flood-sensor.src/everspring-flood-sensor.groovy @@ -17,6 +17,7 @@ metadata { capability "Configuration" capability "Sensor" capability "Battery" + capability "Health Check" fingerprint deviceId: "0xA102", inClusters: "0x86,0x72,0x85,0x84,0x80,0x70,0x9C,0x20,0x71" } @@ -138,6 +139,8 @@ def zwaveEvent(physicalgraph.zwave.Command cmd) def configure() { + // Device wakes up every 4 hours, this interval allows us to miss one wakeup notification before marking offline + sendEvent(name: "checkInterval", value: 8 * 60 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID]) if (!device.currentState("battery")) { sendEvent(name: "battery", value:100, unit:"%", descriptionText:"(Default battery event)", displayed:false) } From f26b9ce6b2304312a44bcbfd0325d643ddf0a5f5 Mon Sep 17 00:00:00 2001 From: Parijat Das Date: Wed, 29 Mar 2017 14:41:43 -0700 Subject: [PATCH 2/5] Added health-check for Fibaro Door Window Sensor ZW5 --- .../.st-ignore | 2 + .../README.md | 41 +++++++++++++++++++ .../fibaro-door-window-sensor-zw5.groovy | 5 ++- 3 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 devicetypes/fibargroup/fibaro-door-window-sensor-zw5.src/.st-ignore create mode 100644 devicetypes/fibargroup/fibaro-door-window-sensor-zw5.src/README.md diff --git a/devicetypes/fibargroup/fibaro-door-window-sensor-zw5.src/.st-ignore b/devicetypes/fibargroup/fibaro-door-window-sensor-zw5.src/.st-ignore new file mode 100644 index 0000000..71af75c --- /dev/null +++ b/devicetypes/fibargroup/fibaro-door-window-sensor-zw5.src/.st-ignore @@ -0,0 +1,2 @@ +.st-ignore +README.md \ No newline at end of file diff --git a/devicetypes/fibargroup/fibaro-door-window-sensor-zw5.src/README.md b/devicetypes/fibargroup/fibaro-door-window-sensor-zw5.src/README.md new file mode 100644 index 0000000..aaaf3d2 --- /dev/null +++ b/devicetypes/fibargroup/fibaro-door-window-sensor-zw5.src/README.md @@ -0,0 +1,41 @@ +# Fibaro Door Window Sensor ZW5 + +Cloud Execution + +Works with: + +* [Fibaro Door/Window Sensor ZW5](https://www.smartthings.com/works-with-smartthings/sensors/fibaro-doorwindow-sensor) + +## Table of contents + +* [Capabilities](#capabilities) +* [Health](#device-health) +* [Battery](#battery-specification) +* [Troubleshooting](#troubleshooting) + +## Capabilities + +* **Battery** - defines device uses a battery +* **Contact Sensor** - can detect contact (possible values: open,closed) +* **Sensor** - detects sensor events +* **Tamper Alert** - detects tampers +* **Configuration** - _configure()_ command called when device is installed or device preferences updated +* **Health Check** - indicates ability to get device health notifications + +## Device Health + +Fibaro Door/Window Sensor ZW5 is a Z-wave sleepy device and wakes up every 4 hours. +Device-Watch allows 2 check-in misses from device plus some lag time. So Check-in interval = (2*4*60 + 2)mins = 482 mins. + +* __482min__ checkInterval + +## Battery Specification + +One 1/2AA 3.6V battery is required. + +## Troubleshooting + +If the device doesn't pair when trying from the SmartThings mobile app, it is possible that the device is out of range. +Pairing needs to be tried again by placing the device closer to the hub. +Instructions related to pairing, resetting and removing the device from SmartThings can be found in the following link: +* [Fibaro Door/Window Sensor ZW5 Troubleshooting Tips](https://support.smartthings.com/hc/en-us/articles/204075194-Fibaro-Door-Window-Sensor) \ No newline at end of file diff --git a/devicetypes/fibargroup/fibaro-door-window-sensor-zw5.src/fibaro-door-window-sensor-zw5.groovy b/devicetypes/fibargroup/fibaro-door-window-sensor-zw5.src/fibaro-door-window-sensor-zw5.groovy index b05d959..95adeb5 100644 --- a/devicetypes/fibargroup/fibaro-door-window-sensor-zw5.src/fibaro-door-window-sensor-zw5.groovy +++ b/devicetypes/fibargroup/fibaro-door-window-sensor-zw5.src/fibaro-door-window-sensor-zw5.groovy @@ -20,6 +20,7 @@ metadata { capability "Sensor" capability "Configuration" capability "Tamper Alert" + capability "Health Check" fingerprint deviceId: "0x0701", inClusters: "0x5E, 0x85, 0x59, 0x22, 0x20, 0x80, 0x70, 0x56, 0x5A, 0x7A, 0x72, 0x8E, 0x71, 0x73, 0x98, 0x2B, 0x9C, 0x30, 0x86, 0x84", outClusters: "" } @@ -199,7 +200,9 @@ def zwaveEvent(physicalgraph.zwave.commands.deviceresetlocallyv1.DeviceResetLoca def configure() { log.debug "Executing 'configure'" - + // Device wakes up every 4 hours, this interval allows us to miss one wakeup notification before marking offline + sendEvent(name: "checkInterval", value: 8 * 60 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID]) + def cmds = [] cmds += zwave.wakeUpV2.wakeUpIntervalSet(seconds:21600, nodeid: zwaveHubNodeId)//FGK's default wake up interval From a112d4b00e50695b3e6cfce24d84d57ede15d760 Mon Sep 17 00:00:00 2001 From: Juan Pablo Risso Date: Fri, 31 Mar 2017 14:05:26 -0400 Subject: [PATCH 3/5] ICP-381 - Add ocfDeviceType to switch devices (#1856) --- .../smartthings/dimmer-switch.src/dimmer-switch.groovy | 2 +- .../wemo-light-switch.src/wemo-light-switch.groovy | 2 +- devicetypes/smartthings/wemo-switch.src/wemo-switch.groovy | 2 +- .../smartthings/zigbee-dimmer.src/zigbee-dimmer.groovy | 2 +- .../zwave-dimmer-switch-generic.groovy | 2 +- .../zwave-metering-dimmer.src/zwave-metering-dimmer.groovy | 2 +- .../zwave-metering-switch.src/zwave-metering-switch.groovy | 4 ++-- .../zwave-switch-generic.src/zwave-switch-generic.groovy | 2 +- .../zwave-switch-secure.src/zwave-switch-secure.groovy | 2 +- devicetypes/smartthings/zwave-switch.src/zwave-switch.groovy | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/devicetypes/smartthings/dimmer-switch.src/dimmer-switch.groovy b/devicetypes/smartthings/dimmer-switch.src/dimmer-switch.groovy index ef0fddd..892baf1 100644 --- a/devicetypes/smartthings/dimmer-switch.src/dimmer-switch.groovy +++ b/devicetypes/smartthings/dimmer-switch.src/dimmer-switch.groovy @@ -12,7 +12,7 @@ * */ metadata { - definition (name: "Dimmer Switch", namespace: "smartthings", author: "SmartThings") { + definition (name: "Dimmer Switch", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "oic.d.switch") { capability "Switch Level" capability "Actuator" capability "Indicator" diff --git a/devicetypes/smartthings/wemo-light-switch.src/wemo-light-switch.groovy b/devicetypes/smartthings/wemo-light-switch.src/wemo-light-switch.groovy index b90a577..b5a4881 100644 --- a/devicetypes/smartthings/wemo-light-switch.src/wemo-light-switch.groovy +++ b/devicetypes/smartthings/wemo-light-switch.src/wemo-light-switch.groovy @@ -18,7 +18,7 @@ metadata { - definition (name: "Wemo Light Switch", namespace: "smartthings", author: "SmartThings") { + definition (name: "Wemo Light Switch", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "oic.d.switch") { capability "Actuator" capability "Switch" capability "Polling" diff --git a/devicetypes/smartthings/wemo-switch.src/wemo-switch.groovy b/devicetypes/smartthings/wemo-switch.src/wemo-switch.groovy index fcda9ec..27c735e 100644 --- a/devicetypes/smartthings/wemo-switch.src/wemo-switch.groovy +++ b/devicetypes/smartthings/wemo-switch.src/wemo-switch.groovy @@ -16,7 +16,7 @@ * Date: 2015-10-11 */ metadata { - definition (name: "Wemo Switch", namespace: "smartthings", author: "SmartThings") { + definition (name: "Wemo Switch", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "oic.d.smartplug") { capability "Actuator" capability "Switch" capability "Polling" diff --git a/devicetypes/smartthings/zigbee-dimmer.src/zigbee-dimmer.groovy b/devicetypes/smartthings/zigbee-dimmer.src/zigbee-dimmer.groovy index 55b22f2..68878df 100644 --- a/devicetypes/smartthings/zigbee-dimmer.src/zigbee-dimmer.groovy +++ b/devicetypes/smartthings/zigbee-dimmer.src/zigbee-dimmer.groovy @@ -13,7 +13,7 @@ */ metadata { - definition (name: "ZigBee Dimmer", namespace: "smartthings", author: "SmartThings") { + definition (name: "ZigBee Dimmer", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "oic.d.switch") { capability "Actuator" capability "Configuration" capability "Refresh" diff --git a/devicetypes/smartthings/zwave-dimmer-switch-generic.src/zwave-dimmer-switch-generic.groovy b/devicetypes/smartthings/zwave-dimmer-switch-generic.src/zwave-dimmer-switch-generic.groovy index 7c9c575..bb94d36 100644 --- a/devicetypes/smartthings/zwave-dimmer-switch-generic.src/zwave-dimmer-switch-generic.groovy +++ b/devicetypes/smartthings/zwave-dimmer-switch-generic.src/zwave-dimmer-switch-generic.groovy @@ -12,7 +12,7 @@ * */ metadata { - definition (name: "Z-Wave Dimmer Switch Generic", namespace: "smartthings", author: "SmartThings") { + definition (name: "Z-Wave Dimmer Switch Generic", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "oic.d.switch") { capability "Switch Level" capability "Actuator" capability "Health Check" diff --git a/devicetypes/smartthings/zwave-metering-dimmer.src/zwave-metering-dimmer.groovy b/devicetypes/smartthings/zwave-metering-dimmer.src/zwave-metering-dimmer.groovy index 4b2fba2..03664f3 100644 --- a/devicetypes/smartthings/zwave-metering-dimmer.src/zwave-metering-dimmer.groovy +++ b/devicetypes/smartthings/zwave-metering-dimmer.src/zwave-metering-dimmer.groovy @@ -16,7 +16,7 @@ * */ metadata { - definition (name: "Z-Wave Metering Dimmer", namespace: "smartthings", author: "SmartThings") { + definition (name: "Z-Wave Metering Dimmer", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "oic.d.switch") { capability "Switch" capability "Polling" capability "Power Meter" diff --git a/devicetypes/smartthings/zwave-metering-switch.src/zwave-metering-switch.groovy b/devicetypes/smartthings/zwave-metering-switch.src/zwave-metering-switch.groovy index 3655220..ff46978 100644 --- a/devicetypes/smartthings/zwave-metering-switch.src/zwave-metering-switch.groovy +++ b/devicetypes/smartthings/zwave-metering-switch.src/zwave-metering-switch.groovy @@ -12,7 +12,7 @@ * */ metadata { - definition (name: "Z-Wave Metering Switch", namespace: "smartthings", author: "SmartThings") { + definition (name: "Z-Wave Metering Switch", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "oic.d.switch") { capability "Energy Meter" capability "Actuator" capability "Switch" @@ -86,7 +86,7 @@ def updated() { def parse(String description) { def result = null - if(description == "updated") return + if(description == "updated") return def cmd = zwave.parse(description, [0x20: 1, 0x32: 1, 0x72: 2]) if (cmd) { result = zwaveEvent(cmd) diff --git a/devicetypes/smartthings/zwave-switch-generic.src/zwave-switch-generic.groovy b/devicetypes/smartthings/zwave-switch-generic.src/zwave-switch-generic.groovy index ced18ce..e2f65d4 100644 --- a/devicetypes/smartthings/zwave-switch-generic.src/zwave-switch-generic.groovy +++ b/devicetypes/smartthings/zwave-switch-generic.src/zwave-switch-generic.groovy @@ -12,7 +12,7 @@ * */ metadata { - definition (name: "Z-Wave Switch Generic", namespace: "smartthings", author: "SmartThings") { + definition (name: "Z-Wave Switch Generic", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "oic.d.switch") { capability "Actuator" capability "Health Check" capability "Switch" diff --git a/devicetypes/smartthings/zwave-switch-secure.src/zwave-switch-secure.groovy b/devicetypes/smartthings/zwave-switch-secure.src/zwave-switch-secure.groovy index a5a1dc1..c81d931 100644 --- a/devicetypes/smartthings/zwave-switch-secure.src/zwave-switch-secure.groovy +++ b/devicetypes/smartthings/zwave-switch-secure.src/zwave-switch-secure.groovy @@ -12,7 +12,7 @@ * */ metadata { - definition (name: "Z-Wave Switch Secure", namespace: "smartthings", author: "SmartThings") { + definition (name: "Z-Wave Switch Secure", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "oic.d.switch") { capability "Switch" capability "Refresh" capability "Polling" diff --git a/devicetypes/smartthings/zwave-switch.src/zwave-switch.groovy b/devicetypes/smartthings/zwave-switch.src/zwave-switch.groovy index b7c7106..151a116 100644 --- a/devicetypes/smartthings/zwave-switch.src/zwave-switch.groovy +++ b/devicetypes/smartthings/zwave-switch.src/zwave-switch.groovy @@ -12,7 +12,7 @@ * */ metadata { - definition (name: "Z-Wave Switch", namespace: "smartthings", author: "SmartThings") { + definition (name: "Z-Wave Switch", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "oic.d.switch") { capability "Actuator" capability "Indicator" capability "Switch" From 4cc41d9d9b382df898bcd4a06ef6ccd7477a3bc6 Mon Sep 17 00:00:00 2001 From: marstorp Date: Mon, 3 Apr 2017 13:59:47 -0700 Subject: [PATCH 4/5] =?UTF-8?q?ICP-448=20Thermostat=20resource=20works=20w?= =?UTF-8?q?eirdly.=20Fixing=20change=20of=20auxHeatOnly=20to=20emergency?= =?UTF-8?q?=20heat.=20Also=20adding=20main=20tile=20icon=20so=20Things=20v?= =?UTF-8?q?iew=20doesn=E2=80=99t=20show=20a=20grey=20blob?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ecobee-thermostat.src/ecobee-thermostat.groovy | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/devicetypes/smartthings/ecobee-thermostat.src/ecobee-thermostat.groovy b/devicetypes/smartthings/ecobee-thermostat.src/ecobee-thermostat.groovy index 3926473..b200e94 100644 --- a/devicetypes/smartthings/ecobee-thermostat.src/ecobee-thermostat.groovy +++ b/devicetypes/smartthings/ecobee-thermostat.src/ecobee-thermostat.groovy @@ -43,8 +43,8 @@ metadata { } tiles { - valueTile("temperature", "device.temperature", width: 2, height: 2) { - state("temperature", label:'${currentValue}°', unit:"F", + standardTile("temperature", "device.temperature", width: 2, height: 2, decoration: "flat") { + state("temperature", label:'${currentValue}°', unit:"F", icon: "st.thermostat.ac.air-conditioning", backgroundColors:[ // Celsius [value: 0, color: "#153591"], @@ -70,7 +70,7 @@ metadata { state "heat", action:"switchMode", nextState: "updating", icon: "st.thermostat.heat" state "cool", action:"switchMode", nextState: "updating", icon: "st.thermostat.cool" state "auto", action:"switchMode", nextState: "updating", icon: "st.thermostat.auto" - state "emergency heat", label:"auxHeatOnly", action:"switchMode", icon: "st.thermostat.emergency-heat" // emergency heat = auxHeatOnly + state "emergency heat", action:"switchMode", icon: "st.thermostat.emergency-heat" // emergency heat = auxHeatOnly state "updating", label:"Working", icon: "st.secondary.secondary" } standardTile("fanMode", "device.thermostatFanMode", inactiveLabel: false, decoration: "flat") { @@ -185,6 +185,11 @@ def generateEvent(Map results) { isChange = isStateChange(device, name, value.toString()) event['isStateChange'] = isChange event['displayed'] = false + } else if (name == "thermostatMode") { + def mode = value.toString() + mode = (mode == "auxHeatOnly") ? "emergency heat" : mode + isChange = isStateChange(device, name, mode) + event << [value: mode, isStateChange: isChange, displayed: isDisplayed] } else { isChange = isStateChange(device, name, value.toString()) isDisplayed = isChange From ba10869dd5e1752133ded044aedd55162561ce9d Mon Sep 17 00:00:00 2001 From: Vinay Rao Date: Mon, 3 Apr 2017 15:00:41 -0700 Subject: [PATCH 5/5] removing generation name from model name --- .../zwave-metering-switch.src/zwave-metering-switch.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devicetypes/smartthings/zwave-metering-switch.src/zwave-metering-switch.groovy b/devicetypes/smartthings/zwave-metering-switch.src/zwave-metering-switch.groovy index ff46978..5f1d0c9 100644 --- a/devicetypes/smartthings/zwave-metering-switch.src/zwave-metering-switch.groovy +++ b/devicetypes/smartthings/zwave-metering-switch.src/zwave-metering-switch.groovy @@ -27,7 +27,7 @@ metadata { command "reset" fingerprint inClusters: "0x25,0x32" - fingerprint mfr:"0086", prod:"0003", model:"0012", deviceJoinName: "Aeon Labs Micro Smart Switch 2E" + fingerprint mfr:"0086", prod:"0003", model:"0012", deviceJoinName: "Aeon Labs Micro Smart Switch" } // simulator metadata