From 950a33dc74af2952f5ec2109271954511d4358fa Mon Sep 17 00:00:00 2001 From: Parijat Das Date: Mon, 13 Mar 2017 16:26:46 -0700 Subject: [PATCH 1/8] Added health-check for FortrezZ Water Valve --- .../fortrezz-water-valve.src/.st-ignore | 2 + .../fortrezz-water-valve.src/README.md | 39 +++++++++++++++++++ .../fortrezz-water-valve.groovy | 14 +++++++ 3 files changed, 55 insertions(+) create mode 100644 devicetypes/smartthings/fortrezz-water-valve.src/.st-ignore create mode 100644 devicetypes/smartthings/fortrezz-water-valve.src/README.md diff --git a/devicetypes/smartthings/fortrezz-water-valve.src/.st-ignore b/devicetypes/smartthings/fortrezz-water-valve.src/.st-ignore new file mode 100644 index 0000000..f78b46e --- /dev/null +++ b/devicetypes/smartthings/fortrezz-water-valve.src/.st-ignore @@ -0,0 +1,2 @@ +.st-ignore +README.md diff --git a/devicetypes/smartthings/fortrezz-water-valve.src/README.md b/devicetypes/smartthings/fortrezz-water-valve.src/README.md new file mode 100644 index 0000000..40c31df --- /dev/null +++ b/devicetypes/smartthings/fortrezz-water-valve.src/README.md @@ -0,0 +1,39 @@ +# FortrezZ Water Valve + +Cloud Execution + +Works with: + +* [FortrezZ Water Valve](https://www.smartthings.com/works-with-smartthings/other/fortrezz-water-valve) + +## Table of contents + +* [Capabilities](#capabilities) +* [Health](#device-health) +* [Troubleshooting](#troubleshooting) + +## Capabilities + +* **Actuator** - represents that a Device has commands +* **Health Check** - indicates ability to get device health notifications +* **Valve** - allows for the control of a valve device +* **Refresh** - _refresh()_ command for status updates +* **Sensor** - detects sensor events + +## Device Health + +FortrezZ Water Valve is polled by the hub. +As of hubCore version 0.14.38 the hub sends up reports every 15 minutes regardless of whether the state changed. +Device-Watch allows 2 check-in misses from device plus some lag time. So Check-in interval = (2*15 + 2)mins = 32 mins. +Not to mention after going OFFLINE when the device is plugged back in, it might take a considerable amount of time for +the device to appear as ONLINE again. This is because if this listening device does not respond to two poll requests in a row, +it is not polled for 5 minutes by the hub. This can delay up the process of being marked ONLINE by quite some time. + +* __32min__ checkInterval + +## 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: +* [FortrezZ Water Valve Troubleshooting Tips](https://support.smartthings.com/hc/en-us/articles/202088434-FortrezZ-Water-Valve-Shutoff) \ No newline at end of file diff --git a/devicetypes/smartthings/fortrezz-water-valve.src/fortrezz-water-valve.groovy b/devicetypes/smartthings/fortrezz-water-valve.src/fortrezz-water-valve.groovy index 1b67c5d..77b9595 100644 --- a/devicetypes/smartthings/fortrezz-water-valve.src/fortrezz-water-valve.groovy +++ b/devicetypes/smartthings/fortrezz-water-valve.src/fortrezz-water-valve.groovy @@ -14,11 +14,13 @@ metadata { definition (name: "Fortrezz Water Valve", namespace: "smartthings", author: "SmartThings") { capability "Actuator" + capability "Health Check" capability "Valve" capability "Refresh" capability "Sensor" fingerprint deviceId: "0x1000", inClusters: "0x25,0x72,0x86,0x71,0x22,0x70" + fingerprint mfr:"0084", prod:"0213", model:"0215", deviceJoinName: "FortrezZ Water Valve" } // simulator metadata @@ -48,6 +50,11 @@ metadata { } } +def updated(){ +// Device-Watch simply pings if no device events received for 32min(checkInterval) + sendEvent(name: "checkInterval", value: 2 * 15 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID]) +} + def parse(String description) { log.trace description def result = null @@ -76,6 +83,13 @@ def close() { zwave.switchBinaryV1.switchBinarySet(switchValue: 0xFF).format() } +/** + * PING is used by Device-Watch in attempt to reach the Device + * */ +def ping() { + refresh() +} + def refresh() { zwave.switchBinaryV1.switchBinaryGet().format() } From 7a7a08ea6ea413de32a5fb67ba219fff077e1bbc Mon Sep 17 00:00:00 2001 From: Parijat Das Date: Mon, 13 Mar 2017 18:05:22 -0700 Subject: [PATCH 2/8] Added health-check for FortrezZ Siren Strobe Alarm --- .../smartthings/zwave-siren.src/.st-ignore | 2 + .../smartthings/zwave-siren.src/README.md | 42 +++++++++++++++++++ .../zwave-siren.src/zwave-siren.groovy | 14 +++++++ 3 files changed, 58 insertions(+) create mode 100644 devicetypes/smartthings/zwave-siren.src/.st-ignore create mode 100644 devicetypes/smartthings/zwave-siren.src/README.md diff --git a/devicetypes/smartthings/zwave-siren.src/.st-ignore b/devicetypes/smartthings/zwave-siren.src/.st-ignore new file mode 100644 index 0000000..f78b46e --- /dev/null +++ b/devicetypes/smartthings/zwave-siren.src/.st-ignore @@ -0,0 +1,2 @@ +.st-ignore +README.md diff --git a/devicetypes/smartthings/zwave-siren.src/README.md b/devicetypes/smartthings/zwave-siren.src/README.md new file mode 100644 index 0000000..ed17b1e --- /dev/null +++ b/devicetypes/smartthings/zwave-siren.src/README.md @@ -0,0 +1,42 @@ +# Z-wave Siren + +Cloud Execution + +Works with: + +* [FortrezZ Siren Strobe Alarm](https://www.smartthings.com/works-with-smartthings/other/fortrezz-water-valve) + +## Table of contents + +* [Capabilities](#capabilities) +* [Health](#device-health) +* [Troubleshooting](#troubleshooting) + +## Capabilities + +* **Actuator** - represents that a Device has commands +* **Alarm** - allows for interacting with devices that serve as alarms +* **Battery** - defines device uses a battery +* **Health Check** - indicates ability to get device health notifications +* **Polling** - represents that poll() can be implemented for the device +* **Refresh** - _refresh()_ command for status updates +* **Sensor** - detects sensor events +* **Switch** - can detect state (possible values: on/off) + +## Device Health + +FortrezZ Siren Strobe Alarm is polled by the hub. +As of hubCore version 0.14.38 the hub sends up reports every 15 minutes regardless of whether the state changed. +Device-Watch allows 2 check-in misses from device plus some lag time. So Check-in interval = (2*15 + 2)mins = 32 mins. +Not to mention after going OFFLINE when the device is plugged back in, it might take a considerable amount of time for +the device to appear as ONLINE again. This is because if this listening device does not respond to two poll requests in a row, +it is not polled for 5 minutes by the hub. This can delay up the process of being marked ONLINE by quite some time. + +* __32min__ checkInterval + +## 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: +* [FortrezZ Siren Strobe Alarm Troubleshooting Tips](https://support.smartthings.com/hc/en-us/articles/202294760-FortrezZ-Siren-Strobe-Alarm) \ No newline at end of file diff --git a/devicetypes/smartthings/zwave-siren.src/zwave-siren.groovy b/devicetypes/smartthings/zwave-siren.src/zwave-siren.groovy index 9ee8071..d368610 100644 --- a/devicetypes/smartthings/zwave-siren.src/zwave-siren.groovy +++ b/devicetypes/smartthings/zwave-siren.src/zwave-siren.groovy @@ -20,6 +20,7 @@ metadata { capability "Actuator" capability "Alarm" capability "Battery" + capability "Health Check" capability "Polling" capability "Refresh" capability "Sensor" @@ -27,6 +28,7 @@ metadata { fingerprint inClusters: "0x20,0x25,0x86,0x80,0x85,0x72,0x71" + fingerprint mfr:"0084", prod:"0313", model:"010B", deviceJoinName: "FortrezZ Siren Strobe Alarm" } simulator { @@ -58,6 +60,11 @@ metadata { } } +def updated(){ +// Device-Watch simply pings if no device events received for 32min(checkInterval) + sendEvent(name: "checkInterval", value: 2 * 15 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID]) +} + def createEvents(physicalgraph.zwave.commands.batteryv1.BatteryReport cmd) { def map = [ name: "battery", unit: "%" ] if (cmd.batteryLevel == 0xFF) { @@ -119,6 +126,13 @@ def both() { on() } +/** + * PING is used by Device-Watch in attempt to reach the Device + * */ +def ping() { + refresh() +} + def refresh() { log.debug "sending battery refresh command" zwave.batteryV1.batteryGet().format() From d30494172f9996f0fde5a20b339e76ef52199e1a Mon Sep 17 00:00:00 2001 From: Parijat Das Date: Wed, 15 Mar 2017 14:34:04 -0700 Subject: [PATCH 3/8] Added health-check for Linear GoControl Garage Door Opener --- .../zwave-garage-door-opener.src/.st-ignore | 2 + .../zwave-garage-door-opener.src/README.md | 41 +++++++++++++++++++ .../zwave-garage-door-opener.groovy | 14 +++++++ 3 files changed, 57 insertions(+) create mode 100644 devicetypes/smartthings/zwave-garage-door-opener.src/.st-ignore create mode 100644 devicetypes/smartthings/zwave-garage-door-opener.src/README.md diff --git a/devicetypes/smartthings/zwave-garage-door-opener.src/.st-ignore b/devicetypes/smartthings/zwave-garage-door-opener.src/.st-ignore new file mode 100644 index 0000000..f78b46e --- /dev/null +++ b/devicetypes/smartthings/zwave-garage-door-opener.src/.st-ignore @@ -0,0 +1,2 @@ +.st-ignore +README.md diff --git a/devicetypes/smartthings/zwave-garage-door-opener.src/README.md b/devicetypes/smartthings/zwave-garage-door-opener.src/README.md new file mode 100644 index 0000000..188521d --- /dev/null +++ b/devicetypes/smartthings/zwave-garage-door-opener.src/README.md @@ -0,0 +1,41 @@ +# Z-wave Garage Door Opener + +Cloud Execution + +Works with: + +* [Linear GoControl Garage Door Opener](https://www.smartthings.com/works-with-smartthings/other/linear-gocontrol-garage-door-opener) + +## Table of contents + +* [Capabilities](#capabilities) +* [Health](#device-health) +* [Troubleshooting](#troubleshooting) + +## Capabilities + +* **Actuator** - represents that a Device has commands +* **Door Control** - allow for the control of a door +* **Garage Door Control** - allow for the control of a garage door +* **Health Check** - indicates ability to get device health notifications +* **Contact Sensor** - can detect contact (with possible values - open/closed) +* **Refresh** - _refresh()_ command for status updates +* **Sensor** - detects sensor events + +## Device Health + +Linear GoControl Garage Door Opener is polled by the hub. +As of hubCore version 0.14.38 the hub sends up reports every 15 minutes regardless of whether the state changed. +Device-Watch allows 2 check-in misses from device plus some lag time. So Check-in interval = (2*15 + 2)mins = 32 mins. +Not to mention after going OFFLINE when the device is plugged back in, it might take a considerable amount of time for +the device to appear as ONLINE again. This is because if this listening device does not respond to two poll requests in a row, +it is not polled for 5 minutes by the hub. This can delay up the process of being marked ONLINE by quite some time. + +* __32min__ checkInterval + +## 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: +* [Linear GoControl Garage Door Opener Troubleshooting Tips](https://support.smartthings.com/hc/en-us/articles/204831116-GoControl-Linear-Garage-Door-Opener-GD00Z-4-) \ No newline at end of file diff --git a/devicetypes/smartthings/zwave-garage-door-opener.src/zwave-garage-door-opener.groovy b/devicetypes/smartthings/zwave-garage-door-opener.src/zwave-garage-door-opener.groovy index f22faf8..a0fa61e 100644 --- a/devicetypes/smartthings/zwave-garage-door-opener.src/zwave-garage-door-opener.groovy +++ b/devicetypes/smartthings/zwave-garage-door-opener.src/zwave-garage-door-opener.groovy @@ -18,12 +18,14 @@ metadata { capability "Actuator" capability "Door Control" capability "Garage Door Control" + capability "Health Check" capability "Contact Sensor" capability "Refresh" capability "Sensor" fingerprint deviceId: "0x4007", inClusters: "0x98" fingerprint deviceId: "0x4006", inClusters: "0x98" + fingerprint mfr:"014F", prod:"4744", model:"3030", deviceJoinName: "Linear GoControl Garage Door Opener" } simulator { @@ -63,6 +65,11 @@ metadata { import physicalgraph.zwave.commands.barrieroperatorv1.* +def updated(){ +// Device-Watch simply pings if no device events received for 32min(checkInterval) + sendEvent(name: "checkInterval", value: 2 * 15 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID]) +} + def parse(String description) { def result = null if (description.startsWith("Err")) { @@ -287,6 +294,13 @@ def close() { secure(zwave.barrierOperatorV1.barrierOperatorSet(requestedBarrierState: BarrierOperatorSet.REQUESTED_BARRIER_STATE_CLOSE)) } +/** + * PING is used by Device-Watch in attempt to reach the Device + * */ +def ping() { + refresh() +} + def refresh() { secure(zwave.barrierOperatorV1.barrierOperatorGet()) } From 1326881142d8f516b82729760ca0d4bb7ed04ef8 Mon Sep 17 00:00:00 2001 From: "sushant.k1" Date: Wed, 15 Mar 2017 19:46:07 +0530 Subject: [PATCH 4/8] Implemented of Health Check for Aeon Siren. --- .../smartthings/aeon-siren.src/.st-ignore | 2 + .../smartthings/aeon-siren.src/README.md | 37 +++++++++++++++++++ .../aeon-siren.src/aeon-siren.groovy | 13 ++++++- 3 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 devicetypes/smartthings/aeon-siren.src/.st-ignore create mode 100644 devicetypes/smartthings/aeon-siren.src/README.md diff --git a/devicetypes/smartthings/aeon-siren.src/.st-ignore b/devicetypes/smartthings/aeon-siren.src/.st-ignore new file mode 100644 index 0000000..f78b46e --- /dev/null +++ b/devicetypes/smartthings/aeon-siren.src/.st-ignore @@ -0,0 +1,2 @@ +.st-ignore +README.md diff --git a/devicetypes/smartthings/aeon-siren.src/README.md b/devicetypes/smartthings/aeon-siren.src/README.md new file mode 100644 index 0000000..f4e0166 --- /dev/null +++ b/devicetypes/smartthings/aeon-siren.src/README.md @@ -0,0 +1,37 @@ +# Aeon Siren + +Cloud Execution + +Works with: + +* [Aeon Labs Siren (Gen 5)](https://www.smartthings.com/works-with-smartthings/aeon-labs/aeon-labs-siren-gen-5) + +## Table of contents + +* [Capabilities](#capabilities) +* [Health](#device-health) + +## Capabilities + +* **Actuator** - represents that a Device has commands +* **Alarm** - allows for interacting with devices that serve as alarms +* **Switch** - can detect state (possible values: on/off) +* **Health Check** - indicates ability to get device health notifications + +## Device Health + +Aeon Labs Siren (Gen 5) is polled by the hub. +As of hubCore version 0.14.38 the hub sends up reports every 15 minutes regardless of whether the state changed. +Device-Watch allows 2 check-in misses from device plus some lag time. So Check-in interval = (2*15 + 2)mins = 32 mins. +Not to mention after going OFFLINE when the device is plugged back in, it might take a considerable amount of time for +the device to appear as ONLINE again. This is because if this listening device does not respond to two poll requests in a row, +it is not polled for 5 minutes by the hub. This can delay up the process of being marked ONLINE by quite some time. + +* __32min__ checkInterval + +## 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: +* [Aeon Labs Siren (Gen 5) Troubleshooting Tips](https://support.smartthings.com/hc/en-us/articles/204555240-Aeon-Labs-Siren-Gen-5-) \ No newline at end of file diff --git a/devicetypes/smartthings/aeon-siren.src/aeon-siren.groovy b/devicetypes/smartthings/aeon-siren.src/aeon-siren.groovy index a0fafb3..8b961aa 100644 --- a/devicetypes/smartthings/aeon-siren.src/aeon-siren.groovy +++ b/devicetypes/smartthings/aeon-siren.src/aeon-siren.groovy @@ -20,10 +20,11 @@ metadata { capability "Actuator" capability "Alarm" capability "Switch" + capability "Health Check" command "test" - fingerprint deviceId: "0x1005", inClusters: "0x5E,0x98" + fingerprint deviceId: "0x1005", inClusters: "0x5E,0x98", deviceJoinName: "Aeon Labs Siren (Gen 5)" } simulator { @@ -58,6 +59,9 @@ metadata { } def updated() { +// Device-Watch simply pings if no device events received for 32min(checkInterval) + sendEvent(name: "checkInterval", value: 2 * 15 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID]) + if(!state.sound) state.sound = 1 if(!state.volume) state.volume = 3 @@ -148,3 +152,10 @@ def test() { private secure(physicalgraph.zwave.Command cmd) { zwave.securityV1.securityMessageEncapsulation().encapsulate(cmd).format() } + +/** + * PING is used by Device-Watch in attempt to reach the Device + * */ +def ping() { + secure(zwave.basicV1.basicGet()) +} \ No newline at end of file From 0a4d56be04e22c58a7caf929be1f4cd082008a6f Mon Sep 17 00:00:00 2001 From: "piyush.c" Date: Wed, 15 Mar 2017 19:09:17 +0530 Subject: [PATCH 5/8] [CHF-551] Health Check Z-Wave Lock --- .../smartthings/zwave-lock.src/.st-ignore | 2 + .../smartthings/zwave-lock.src/README.md | 45 +++++++++++++++++++ .../zwave-lock.src/zwave-lock.groovy | 11 +++++ 3 files changed, 58 insertions(+) create mode 100644 devicetypes/smartthings/zwave-lock.src/.st-ignore create mode 100644 devicetypes/smartthings/zwave-lock.src/README.md diff --git a/devicetypes/smartthings/zwave-lock.src/.st-ignore b/devicetypes/smartthings/zwave-lock.src/.st-ignore new file mode 100644 index 0000000..f78b46e --- /dev/null +++ b/devicetypes/smartthings/zwave-lock.src/.st-ignore @@ -0,0 +1,2 @@ +.st-ignore +README.md diff --git a/devicetypes/smartthings/zwave-lock.src/README.md b/devicetypes/smartthings/zwave-lock.src/README.md new file mode 100644 index 0000000..ae64536 --- /dev/null +++ b/devicetypes/smartthings/zwave-lock.src/README.md @@ -0,0 +1,45 @@ +# Z-Wave Switch + +Cloud Execution + +Works with: + +* [Yale Key Free Touchscreen Deadbolt (YRD240)](https://www.smartthings.com/works-with-smartthings/yale/yale-key-free-touchscreen-deadbolt-yrd240) + + +## Table of contents + +* [Capabilities](#capabilities) +* [Health](#device-health) +* [Troubleshooting](#Troubleshooting) + +## Capabilities + +* **Actuator** - represents that a Device has commands +* **Battery** - defines device uses a battery +* **Lock** - allows for the control of a lock device +* **Lock Codes** - allows for the lock code control of a lock device +* **Polling** - represents that poll() can be implemented for the device +* **Refresh** - _refresh()_ command for status updates +* **Sensor** - detects sensor events +* **Health Check** - indicates ability to get device health notifications + +## Device Health + +Z-Wave Locks are polled by the hub. +As of hubCore version 0.14.38 the hub sends up reports every 15 minutes regardless of whether the state changed. +Device-Watch allows 2 check-in misses from device plus some lag time. So Check-in interval = (2*15 + 2)mins = 32 mins. +Not to mention after going OFFLINE when the device is plugged back in, it might take a considerable amount of time for +the device to appear as ONLINE again. This is because if this listening device does not respond to two poll requests in a row, +it is not polled for 5 minutes by the hub. This can delay up the process of being marked ONLINE by quite some time. + +* __32min__ checkInterval + +## 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: +* [General Z-Wave/ZigBee Yale Lock Troubleshooting](https://support.smartthings.com/hc/en-us/articles/205138400-How-to-connect-Yale-locks) + + diff --git a/devicetypes/smartthings/zwave-lock.src/zwave-lock.groovy b/devicetypes/smartthings/zwave-lock.src/zwave-lock.groovy index 0535ffa..2785467 100644 --- a/devicetypes/smartthings/zwave-lock.src/zwave-lock.groovy +++ b/devicetypes/smartthings/zwave-lock.src/zwave-lock.groovy @@ -20,11 +20,13 @@ metadata { capability "Sensor" capability "Lock Codes" capability "Battery" + capability "Health Check" command "unlockwtimeout" fingerprint deviceId: "0x4003", inClusters: "0x98" fingerprint deviceId: "0x4004", inClusters: "0x98" + fingerprint mfr:"0129", prod:"0002", model:"0000", deviceJoinName: "Yale Key Free Touchscreen Deadbolt" } simulator { @@ -67,6 +69,8 @@ import physicalgraph.zwave.commands.doorlockv1.* import physicalgraph.zwave.commands.usercodev1.* def updated() { + // Device-Watch simply pings if no device events received for 32min(checkInterval) + sendEvent(name: "checkInterval", value: 2 * 15 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID]) try { if (!state.init) { state.init = true @@ -504,6 +508,13 @@ def unlockwtimeout() { lockAndCheck(DoorLockOperationSet.DOOR_LOCK_MODE_DOOR_UNSECURED_WITH_TIMEOUT) } +/** + * PING is used by Device-Watch in attempt to reach the Device + * */ +def ping() { + refresh() +} + def refresh() { def cmds = [secure(zwave.doorLockV1.doorLockOperationGet())] if (state.assoc == zwaveHubNodeId) { From a79d56e4676ee651519fe4459715b20e913d770e Mon Sep 17 00:00:00 2001 From: Zach Varberg Date: Thu, 16 Mar 2017 08:24:10 -0500 Subject: [PATCH 6/8] Properly handle tempOffset in smartsense sensors This was accidentally dropped as a part of the zigbee DTH cleanup that was done a while ago. This properly adjusts according to the offset. This resolves: https://smartthings.atlassian.net/browse/DVCSMP-2516 --- .../smartsense-moisture-sensor.groovy | 6 ++++++ .../smartsense-motion-sensor.groovy | 6 ++++++ .../smartsense-open-closed-sensor.groovy | 6 ++++++ .../smartsense-temp-humidity-sensor.groovy | 6 ++++++ 4 files changed, 24 insertions(+) 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 4d27081..a9b68cd 100644 --- a/devicetypes/smartthings/smartsense-moisture-sensor.src/smartsense-moisture-sensor.groovy +++ b/devicetypes/smartthings/smartsense-moisture-sensor.src/smartsense-moisture-sensor.groovy @@ -106,6 +106,12 @@ def parse(String description) { } } } + } else if (map.name == "temperature") { + if (tempOffset) { + map.value = (int) map.value + (int) tempOffset + } + map.descriptionText = temperatureScale == 'C' ? '{{ device.displayName }} was {{ value }}°C' : '{{ device.displayName }} was {{ value }}°F' + map.translatable = true } log.debug "Parse returned $map" 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 2032d3f..c2265a2 100644 --- a/devicetypes/smartthings/smartsense-motion-sensor.src/smartsense-motion-sensor.groovy +++ b/devicetypes/smartthings/smartsense-motion-sensor.src/smartsense-motion-sensor.groovy @@ -112,6 +112,12 @@ def parse(String description) { map = getMotionResult(value) } } + } else if (map.name == "temperature") { + if (tempOffset) { + map.value = (int) map.value + (int) tempOffset + } + map.descriptionText = temperatureScale == 'C' ? '{{ device.displayName }} was {{ value }}°C' : '{{ device.displayName }} was {{ value }}°F' + map.translatable = true } log.debug "Parse returned $map" diff --git a/devicetypes/smartthings/smartsense-open-closed-sensor.src/smartsense-open-closed-sensor.groovy b/devicetypes/smartthings/smartsense-open-closed-sensor.src/smartsense-open-closed-sensor.groovy index cf68b3a..fc08a0a 100644 --- a/devicetypes/smartthings/smartsense-open-closed-sensor.src/smartsense-open-closed-sensor.groovy +++ b/devicetypes/smartthings/smartsense-open-closed-sensor.src/smartsense-open-closed-sensor.groovy @@ -95,6 +95,12 @@ def parse(String description) { } } } + } else if (map.name == "temperature") { + if (tempOffset) { + map.value = (int) map.value + (int) tempOffset + } + map.descriptionText = temperatureScale == 'C' ? '{{ device.displayName }} was {{ value }}°C' : '{{ device.displayName }} was {{ value }}°F' + map.translatable = true } log.debug "Parse returned $map" 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 c0fe4b0..a655c21 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 @@ -88,6 +88,12 @@ def parse(String description) { log.warn "TEMP REPORTING CONFIG FAILED- error code: ${descMap.data[0]}" } } + } else if (map.name == "temperature") { + if (tempOffset) { + map.value = (int) map.value + (int) tempOffset + } + map.descriptionText = temperatureScale == 'C' ? '{{ device.displayName }} was {{ value }}°C' : '{{ device.displayName }} was {{ value }}°F' + map.translatable = true } log.debug "Parse returned $map" From 8a3c9edf0ab0fc6abf2d1721327f76eafc6a95d5 Mon Sep 17 00:00:00 2001 From: Parijat Das Date: Mon, 20 Mar 2017 14:54:14 -0700 Subject: [PATCH 7/8] Added health-check for Aeon Multisensor Gen5 --- .../aeon-multisensor-gen5.src/.st-ignore | 2 + .../aeon-multisensor-gen5.src/README.md | 43 +++++++++++++++++++ .../aeon-multisensor-gen5.groovy | 14 ++++++ 3 files changed, 59 insertions(+) create mode 100644 devicetypes/smartthings/aeon-multisensor-gen5.src/.st-ignore create mode 100644 devicetypes/smartthings/aeon-multisensor-gen5.src/README.md diff --git a/devicetypes/smartthings/aeon-multisensor-gen5.src/.st-ignore b/devicetypes/smartthings/aeon-multisensor-gen5.src/.st-ignore new file mode 100644 index 0000000..f78b46e --- /dev/null +++ b/devicetypes/smartthings/aeon-multisensor-gen5.src/.st-ignore @@ -0,0 +1,2 @@ +.st-ignore +README.md diff --git a/devicetypes/smartthings/aeon-multisensor-gen5.src/README.md b/devicetypes/smartthings/aeon-multisensor-gen5.src/README.md new file mode 100644 index 0000000..62a8f9a --- /dev/null +++ b/devicetypes/smartthings/aeon-multisensor-gen5.src/README.md @@ -0,0 +1,43 @@ +# Aeon Multisensor Gen5 + +Cloud Execution + +Works with: + +* [Aeon Labs MultiSensor (Gen 5)](https://www.smartthings.com/works-with-smartthings/sensors/aeon-labs-multisensor-gen-5) + +## Table of contents + +* [Capabilities](#capabilities) +* [Health](#device-health) +* [Troubleshooting](#troubleshooting) + +## Capabilities + +* **Motion Sensor** - can detect motion +* **Temperature Measurement** - defines device measures current temperature +* **Relative Humidity Measurement** - allow reading the relative humidity from devices that support it +* **Illuminance Measurement** - gives the illuminance reading from devices that support it +* **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 + +Aeon Labs MultiSensor (Gen 5) is polled by the hub. +As of hubCore version 0.14.38 the hub sends up reports every 15 minutes regardless of whether the state changed. +Device-Watch allows 2 check-in misses from device plus some lag time. So Check-in interval = (2*15 + 2)mins = 32 mins. +Not to mention after going OFFLINE when the device is plugged back in, it might take a considerable amount of time for +the device to appear as ONLINE again. This is because if this listening device does not respond to two poll requests in a row, +it is not polled for 5 minutes by the hub. This can delay up the process of being marked ONLINE by quite some time. + +* __32min__ checkInterval + +## 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: +* [Aeon Labs MultiSensor (Gen 5) Troubleshooting Tips](https://support.smartthings.com/hc/en-us/articles/206157226-Aeon-Labs-MultiSensor-Gen-5-) \ No newline at end of file diff --git a/devicetypes/smartthings/aeon-multisensor-gen5.src/aeon-multisensor-gen5.groovy b/devicetypes/smartthings/aeon-multisensor-gen5.src/aeon-multisensor-gen5.groovy index 04888d3..09e3f2b 100644 --- a/devicetypes/smartthings/aeon-multisensor-gen5.src/aeon-multisensor-gen5.groovy +++ b/devicetypes/smartthings/aeon-multisensor-gen5.src/aeon-multisensor-gen5.groovy @@ -20,10 +20,12 @@ metadata { capability "Configuration" capability "Sensor" capability "Battery" + capability "Health Check" command "configureAfterSecure" fingerprint deviceId: "0x0701", inClusters: "0x5E,0x86,0x72,0x59,0x85,0x73,0x71,0x84,0x80,0x30,0x31,0x70,0x98,0x7A", outClusters:"0x5A" + fingerprint mfr:"0086", prod:"0102", model:"004A", deviceJoinName: "Aeon Labs MultiSensor (Gen 5)" } simulator { @@ -98,6 +100,11 @@ metadata { } } +def updated(){ +// Device-Watch simply pings if no device events received for 32min(checkInterval) + sendEvent(name: "checkInterval", value: 2 * 15 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID]) +} + def parse(String description) { def result = null @@ -244,6 +251,13 @@ def configureAfterSecure() { secureSequence(request) + ["delay 20000", zwave.wakeUpV1.wakeUpNoMoreInformation().format()] } +/** + * PING is used by Device-Watch in attempt to reach the Device + * */ +def ping() { + secure(zwave.batteryV1.batteryGet()) +} + def configure() { // log.debug "configure()" //["delay 30000"] + secure(zwave.securityV1.securityCommandsSupportedGet()) From 26f9690190b4e412269903642674151284082a11 Mon Sep 17 00:00:00 2001 From: Parijat Das Date: Wed, 15 Mar 2017 15:29:45 -0700 Subject: [PATCH 8/8] Added health-check for First Alert Smoke Detector and Carbon Monoxide Alarm (ZCOMBO) --- .../zwave-smoke-alarm.src/.st-ignore | 2 + .../zwave-smoke-alarm.src/README.md | 40 +++++++++++++++++++ .../zwave-smoke-alarm.groovy | 8 +++- 3 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 devicetypes/smartthings/zwave-smoke-alarm.src/.st-ignore create mode 100644 devicetypes/smartthings/zwave-smoke-alarm.src/README.md diff --git a/devicetypes/smartthings/zwave-smoke-alarm.src/.st-ignore b/devicetypes/smartthings/zwave-smoke-alarm.src/.st-ignore new file mode 100644 index 0000000..f78b46e --- /dev/null +++ b/devicetypes/smartthings/zwave-smoke-alarm.src/.st-ignore @@ -0,0 +1,2 @@ +.st-ignore +README.md diff --git a/devicetypes/smartthings/zwave-smoke-alarm.src/README.md b/devicetypes/smartthings/zwave-smoke-alarm.src/README.md new file mode 100644 index 0000000..846990c --- /dev/null +++ b/devicetypes/smartthings/zwave-smoke-alarm.src/README.md @@ -0,0 +1,40 @@ +# Z-wave Smoke Alarm + +Cloud Execution + +Works with: + +* [First Alert Smoke Detector and Carbon Monoxide Alarm (ZCOMBO)](https://www.smartthings.com/works-with-smartthings/sensors/first-alert-smoke-detector-and-carbon-monoxide-alarm-zcombo) + +## Table of contents + +* [Capabilities](#capabilities) +* [Health](#device-health) +* [Battery](#battery-specification) +* [Troubleshooting](#troubleshooting) + +## Capabilities + +* **Smoke Detector** - measure smoke and optionally carbon monoxide levels +* **Carbon Monoxide Detector** - measure carbon monoxide levels +* **Sensor** - detects sensor events +* **Battery** - defines device uses a battery +* **Health Check** - indicates ability to get device health notifications + +## Device Health + +First Alert Smoke Detector and Carbon Monoxide Alarm (ZCOMBO) is a Z-wave sleepy device and checks in every 1 hour. +Device-Watch allows 2 check-in misses from device plus some lag time. So Check-in interval = (2*60 + 2)mins = 122 mins. + +* __122min__ checkInterval + +## Battery Specification + +Two 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: +* [First Alert Smoke Detector and Carbon Monoxide Alarm (ZCOMBO) Troubleshooting Tips](https://support.smartthings.com/hc/en-us/articles/201581984-First-Alert-Smoke-Detector-and-Carbon-Monoxide-Alarm-ZCOMBO-) \ No newline at end of file diff --git a/devicetypes/smartthings/zwave-smoke-alarm.src/zwave-smoke-alarm.groovy b/devicetypes/smartthings/zwave-smoke-alarm.src/zwave-smoke-alarm.groovy index aa426e4..f644386 100644 --- a/devicetypes/smartthings/zwave-smoke-alarm.src/zwave-smoke-alarm.groovy +++ b/devicetypes/smartthings/zwave-smoke-alarm.src/zwave-smoke-alarm.groovy @@ -17,10 +17,12 @@ metadata { capability "Carbon Monoxide Detector" capability "Sensor" capability "Battery" + capability "Health Check" attribute "alarmState", "string" fingerprint deviceId: "0xA100", inClusters: "0x20,0x80,0x70,0x85,0x71,0x72,0x86" + fingerprint mfr:"0138", prod:"0001", model:"0002", deviceJoinName: "First Alert Smoke Detector and Carbon Monoxide Alarm (ZCOMBO)" } simulator { @@ -51,6 +53,11 @@ metadata { } } +def updated(){ +// Device checks in every hour, this interval allows us to miss one check-in notification before marking offline + sendEvent(name: "checkInterval", value: 2 * 60 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID]) +} + def parse(String description) { def results = [] if (description.startsWith("Err")) { @@ -65,7 +72,6 @@ def parse(String description) { return results } - def createSmokeOrCOEvents(name, results) { def text = null switch (name) {