On my dashboard, When I click the button to enable the switch, it enables, but a second later it slides back to the off position. The switch however stays on. If I click the reload button in the top right of HA, the dashboard has the correct state. It does the same thing to disable the switch. Clicking the button does turn off the switch, but a second later it slides back to the on position. I dont know how to make this button a toggle, and not an on/off. Any assistance would be great. I created a video of whats happening.
What does your OZW.log say? Or what is the switch status in OZWCP?
Here is the log
It works in the control panel and the states stays like it should. i’m not quite sure what to look for in that log file.
I am more than willing to learn if someone could steer me in the right directions.
What are your polling settings? Also, I would add your secure key to the Z-Wave config file.
I took a screenshot of the Zwave control panel with the switch. I dont see any polling settings on it.
Something I have discovered. The switch works on my android phone. Its just my PC browsers that have the problem. I tried it on chrome and Firefox. Clearing the cache/history didn’t help either.
The polling setting is added to your config file for HA. Hmm strange about the browser issue. Did you upgrade to 0.26? I saw there were Z-Wave improvements
I tried a few polling settings in my config.
No matter what I set it to, it didnt make a difference.
Here is my zwave config.
zwave:
usb_path: /dev/ttyACM0
polling_interval: 60000
customize:
switch.kitchen_switch_switch_4:
polling_intensity: 1
I’m having the exact same issue. I’m using DragonTech Z-WavePlus switches (both dimmer and on/off) and connecting using HomeSeer Z-Stick+.
I initially paired everything on my demo install of HomeSeer and HomeAssistant seems to be pulling the information in just fine. As soon as I click the toggle and it goes to on, the light turns on and then a few seconds later the toggle returns to the off position. Honestly, I haven’t tried refreshing like you did, but it usually requires a recycle of HA to be able to display the correct status and ultimately turn the light off, which as you can guess, once I click the toggle to go to off, the light turns off and then the toggle flips itself back to on until I restart HA.
I haven’t had time lately to troubleshoot it. Its interesting that you said you used homeseer before HA. I did as well. I wonder if the way homeseer interacted with the z wave devices is somehow not working with HA. I was going to disconnect the devices and repair them to the z stick and see what happens.
I upgraded to the latest version of HA, and tried re-pairing my switch with the controller… It did not help.
I was already running the latest version and that didn’t help, but I haven’t wiped my controller yet and re-paired the switch yet. Since you didn’t have any luck, I’m not sure I want to go through with the hassle of it.
I can confirm that this is STILL an issue in 0.27 of Home Assistant. I’ve wiped my controller and have most everything else working, but not the z-wave switches. Upon further investigation, it’s exactly as described in the original post. You turn on/off a switch, it turns on and then off. If you click the refresh button, it shows the correct state and can then turn the switch back off again. As suspected, when you turn off, it turns BACK on again.
Any assistance would be greatly appreciated as this is the one item from me dropping my HomeSeer demo install and making the switch to Home Assistant.
My configuration:
Home Assistant 0.27
Raspberry PI3
HomeSeer Stick+
DragonTech and now HomeSeer Z-Wave Plus On/Off and Dimmer switches
I still haven’t fixed it. I’ve just been using refresh.
I’m curious… is your install using the All-In-One Installer or a manual install? I installed using the AIO and had quite a few issues with it initially, so I’m wondering if it this is my problem.
So, I re-installed everything fresh manually and am getting the same exact results. One thing I did try was flipping the switches from a mobile device. Oddly enough, if I have streaming upda tes turned, it works as expected. So, I tried on my Windows 10 Enterprise machine using Chrome, Firefox and Edge and all are yielding the exact same results.
Now, it occurs to me to try in a virtual machine and on a different computer even… once I do that, everything works. So, I can confirm that it’s something that we both are running on our local machines that is causing this and 100% not an error within Open Z-Wave or Home Assistant itself.
Hope this helps.
Interesting. What OS did you use on your VM?
I’ve tried on Windows Server 2008 R2, 2012 R2, OSX, Windows 8.1 and Windows 10. All worked except Windows 10, but all others were VMs except OSX and Windows 10. Try running it on your mobile device and see if it magically works.
Yeah. I found it works on my mobile. It doesn’t work on my Windows 7 box either. I tried every browser. It wad a fresh install of windows 7 too. I don’t know what would be causing it…
FYI, I found this thread while searching on this same problem. If I clicked a switch off, it would still show on. Clicking it to off again would often update the status correctly with no change in the actual light. Sometimes that involved clicking it on and then off again. I was seeing this mostly with some DragonTech dimmers (PD-100, functionally identical to WD-100).
While investigating this, I discovered that the zwave library was making an immediate request for the dimmer’s value after sending a command. That was generally inaccurate, especially for “off” commands, since the dimmer has a ramp-up and ramp-down when the switch state is changed. The default dim time was such that first response to an “off” command usually indicated a value of 66 (in other words, not off!). I observed that there was a two-second delay, followed by another refresh of the value. This was still so fast that it usually got a value of 33 (still not off!).
I went looking and found that there are a couple of Z-Wave options that helped in my situation.
In configuration.yaml, my zwave section looks like this:
zwave:
usb_path: /dev/ttyACM0
customize:
light.dragon_tech_in_wall_dimmer_level_2_0:
refresh_value: true
delay: 5
I’m still playing with this a little bit, but five seconds delay and five second refresh seem to fix the problem for me. It DOES take a few seconds for the switch and indicator to show correctly in the interface, but it works correctly.
I have to play with one other bit for these devices, in that they don’t seem to report their value consistently when manually clicked on or off from the dimmer device. I’m not at home right now, so I can’t play with that, but that’s next on my list.
Also note that if you have updated the default dim time on the dimmer module, the switch not sticking problem is mostly solved, as the two-second default refresh is faster than the minimum 10ms dim time. I have a couple of lamps that don’t dim nicely and have the dim time set to minimum, and did not see the problem there. I also have two Everspring appliance on/off modules, but those seemed to do the right thing most of the time. I’ll have to experiment more tonight to see if they also need to be added to the customize section with updated refresh and delay values.
Happy automating…
jonathan
[edit: z-wave parameter reference link: https://home-assistant.io/getting-started/z-wave/]
[edit #2: Another helpful fellow noticed that the docs are incorrect, and the value for refresh_value is a true/false. If true, the value is refreshed after delay seconds. Thanks, @dcnoren and @er0ck !]