[CHF-493] Added Health Check Implementation for Micro Smart Switch 2E.

This commit is contained in:
sushant.k1
2016-12-22 12:37:58 +05:30
parent 0a82077b24
commit b5e1d652fd

View File

@@ -21,10 +21,13 @@ metadata {
capability "Refresh"
capability "Configuration"
capability "Sensor"
capability "Light"
capability "Health Check"
command "reset"
fingerprint inClusters: "0x25,0x32"
fingerprint mfr:"0086", prod:"0003", model:"0012", deviceJoinName: "Aeon Labs Micro Smart Switch 2E"
}
// simulator metadata
@@ -72,6 +75,8 @@ 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])
try {
if (!state.MSR) {
response(zwave.manufacturerSpecificV2.manufacturerSpecificGet().format())
@@ -178,6 +183,14 @@ def poll() {
])
}
/**
* PING is used by Device-Watch in attempt to reach the Device
* */
def ping() {
log.debug "ping() called"
refresh()
}
def refresh() {
delayBetween([
zwave.switchBinaryV1.switchBinaryGet().format(),