mirror of
https://github.com/mtan93/SmartThingsPublic.git
synced 2026-03-14 05:11:50 +00:00
DVCSMP-2155 ZigBee switch power DH health check
* Add capability Health Check * specify 5 minute reporting interval to `zigbee.onOffConfig()` * set the checkInterval attribute in `configure()` (as it sets the reporting interval) * implements `ping()` by sending the `zigbee.onOffRefresh()` command For the Google Home project, supports specifically * GE/Jasco ZigBee Plug-in Smart Switch (45853) * GE/Jasco ZigBee In-Wall Smart Switch (45856) The DH itself supports those, plus the Smartthings Outlet V4 * `fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 000F, 0B04", outClusters: "0019"` and two other generic fingerprints: * `fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0B04"` * `fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0702"`
This commit is contained in:
@@ -20,6 +20,7 @@ metadata {
|
||||
capability "Power Meter"
|
||||
capability "Sensor"
|
||||
capability "Switch"
|
||||
capability "Health Check"
|
||||
|
||||
fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0B04"
|
||||
fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0702"
|
||||
@@ -77,10 +78,26 @@ def on() {
|
||||
}
|
||||
|
||||
def refresh() {
|
||||
zigbee.onOffRefresh() + zigbee.simpleMeteringPowerRefresh() + zigbee.electricMeasurementPowerRefresh() + zigbee.onOffConfig() + zigbee.simpleMeteringPowerConfig() + zigbee.electricMeasurementPowerConfig()
|
||||
Integer reportIntervalMinutes = 5
|
||||
zigbee.onOffRefresh() + zigbee.simpleMeteringPowerRefresh() + zigbee.electricMeasurementPowerRefresh() + zigbee.onOffConfig(0,reportIntervalMinutes * 60) + zigbee.simpleMeteringPowerConfig() + zigbee.electricMeasurementPowerConfig()
|
||||
}
|
||||
|
||||
def configure() {
|
||||
log.debug "Configuring Reporting and Bindings."
|
||||
refresh()
|
||||
log.debug "in configure()"
|
||||
configureHealthCheck()
|
||||
}
|
||||
|
||||
def configureHealthCheck() {
|
||||
Integer hcIntervalMinutes = 12
|
||||
refresh()
|
||||
sendEvent(name: "checkInterval", value: hcIntervalMinutes * 60, displayed: false, data: [protocol: "zigbee", hubHardwareId: device.hub.hardwareID])
|
||||
}
|
||||
|
||||
def updated() {
|
||||
log.debug "in updated()"
|
||||
configureHealthCheck()
|
||||
}
|
||||
|
||||
def ping() {
|
||||
return zigbee.onOffRefresh()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user