core: OpenZWave dimmable modules don't report final state
The problem
When using OpenZWave with plugin dimmers or dimmable bulbs, and you turn them “on” or “off” from the UI the following sequence occurs:
- user toggles switch in UI
- dimmer starts dimming process
- Hass queries the dimmer and gets the current state (partially dimmed)
- Hass updates the frontend with the partially dimmed state
- dimmer finishes dimming process
- There is no 6, the frontend is never updated with the final state of the dimmer
Environment
- Home Assistant Core release with the issue: 0.115.0
- Last working Home Assistant Core release (if known): Never with this integration
- Operating environment (OS/Container/Supervised/Core): HassOS 4.13
- Integration causing this issue: OpenZwave
- Link to integration documentation on our website: https://www.home-assistant.io/integrations/ozw/
Problem-relevant configuration.yaml
Traceback/Error logs
Additional information
This is not device specific as I’ve tried at least 4 different models of dimmer, my current ones are:
- Linear LB60Z-1 Dimmable LED Light Bulb
- Linear PD300Z-2 Plug-in Dimmer Module
In the old Z-Wave integration (https://www.home-assistant.io/docs/z-wave/installation/) this was solved by using device_config with refresh_value and a delay, however I don’t see any way to do that on OpenZWave
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 3
- Comments: 33 (9 by maintainers)
Still unfixed near as I can tell.
If the dimmer’s multilevel switch command class is >= V4, then OZW already will refresh the value until it reaches the target value reported by the switch.
If the dimmer’s multilevel switch command class is < V4, then yes, you can setting the
VerifyChanged
compatibility flag to true in the device XML file to force OZW to refresh the value until it reaches the target value. Example here. It works for my GE switch, but there are some quirks (see issue linked below). Since you are using the addon though, it is a difficult workaround because the addon does not provide easy access to the device files. I know some have done it, but as a container user I don’t know the details.In both cases, OZW is polling the value during the transition time. However, the way it’s currently implemented results in behavior that is a little erratic, and broken in some cases (some buggy Leviton devices). The issue is still open and in progress. Hopefully this can be addressed when the developer returns from his hiatus.
Note that the above behavior applies to OZW container images after build-150, and includes the addon v0.5.2.
A single refresh value (using mqtt or the zwave integration device configuration) is an OK workaround but falls short when you want to use transitions that are long (e.g. 30 seconds). You either need to globally configure the refresh value to the longest duration you can ever imagine using, or manually issue a refresh as part of an automation or script. It’s not a general purpose solution.
Ideally OZW handles this for us, which it is on the path to doing so. If that were not that case, then I would hope that HA would implement a general purpose solution this time.
One minor correction:
In Step 3 replace “Hass” with “OZW”. HA is not querying the switch for the dimmer level, OZW is reporting it. By default, OZW does a GET immediately after every SET. In this case the GET is replied to before the dimmer has transitioned to the final level. HA is just reporting the information it gets back from OZW.
You need to get the ValueIDKey by using something like MQTT Explorer. Here’s a discord conversation about it: https://discord.com/channels/330944238910963714/332357267364249621/744385440756269217
@PrplHaz4 see this for the discussion on how/where we’re going to specify device specific quirks: https://github.com/zwave-js/node-zwave-js/issues/1576
It would be great if we could capture the models of GE Dimmers and issues or quirks on the HA Z-Wave JS integration docs - finding good info on them has been nearly impossible despite the fact that so many people mention having problems or needing to use a special configuration with them…I’d even support a known issues section for the older Z-Wave integrations, but I don’t have good enough info to be the one writing it all down…
GE 12724 (Z-Wave)
polling_intensity: 1
GE 14294 (Z-Wave Plus)
refresh_value: true
anddelay: 3
, still buggyverifyChanges
GE Enbrighten 46203 (Latest, Z-Wave Plus, S2)
I am still having issues with zwave-js as well were the dimmers and the state in HA don’t match. Only with dimmers.
I have this issue with GE Enbrighten
ZW7101
bulbs. Since the bulb’s multilevel switch command class is only version 1, I was able to work around it by setting theVerifiedChanged
in the device configuration XML as discussed by @ve6rah and @kpine. I have access the ozw configuration files because I am using Docker and mapped the container’s/opt/ozw/config
folder into a subdirectory of my home folder, e.g.:Here’s what I did (note that due to permissions issues, I had to edit the files using
sudo
):/home/user/config/openzwave/ge/ze26i.xml
</Product>
at the end of the file:/home/user/config/openzwave/ozwcache*.xml
file so it will regenerate on the next ozw start (might be able to just refresh the node info instead, I’m not sure)Now when I turn off the GE bulbs, I see the following message in the OZWAdmin logs:
Changes to this value are verified.
.Apology accepted. I still do not believe that enabling polling is the correct solution here. I think enabling verified changes (I see
"changeverified": false
in MQTT, would setting that to “true” somehow be helpful?) or replicating the old refresh_value functionality may be more appropriate. If, as you said, this is an already known issue, please link me to the correct bug and I’ll happily close this one as a duplicate. (I didn’t find anything in my search)