Skip to content

Commit

Permalink
[Zigbee Dimmer/Switch Power] Fix loss of manual control over GE/Jasco…
Browse files Browse the repository at this point in the history
  • Loading branch information
tpmanley committed Nov 16, 2018
1 parent fba111b commit 7409759
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,14 @@ def ping() {
}

def refresh() {
zigbee.onOffRefresh() + zigbee.levelRefresh() + zigbee.simpleMeteringPowerRefresh() + zigbee.electricMeasurementPowerRefresh() + zigbee.onOffConfig(0, 300) + zigbee.levelConfig() + zigbee.simpleMeteringPowerConfig() + zigbee.electricMeasurementPowerConfig()
def cmds = zigbee.onOffRefresh() + zigbee.levelRefresh() + zigbee.simpleMeteringPowerRefresh() + zigbee.electricMeasurementPowerRefresh()
if (device.getDataValue("manufacturer") == "Jasco Products") {
// Some versions of hub firmware will incorrectly remove this binding causing manual control of switch to stop working
// These needs to be the first binding table entries because the device will automatically write these entries each time it restarts
cmds += ["zdo bind 0x${device.deviceNetworkId} 2 1 0x0006 {${device.zigbeeId}} {${device.zigbeeId}}", "delay 2000",
"zdo bind 0x${device.deviceNetworkId} 2 1 0x0008 {${device.zigbeeId}} {${device.zigbeeId}}", "delay 2000"]
}
cmds + zigbee.onOffConfig(0, 300) + zigbee.levelConfig() + zigbee.simpleMeteringPowerConfig() + zigbee.electricMeasurementPowerConfig()
}

def configure() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,13 @@ def on() {

def refresh() {
Integer reportIntervalMinutes = 5
zigbee.onOffRefresh() + zigbee.simpleMeteringPowerRefresh() + zigbee.electricMeasurementPowerRefresh() + zigbee.onOffConfig(0,reportIntervalMinutes * 60) + zigbee.simpleMeteringPowerConfig() + zigbee.electricMeasurementPowerConfig()
def cmds = zigbee.onOffRefresh() + zigbee.simpleMeteringPowerRefresh() + zigbee.electricMeasurementPowerRefresh()
if (device.getDataValue("manufacturer") == "Jasco Products") {
// Some versions of hub firmware will incorrectly remove this binding causing manual control of switch to stop working
// This needs to be the first binding table entry because the device will automatically write this entry each time it restarts
cmds += ["zdo bind 0x${device.deviceNetworkId} 2 1 0x0006 {${device.zigbeeId}} {${device.zigbeeId}}", "delay 2000"]
}
cmds + zigbee.onOffConfig(0, reportIntervalMinutes * 60) + zigbee.simpleMeteringPowerConfig() + zigbee.electricMeasurementPowerConfig()
}

def configure() {
Expand Down

0 comments on commit 7409759

Please sign in to comment.