From 29c7049d608061079100e5a6d5c95e9f7da1084b Mon Sep 17 00:00:00 2001
From: "piyush.c"
Date: Thu, 13 Apr 2017 13:07:46 +0530
Subject: [PATCH] [CHF-561] Health Check Plant Link
---
devicetypes/osotech/plantlink.src/.st-ignore | 2 ++
devicetypes/osotech/plantlink.src/README.md | 33 +++++++++++++++++++
.../osotech/plantlink.src/plantlink.groovy | 13 +++++++-
.../smartthings/plant-link.src/README.md | 2 +-
.../smartthings/zwave-lock.src/README.md | 5 +--
5 files changed, 49 insertions(+), 6 deletions(-)
create mode 100644 devicetypes/osotech/plantlink.src/.st-ignore
create mode 100644 devicetypes/osotech/plantlink.src/README.md
diff --git a/devicetypes/osotech/plantlink.src/.st-ignore b/devicetypes/osotech/plantlink.src/.st-ignore
new file mode 100644
index 0000000..f78b46e
--- /dev/null
+++ b/devicetypes/osotech/plantlink.src/.st-ignore
@@ -0,0 +1,2 @@
+.st-ignore
+README.md
diff --git a/devicetypes/osotech/plantlink.src/README.md b/devicetypes/osotech/plantlink.src/README.md
new file mode 100644
index 0000000..6ffde56
--- /dev/null
+++ b/devicetypes/osotech/plantlink.src/README.md
@@ -0,0 +1,33 @@
+# Osotech Plant Link
+
+Cloud Execution
+
+Works with:
+
+* [OSO Technologies PlantLink Soil Moisture Sensor](https://www.smartthings.com/works-with-smartthings/oso-technologies/oso-technologies-plantlink-soil-moisture-sensor)
+
+## Table of contents
+
+* [Capabilities](#capabilities)
+* [Health](#device-health)
+* [Troubleshooting](#troubleshooting)
+
+## Capabilities
+
+* **Sensor** - detects sensor events
+* **Health Check** - indicates ability to get device health notifications
+
+## Device Health
+
+Plant Link sensor is a ZigBee sleepy device and checks in every 15 minutes.
+Device-Watch allows 2 check-in misses from device plus some lag time. So Check-in interval = (2*15 + 2)mins = 32 mins.
+
+* __32min__ 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:
+* [OSO Technologies PlantLink Soil Moisture Sensor Troubleshooting Tips](https://support.smartthings.com/hc/en-us/articles/206868986-PlantLink-Soil-Moisture-Sensor)
diff --git a/devicetypes/osotech/plantlink.src/plantlink.groovy b/devicetypes/osotech/plantlink.src/plantlink.groovy
index 1633fb5..79cf20b 100644
--- a/devicetypes/osotech/plantlink.src/plantlink.groovy
+++ b/devicetypes/osotech/plantlink.src/plantlink.groovy
@@ -24,6 +24,7 @@ import groovy.json.JsonBuilder
metadata {
definition (name: "PlantLink", namespace: "OsoTech", author: "Oso Technologies") {
capability "Sensor"
+ capability "Health Check"
command "setStatusIcon"
command "setPlantFuelLevel"
@@ -70,6 +71,16 @@ metadata {
}
}
+def updated() {
+ // Device-Watch allows 2 check-in misses from device
+ sendEvent(name: "checkInterval", value: 2 * 15 * 60 + 2 * 60, displayed: false, data: [protocol: "zigbee", hubHardwareId: device.hub.hardwareID])
+}
+
+def installed() {
+ // Device-Watch allows 2 check-in misses from device
+ sendEvent(name: "checkInterval", value: 2 * 15 * 60 + 2 * 60, displayed: false, data: [protocol: "zigbee", hubHardwareId: device.hub.hardwareID])
+}
+
def setStatusIcon(value){
def status = ''
switch (value) {
@@ -161,4 +172,4 @@ def parseDescriptionAsMap(description) {
map += []
}
}
-}
\ No newline at end of file
+}
diff --git a/devicetypes/smartthings/plant-link.src/README.md b/devicetypes/smartthings/plant-link.src/README.md
index 8ec24e4..397ea13 100644
--- a/devicetypes/smartthings/plant-link.src/README.md
+++ b/devicetypes/smartthings/plant-link.src/README.md
@@ -21,7 +21,7 @@ Works with:
## Device Health
-Plant Link sensor is a Z-wave sleepy device and checks in every 15 minutes.
+Plant Link sensor is a ZigBee sleepy device and checks in every 15 minutes.
Device-Watch allows 2 check-in misses from device plus some lag time. So Check-in interval = (2*15 + 2)mins = 32 mins.
* __32min__ checkInterval
diff --git a/devicetypes/smartthings/zwave-lock.src/README.md b/devicetypes/smartthings/zwave-lock.src/README.md
index ae64536..863622f 100644
--- a/devicetypes/smartthings/zwave-lock.src/README.md
+++ b/devicetypes/smartthings/zwave-lock.src/README.md
@@ -1,4 +1,4 @@
-# Z-Wave Switch
+# Z-Wave Lock
Cloud Execution
@@ -6,7 +6,6 @@ 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)
@@ -41,5 +40,3 @@ If the device doesn't pair when trying from the SmartThings mobile app, it is po
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)
-
-