I am using a Zen 37 button controller to control three different lights and do some dimming. All was working fine until I replaced a zigbee Enbrighton switch with a Zen 73 and now the button that controls that switch which is set to toggle it only sends on commands. Same button and button rule that was being used with the previous switch and toggled correctly. I am using the Zooz Zen switches Advanced drivers. My Hub is a C8. Logs show Single pushes for the button and on commands for the switch. I think @jtp10181 will know why.
The old switch may have supported the "toggle" command. Try removing the toogle action from the rule and adding it again for the ZEN switch. Post a screenshot of the rule if still not working and I can test it out on my end.
@jtp10181 Dont know if I did what you asked but I took the kitchen light out and put in another light and it toggled fine. Put the kitchen light back in and it only toggles on.
No, not just change the light, actually remove the action so then the rule would be blank, and add it back again. I will test it out myself when I get a chance later today.
@jtp10181 Something I tried, replaced kitchen light with hallway light which is also a Zen73 and it toggled correctly. Put the kitchen light back and same thing. Took screen shot of events on both devices, dont know if it helps trouble shooting. I am really impressed by the things you and others do on here, wish I knew more
Did you delete the button action and make it again like I suggested?
Looks like the driver is behaving as expected, but the app keeps sending the on command for some reason.
Does the device correctly show the switch state "on" at the top right area Current States?
I did delete it and made it again. The device does display the correct state. Why do you think replacing the kitchen light with my hallway light (another Zen73) works right? @jtp10181 I do thank you for helping
No idea, doesn't make any sense.
You are using the exact same driver for both?
@jtp10181
Yes I am using the driver you built and I have four of those switches. I guess maybe I will physically change two switches around since it worked with another one.
Its not the switch causing the issue, it is the button controller app.
@bravenel have you seen this before where the toggle action keeps sending the ON command even though the device is already on?
Need to see the app logs.
@Johnnyvaneddie Go into the actual rule and turn on all the logging options. Might help to have debug logging enabled on the device as well. Then try to repeat again and post a screenshot of the logs.
The app looks at the device to decide what to do. If it's on, it turns it off, and vice versa. It's quite simple code.
if (it.currentSwitch == 'on') it.off()
else it.on()
Yeah thats what I figured it was that simple and why I asked the OP if the state was being reflected correctly on the device current states. My driver should only be sending "on" in lower case in the events, so it should work fine. I wonder if the states are corrupted somehow, or the data type is somehow set funny.
@Johnnyvaneddie, on the problem device, try switching the "type" (aka driver) to the one just named "Device" and save. It will have a command button to delete current states, press that then refresh the page, the right side states should be wiped out. Then switch back to my driver and run configure. Try the toggle command again after that procedure.
If still not working enable the logging as suggested above.
You should show a screenshot of Current States for the device. I don't think the logging is going to show anything useful. The most obvious possible reason would be the switch attribute not having the value 'on'.
Im not sure if I got all you asked for, could not find anything in the rule to turn on logging or see rule logs. Here is what I got. @bravenel I do see that the device (kitchen light) always shows the correct on or off state. I will try the driver swap next and let you know @jtp10181
So by driver swap you mean using the "Device" driver to clear the current states fixed it?
Hm... I wonder if I should add that as part of the configure in my driver.
That is what worked, everything else is beyond me.
Thanks it is good to know for future troubleshooting exactly what the fix was in case it comes up for anyone else.