From 1dae5d39369eda24efd43db4a063a6a9bd11a4fc Mon Sep 17 00:00:00 2001 From: Parijat Das Date: Thu, 25 May 2017 18:56:38 +0530 Subject: [PATCH] Added health check implementation for Aeon MultiSensor --- .../aeon-multisensor.src/.st-ignore | 2 + .../aeon-multisensor.src/README.md | 48 +++++++++++++++++++ .../aeon-multisensor.groovy | 18 +++++++ 3 files changed, 68 insertions(+) create mode 100644 devicetypes/smartthings/aeon-multisensor.src/.st-ignore create mode 100644 devicetypes/smartthings/aeon-multisensor.src/README.md diff --git a/devicetypes/smartthings/aeon-multisensor.src/.st-ignore b/devicetypes/smartthings/aeon-multisensor.src/.st-ignore new file mode 100644 index 0000000..71af75c --- /dev/null +++ b/devicetypes/smartthings/aeon-multisensor.src/.st-ignore @@ -0,0 +1,2 @@ +.st-ignore +README.md \ No newline at end of file diff --git a/devicetypes/smartthings/aeon-multisensor.src/README.md b/devicetypes/smartthings/aeon-multisensor.src/README.md new file mode 100644 index 0000000..aa61b0d --- /dev/null +++ b/devicetypes/smartthings/aeon-multisensor.src/README.md @@ -0,0 +1,48 @@ +# Aeon Multisensor + +Cloud Execution + +Works with: + +* [Aeotec MultiSensor (DSB05-ZWUS)](https://www.smartthings.com/products/aeotec-multisensor-5) + +## Table of contents + +* [Capabilities](#capabilities) +* [Health](#device-health) +* [Battery](#battery-specification) +* [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 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 + +## Battery Specification + +Four AAA 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: +* [Aeon MultiSensor Troubleshooting Tips](https://support.smartthings.com/hc/en-us/articles/206157226-How-to-connect-Aeon-Labs-MultiSensors) \ No newline at end of file diff --git a/devicetypes/smartthings/aeon-multisensor.src/aeon-multisensor.groovy b/devicetypes/smartthings/aeon-multisensor.src/aeon-multisensor.groovy index 0044570..b6f3135 100644 --- a/devicetypes/smartthings/aeon-multisensor.src/aeon-multisensor.groovy +++ b/devicetypes/smartthings/aeon-multisensor.src/aeon-multisensor.groovy @@ -20,6 +20,7 @@ metadata { capability "Illuminance Measurement" capability "Sensor" capability "Battery" + capability "Health Check" fingerprint deviceId: "0x2001", inClusters: "0x30,0x31,0x80,0x84,0x70,0x85,0x72,0x86" } @@ -93,6 +94,16 @@ metadata { } } +def installed(){ +// 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 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]) +} + // Parse incoming device messages to generate events def parse(String description) { @@ -179,6 +190,13 @@ def zwaveEvent(physicalgraph.zwave.Command cmd) { [:] } +/** + * PING is used by Device-Watch in attempt to reach the Device + * */ +def ping() { + secure(zwave.batteryV1.batteryGet()) +} + def configure() { delayBetween([ // send binary sensor report instead of basic set for motion