From d30494172f9996f0fde5a20b339e76ef52199e1a Mon Sep 17 00:00:00 2001 From: Parijat Das Date: Wed, 15 Mar 2017 14:34:04 -0700 Subject: [PATCH] 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()) }