I have a very simple automation that I've been trying to get to work. It should turn on when a button is pushed. The button is a custom device driver that correctly triggers other automations, but the simple automation does not work.
The screen shots below show three things:
- The log from the simple automation rule, which I interpret as working, except that the light switch does not turn on.
- The code in the device handler that sends the pushed event for button 1.
- The simple automation rule.
What am I doing wrong? I have deleted the automation and recreated it. I've rebooted my hub. I can turn the switch on and off with the UI. And the doorbell button triggers another automation correctly, although admittedly it is also a home grown app. I suspect that my custom button handler is not doing something correctly but so far I have been unable to figure out what that is.
The log from the automation makes it look like it should work!
Any suggestions are appreciated.
So the issue seems to be that the switch (an older GE Z-Wave in-wall switch) does not report its state back to the hub when the switch is turned off manually. SO the automation thinks the switch is on, and does not turn it on again, I guess.
When I hit refresh on the device page, the device does update to the correct state, but not when I manually change the switch. It is paired as a generic Z-Wave switch. I tried a couple of the other device drivers but they either don't work or have the same issue.
Turn off the "Enable on/off optimization" option you see in the bottom right of your screenshot, and it should take care of that problem.
If you don't care about physical (manually adjusting the switch) events making it back to the hub, that should be enough. If you do care, there are ways around that, but they all involve polling--periodically asking the switch for its state--and it's recommended to avoid that whenever possible. This is common behavior for a lot of "classic" Z-Wave switches due to a Lutron patent about this feature that many of them did not license; it has since expired, and newer devices, including most or all Z-Wave Plus devices, shouldn't have this problem.
Thanks for the reply! Turning off the on/off optimization did the trick. I remember the old polling debate on the SmartThings forums from back in the day . I'd prefer not to revert to that.
I don't recall this being an issue for this switch in the past on SmartThings but I may not have looked that closely if my automations worked. I just verified the same behavior on another similar vintage GE switch but that switch is almost never touched manually.
Day 4, and counting, fully on Hubitat after SmartThings deleted my V1 hub on June 30
Last I heard they just did polling for you whether you cared to or not. (That may have changed; it's what I remember reading in my early days on Hubitat, where lots of people came here from SmartThings, as many of us did, with switches like these.) Glad you got something figured out!