From ac4c3532876adef61141cac5fd0a88c4a85d4acb Mon Sep 17 00:00:00 2001 From: Parijat Das Date: Wed, 29 Mar 2017 10:43:02 -0700 Subject: [PATCH] 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) }