Merge pull request #1537 from pchomal/zwave_thermostat

[CHF-480] Health Check implementation for Z-Wave Thermostat
This commit is contained in:
Jack Chi
2017-03-21 18:01:13 -07:00
committed by GitHub

View File

@@ -20,6 +20,7 @@ metadata {
capability "Configuration"
capability "Polling"
capability "Sensor"
capability "Health Check"
attribute "thermostatFanState", "string"
@@ -30,6 +31,7 @@ metadata {
fingerprint deviceId: "0x08"
fingerprint inClusters: "0x43,0x40,0x44,0x31"
fingerprint mfr:"0039", prod:"0011", model:"0001", deviceJoinName: "Honeywell Z-Wave Thermostat"
}
// simulator metadata
@@ -123,6 +125,11 @@ metadata {
}
}
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])
}
def parse(String description)
{
def map = createEvent(zwaveEvent(zwave.parse(description, [0x42:1, 0x43:2, 0x31: 3])))
@@ -393,6 +400,14 @@ def setCoolingSetpoint(Double degrees, Integer delay = 30000) {
], delay)
}
/**
* PING is used by Device-Watch in attempt to reach the Device
* */
def ping() {
log.debug "ping() called"
poll()
}
def configure() {
delayBetween([
zwave.thermostatModeV2.thermostatModeSupportedGet().format(),