This have been an on going event for a long time, just keep forgetting to post about it unless I see it as it happens in the Logs.
Everything works just fine, but the Log gets flooded.
I'm only using one of the outlets for two led landscaping lights. Here is what I have going on.........
Here is the single outlet in use........
When the Sunset timer turns on the outlet this is what you first see......
Here is what follows....................................................
I see the problem in the code.. but it would take longer than I have to fix it... Plus I don't have one of these to test with... (ep=null so it is basically just looping and requesting the same report as it got over and over again)
def zwaveEvent(hubitat.zwave.commands.switchbinaryv1.SwitchBinaryReport cmd, ep = null) {
log.debug "SwitchBinaryReport ${cmd} - ep ${ep}"
if (ep) {
def event
def childDevice = childDevices.find {
it.deviceNetworkId == "$device.deviceNetworkId-ep$ep"
}
if (childDevice) childDevice.sendEvent(name: "switch", value: cmd.value ? "on" : "off")
if (cmd.value) {
event = [createEvent([name: "switch", value: "on"])]
} else {
def allOff = true
childDevices.each {
n->
if (n.deviceNetworkId != "$device.deviceNetworkId-ep$ep" && n.currentState("switch").value != "off") allOff = false
}
if (allOff) {
event = [createEvent([name: "switch", value: "off"])]
} else {
event = [createEvent([name: "switch", value: "on"])]
}
}
return event
} else {
def result = createEvent(name: "switch", value: cmd.value ? "on" : "off", type: "digital")
def cmds = []
cmds << encap(zwave.switchBinaryV1.switchBinaryGet(), 1)
cmds << encap(zwave.switchBinaryV1.switchBinaryGet(), 2)
return [result, response(commands(cmds))] // returns the result of reponse()
}
}
1 Like
But you could comment out that section until a fix is posted..
1 Like
We don't even support those switches anymore. They are grandfathered in but what @bcopeland posted would be the fastest fix.
1 Like
Find the section and add /* at the beginning and */ at the end.
Like this...
/*
def zwaveEvent(hubitat.zwave.commands.switchbinaryv1.SwitchBinaryReport cmd, ep = null) {
log.debug "SwitchBinaryReport ${cmd} - ep ${ep}"
if (ep) {
def event
def childDevice = childDevices.find {
it.deviceNetworkId == "$device.deviceNetworkId-ep$ep"
}
if (childDevice) childDevice.sendEvent(name: "switch", value: cmd.value ? "on" : "off")
if (cmd.value) {
event = [createEvent([name: "switch", value: "on"])]
} else {
def allOff = true
childDevices.each {
n->
if (n.deviceNetworkId != "$device.deviceNetworkId-ep$ep" && n.currentState("switch").value != "off") allOff = false
}
if (allOff) {
event = [createEvent([name: "switch", value: "off"])]
} else {
event = [createEvent([name: "switch", value: "on"])]
}
}
return event
} else {
def result = createEvent(name: "switch", value: cmd.value ? "on" : "off", type: "digital")
def cmds = []
cmds << encap(zwave.switchBinaryV1.switchBinaryGet(), 1)
cmds << encap(zwave.switchBinaryV1.switchBinaryGet(), 2)
return [result, response(commands(cmds))] // returns the result of reponse()
}
}
*/
@anon61068208 @bcopeland Does this look correct?
1 Like
Yep.. That should do until someone fixes the code... You wonโt get proper status updates.. But you wonโt be in an endless loop
1 Like
ericm
April 3, 2020, 11:12pm
10
Took me a while to get to this because I couldn't find my NZW97 (it has been discontinued). I finally found it this afternoon and updated the driver to reduce the network traffic.
1 Like
system
Closed
September 22, 2022, 5:48pm
11
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.