From ef8611d2eaa8bcb529ecb4984292dadb727133a9 Mon Sep 17 00:00:00 2001
From: "piyush.c"
Date: Fri, 16 Dec 2016 17:21:02 +0530
Subject: [PATCH 1/4] [CHF-482] Health Check implementation for Z-Wave Metering
Dimmer
---
.../zwave-metering-dimmer.groovy | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/devicetypes/smartthings/zwave-metering-dimmer.src/zwave-metering-dimmer.groovy b/devicetypes/smartthings/zwave-metering-dimmer.src/zwave-metering-dimmer.groovy
index 4631203..7773917 100644
--- a/devicetypes/smartthings/zwave-metering-dimmer.src/zwave-metering-dimmer.groovy
+++ b/devicetypes/smartthings/zwave-metering-dimmer.src/zwave-metering-dimmer.groovy
@@ -25,10 +25,12 @@ metadata {
capability "Switch Level"
capability "Sensor"
capability "Actuator"
+ capability "Health Check"
command "reset"
fingerprint inClusters: "0x26,0x32"
+ fingerprint mfr:"0086", prod:"0003", model:"001B", deviceJoinName: "Aeon Labs Micro Smart Dimmer 2E"
}
simulator {
@@ -98,6 +100,9 @@ def parse(String description) {
}
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])
+
response(refresh())
}
@@ -162,6 +167,14 @@ def poll() {
], 1000)
}
+/**
+ * PING is used by Device-Watch in attempt to reach the Device
+ * */
+def ping() {
+ log.debug "ping() called"
+ refresh()
+}
+
def refresh() {
delayBetween([
zwave.switchMultilevelV1.switchMultilevelGet().format(),
From 00224c2d0b8f57201e068690018dfa825e222583 Mon Sep 17 00:00:00 2001
From: Zach Varberg
Date: Thu, 30 Mar 2017 15:44:40 -0500
Subject: [PATCH 2/4] Support config on both temp-humidty firmwares
This solves an issue with invalid configuration of the reporting for
humidity on the smartsense-temp-humidity-sensor. This issue was masked
by the fact that the device has a default configuration for reporting
humidity, but the configuration has never been valid as it used an
incorrect dataType for the configuration.
This resolves: https://smartthings.atlassian.net/browse/DPROT-263
This resolves: https://smartthings.atlassian.net/browse/EBF-1205
This resolves: https://smartthings.atlassian.net/browse/DVCSMP-2420
---
.../smartsense-temp-humidity-sensor.groovy | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/devicetypes/smartthings/smartsense-temp-humidity-sensor.src/smartsense-temp-humidity-sensor.groovy b/devicetypes/smartthings/smartsense-temp-humidity-sensor.src/smartsense-temp-humidity-sensor.groovy
index a655c21..4210ee2 100644
--- a/devicetypes/smartthings/smartsense-temp-humidity-sensor.src/smartsense-temp-humidity-sensor.groovy
+++ b/devicetypes/smartthings/smartsense-temp-humidity-sensor.src/smartsense-temp-humidity-sensor.groovy
@@ -135,10 +135,7 @@ def refresh() {
return zigbee.readAttribute(0xFC45, 0x0000, ["mfgCode": 0x104E]) + // New firmware
zigbee.readAttribute(0xFC45, 0x0000, ["mfgCode": 0xC2DF]) + // Original firmware
zigbee.readAttribute(zigbee.TEMPERATURE_MEASUREMENT_CLUSTER, 0x0000) +
- zigbee.readAttribute(zigbee.POWER_CONFIGURATION_CLUSTER, 0x0020) +
- zigbee.configureReporting(0xFC45, 0x0000, DataType.INT16, 30, 3600, 100) +
- zigbee.batteryConfig() +
- zigbee.temperatureConfig(30, 300)
+ zigbee.readAttribute(zigbee.POWER_CONFIGURATION_CLUSTER, 0x0020)
}
def configure() {
@@ -150,5 +147,10 @@ def configure() {
// temperature minReportTime 30 seconds, maxReportTime 5 min. Reporting interval if no activity
// battery minReport 30 seconds, maxReportTime 6 hrs by default
- return refresh()
+ return refresh() +
+ zigbee.configureReporting(0xFC45, 0x0000, DataType.UINT16, 30, 3600, 100, ["mfgCode": 0x104E]) + // New firmware
+ zigbee.configureReporting(0xFC45, 0x0000, DataType.UINT16, 30, 3600, 100, ["mfgCode": 0xC2DF]) + // Original firmware
+ zigbee.batteryConfig() +
+ zigbee.temperatureConfig(30, 300)
+
}
From 515fab9fa4ed916ead83428b7141851ba98fb7e2 Mon Sep 17 00:00:00 2001
From: Parijat Das
Date: Wed, 29 Mar 2017 18:15:20 -0700
Subject: [PATCH 3/4] Added health-check for Zigbee Lock
---
.../smartthings/zigbee-lock.src/.st-ignore | 2 +
.../smartthings/zigbee-lock.src/README.md | 46 +++++++++++++++++++
.../zigbee-lock.src/zigbee-lock.groovy | 11 +++++
3 files changed, 59 insertions(+)
create mode 100644 devicetypes/smartthings/zigbee-lock.src/.st-ignore
create mode 100644 devicetypes/smartthings/zigbee-lock.src/README.md
diff --git a/devicetypes/smartthings/zigbee-lock.src/.st-ignore b/devicetypes/smartthings/zigbee-lock.src/.st-ignore
new file mode 100644
index 0000000..f78b46e
--- /dev/null
+++ b/devicetypes/smartthings/zigbee-lock.src/.st-ignore
@@ -0,0 +1,2 @@
+.st-ignore
+README.md
diff --git a/devicetypes/smartthings/zigbee-lock.src/README.md b/devicetypes/smartthings/zigbee-lock.src/README.md
new file mode 100644
index 0000000..2dc27b4
--- /dev/null
+++ b/devicetypes/smartthings/zigbee-lock.src/README.md
@@ -0,0 +1,46 @@
+# Zigbee Lock
+
+Cloud Execution
+
+Works with:
+
+* [Yale Push Button Deadbolt (YRD210-HA)](https://www.smartthings.com/works-with-smartthings/door-locks/yale-push-button-deadbolt-yrd210)
+* [Yale Touchscreen Lever (YRL220-ZB)](https://www.smartthings.com/works-with-smartthings/door-locks/yale-touchscreen-lever-yrl220)
+* [Yale Touchscreen Deadbolt (YRD220-HA))](https://www.smartthings.com/works-with-smartthings/door-locks/yale-touchscreen-deadbolt-yrd220)
+* [Yale Key Free Touchscreen Deadbolt (YRD240-HA)](https://www.smartthings.com/works-with-smartthings/door-locks/yale-key-free-touchscreen-deadbolt-yrd240)
+* [Yale Push Button Lever Lock (YRL210-HA)](https://www.smartthings.com/works-with-smartthings/door-locks/yale-push-button-lever-lock-yrl210)
+
+## Table of contents
+
+* [Capabilities](#capabilities)
+* [Health](#device-health)
+* [Battery](#battery-specification)
+* [Troubleshooting](#troubleshooting)
+
+## Capabilities
+
+* **Actuator** - represents that a Device has commands
+* **Lock** - allows for the control of a lock device
+* **Refresh** - _refresh()_ command for status updates
+* **Sensor** - detects sensor events
+* **Battery** - defines device uses a battery
+* **Configuration** - _configure()_ command called when device is installed or device preferences updated
+* **Health Check** - indicates ability to get device health notifications
+
+## Device Health
+
+Yale Push Button Deadbolt (YRD210-HA) is a Zigbee device and checks in every 1 hour.
+Device-Watch allows 2 check-in misses from device plus some lag time. So Check-in interval = (2*60 + 2)mins = 122 mins.
+
+ * __122min__ checkInterval
+
+## Battery Specification
+
+Four 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 sensor from SmartThings can be found in the following link:
+* [Yale Locks Troubleshooting Tips](https://support.smartthings.com/hc/en-us/articles/205138400)
\ No newline at end of file
diff --git a/devicetypes/smartthings/zigbee-lock.src/zigbee-lock.groovy b/devicetypes/smartthings/zigbee-lock.src/zigbee-lock.groovy
index fb31a6b..b14730d 100644
--- a/devicetypes/smartthings/zigbee-lock.src/zigbee-lock.groovy
+++ b/devicetypes/smartthings/zigbee-lock.src/zigbee-lock.groovy
@@ -24,6 +24,7 @@ import physicalgraph.zigbee.zcl.DataType
capability "Sensor"
capability "Battery"
capability "Configuration"
+ capability "Health Check"
fingerprint profileId: "0104", inClusters: "0000,0001,0003,0004,0005,0009,0020,0101,0402,0B05,FDBD", outClusters: "000A,0019", manufacturer: "Kwikset", model: "SMARTCODE_DEADBOLT_5", deviceJoinName: "Kwikset 5-Button Deadbolt"
fingerprint profileId: "0104", inClusters: "0000,0001,0003,0004,0005,0009,0020,0101,0402,0B05,FDBD", outClusters: "000A,0019", manufacturer: "Kwikset", model: "SMARTCODE_LEVER_5", deviceJoinName: "Kwikset 5-Button Lever"
@@ -83,6 +84,9 @@ def uninstalled() {
}
def configure() {
+ // Device-Watch allows 2 check-in misses from device + ping (plus 2 min lag time)
+ sendEvent(name: "checkInterval", value: 2 * 60 * 60 + 2 * 60, displayed: false, data: [protocol: "zigbee", hubHardwareId: device.hub.hardwareID])
+
def cmds =
zigbee.configureReporting(CLUSTER_DOORLOCK, DOORLOCK_ATTR_LOCKSTATE,
DataType.ENUM8, 0, 3600, null) +
@@ -92,6 +96,13 @@ def configure() {
return refresh() + cmds // send refresh cmds as part of config
}
+/**
+ * PING is used by Device-Watch in attempt to reach the Device
+ * */
+def ping() {
+ zigbee.readAttribute(CLUSTER_DOORLOCK, DOORLOCK_ATTR_LOCKSTATE)
+}
+
def refresh() {
def cmds =
zigbee.readAttribute(CLUSTER_DOORLOCK, DOORLOCK_ATTR_LOCKSTATE) +
From 43bedd41a8430bd5dbf88ee56fa61cab25872a5a Mon Sep 17 00:00:00 2001
From: CosmicPuppy
Date: Mon, 3 Apr 2017 00:21:11 -0700
Subject: [PATCH 4/4] To Wattvision power metering Sensor DTH, added Capability
"Sensor" per
http://docs.smartthings.com/en/latest/device-type-developers-guide/overview.html?highlight=sensor%20actuator#actuator-and-sensor.
---
devicetypes/smartthings/wattvision.src/wattvision.groovy | 1 +
1 file changed, 1 insertion(+)
diff --git a/devicetypes/smartthings/wattvision.src/wattvision.groovy b/devicetypes/smartthings/wattvision.src/wattvision.groovy
index e87a344..e2d136c 100644
--- a/devicetypes/smartthings/wattvision.src/wattvision.groovy
+++ b/devicetypes/smartthings/wattvision.src/wattvision.groovy
@@ -20,6 +20,7 @@ metadata {
definition(name: "Wattvision", namespace: "smartthings", author: "Steve Vlaminck") {
capability "Power Meter"
capability "Refresh"
+ capability "Sensor"
attribute "powerContent", "string"
}