From 10c1d6f7153f8f6d796373af2f760284bf8270dd Mon Sep 17 00:00:00 2001 From: "piyush.c" Date: Tue, 28 Mar 2017 22:06:51 +0530 Subject: [PATCH] [CHF-560] Health Check Smartsense Moisture --- .../smartsense-moisture.src/.st-ignore | 2 ++ .../smartsense-moisture.src/README.md | 36 +++++++++++++++++++ .../smartsense-moisture.groovy | 7 ++++ 3 files changed, 45 insertions(+) create mode 100644 devicetypes/smartthings/smartsense-moisture.src/.st-ignore create mode 100644 devicetypes/smartthings/smartsense-moisture.src/README.md diff --git a/devicetypes/smartthings/smartsense-moisture.src/.st-ignore b/devicetypes/smartthings/smartsense-moisture.src/.st-ignore new file mode 100644 index 0000000..f78b46e --- /dev/null +++ b/devicetypes/smartthings/smartsense-moisture.src/.st-ignore @@ -0,0 +1,2 @@ +.st-ignore +README.md diff --git a/devicetypes/smartthings/smartsense-moisture.src/README.md b/devicetypes/smartthings/smartsense-moisture.src/README.md new file mode 100644 index 0000000..35f05aa --- /dev/null +++ b/devicetypes/smartthings/smartsense-moisture.src/README.md @@ -0,0 +1,36 @@ +# Smartsense Moisture + +Cloud Execution + +Works with: + +* [FortrezZ Moisture Sensor](https://www.smartthings.com/works-with-smartthings/fortrezz/fortrezz-moisture-sensor) + +## Table of contents + +* [Capabilities](#capabilities) +* [Health](#device-health) +* [Troubleshooting](#troubleshooting) + +## Capabilities + +* **Water Sensor** - can detect presence of water (dry or wet) +* **Sensor** - detects sensor events +* **Battery** - defines device uses a battery +* **Temperature Measurement** - represents capability to measure temperature +* **Health Check** - indicates ability to get device health notifications + +## Device Health + +Smartsense Moisture is a Z-wave sleepy device type and checks in 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 + +## Troubleshooting + +If the device doesn't pair when trying from the SmartThings mobile app, it is possible that the sensor is out of range. +Pairing needs to be tried again by placing the sensor closer to the hub. +Instructions related to pairing, resetting and removing the different motion sensors from SmartThings can be found in the following links +for the different models: +* [FortrezZ Moisture Sensor Troubleshooting Tips](https://support.smartthings.com/hc/en-us/articles/200930740-FortrezZ-Moisture-Sensor) diff --git a/devicetypes/smartthings/smartsense-moisture.src/smartsense-moisture.groovy b/devicetypes/smartthings/smartsense-moisture.src/smartsense-moisture.groovy index ebd5888..e2d78f4 100644 --- a/devicetypes/smartthings/smartsense-moisture.src/smartsense-moisture.groovy +++ b/devicetypes/smartthings/smartsense-moisture.src/smartsense-moisture.groovy @@ -17,9 +17,11 @@ metadata { capability "Sensor" capability "Battery" capability "Temperature Measurement" + capability "Health Check" fingerprint deviceId: "0x2001", inClusters: "0x30,0x9C,0x9D,0x85,0x80,0x72,0x31,0x84,0x86" fingerprint deviceId: "0x2101", inClusters: "0x71,0x70,0x85,0x80,0x72,0x31,0x84,0x86" + fingerprint mfr:"0084", prod:"0063", model:"010C", deviceJoinName: "FortrezZ Moisture Sensor" } simulator { @@ -89,6 +91,11 @@ def parse(String description) { return result } +def updated() { + // Device-Watch simply pings if no device events received for 482min(checkInterval) + sendEvent(name: "checkInterval", value: 2 * 4 * 60 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID]) +} + def zwaveEvent(physicalgraph.zwave.commands.wakeupv1.WakeUpNotification cmd) { [descriptionText: "${device.displayName} woke up", isStateChange: false]