Merge pull request #1816 from skt123/zen_thermostat

[CHF-572] Added Health Check Implementation for Zen Thermostat.
This commit is contained in:
Jack Chi
2017-03-24 14:18:49 -07:00
committed by GitHub
3 changed files with 50 additions and 5 deletions

View File

@@ -0,0 +1,2 @@
.st-ignore
README.md

View File

@@ -0,0 +1,37 @@
# Zen Thermostat
Cloud Execution
Works with:
* [Zen Thermostat](https://www.smartthings.com/works-with-smartthings/zen/zen-thermostat)
## Table of contents
* [Capabilities](#capabilities)
* [Health](#device-health)
## Capabilities
* **Actuator** - represents that a Device has commands
* **Thermostat** - allows for the control of a thermostat device
* **Temperature Measurement** - get the temperature from a Device that reports current temperature
* **Configuration** - _configure()_ command called when device is installed or device preferences updated
* **Refresh** - _refresh()_ command for status updates
* **Sensor** - it represents that a Device has attributes
* **Health Check** - indicates ability to get device health notifications
## Device Health
Zen Thermostat with reporting interval of 5 mins.
SmartThings platform will ping the device after `checkInterval` seconds of inactivity in last attempt to reach the device before marking it `OFFLINE`
* __12min__ checkInterval
## 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.
Other troubleshooting tips are listed as follows:
* [Zen Thermostat Troubleshooting:](https://support.smartthings.com/hc/en-us/articles/204356564-Zen-Thermostat)

View File

@@ -12,8 +12,9 @@ metadata {
capability "Configuration"
capability "Refresh"
capability "Sensor"
fingerprint profileId: "0104", endpointId: "01", inClusters: "0000,0001,0003,0004,0005,0020,0201,0202,0204,0B05", outClusters: "000A, 0019"
capability "Health Check"
fingerprint profileId: "0104", endpointId: "01", inClusters: "0000,0001,0003,0004,0005,0020,0201,0202,0204,0B05", outClusters: "000A, 0019", manufacturer: "Zen Within", model: "Zen-01", deviceJoinName: "Zen Thermostat"
//attribute "temperatureUnit", "number"
@@ -467,8 +468,12 @@ def fanAuto() {
"st wattr 0x${device.deviceNetworkId} 1 0x202 0 0x30 {05}"
}
/**
* PING is used by Device-Watch in attempt to reach the Device
* */
def ping() {
refresh()
}
// =============== SmartThings Default Fucntions: refresh, configure, poll ===============
def refresh()
@@ -502,6 +507,7 @@ def poll()
def configure()
{
sendEvent(name: "checkInterval", value: 60 * 12, displayed: false, data: [protocol: "zigbee", hubHardwareId: device.hub.hardwareID])
log.debug "configure() - binding & attribute report"
[
//Set long poll interval to 2 qs
@@ -511,7 +517,7 @@ def configure()
//Thermostat - Cluster 201
"zdo bind 0x${device.deviceNetworkId} 1 1 0x201 {${device.zigbeeId}} {}", "delay 500",
"zcl global send-me-a-report 0x201 0 0x29 5 300 {3200}",
"zcl global send-me-a-report 0x201 0 0x29 5 300 {3200}",
"send 0x${device.deviceNetworkId} 1 1", "delay 500",
"zcl global send-me-a-report 0x201 0x0011 0x29 5 300 {3200}",