Leviton DZPA1 Plug-in Outlet spamming z-wave refresh command when off

I have a Leviton DZPA1 outlet that was working in SmartThings. In HA, I can turn it off but then I can never turn it back on because the switch keeps sliding back to ‘on’ after turning it off (it does turn off physically).

I opened the OpenZWave screen and it has hundreds of entries like:

Value Refreshed: Node xx, Instance 1, Label Target State

OZW log itself has a ton of:

Value Updated: old value=true, new value=true, type=bool

These are from ZW_SEND_DATA messages with a SwitchBinary report. Anyone seen anything like this before?

This is a known problem. The root cause was introduced by changes for this issue. Other related ones are this and this.

You must be using the standalone docker container? The addon should not have this problem.

The solution when using the standalone docker container is to use one of the build-152 images, which do not contain the problematic code changes.

BTW, if you revert from latest to build-150, the ozwcache file will be probably be recreated, which means any battery devices will need to be woken in order to be refreshed. It happens at least when updating from build-150 to anything now, due to changes in the cache format.

I am using the Pi image installer on a Pi4, with the add-on.

You have 0.5.2 installed?

Sorry, I think I was mistaken. The latest version of the Addon might include some of the problematic code. There isn’t much you can do then, unless you convert to using docker, or somehow install an older snapshot. The docker build-150 is known to be good.

I’m not sure how I would change the docker version on the Pi. But I assume it will be updated at some point?

You would need to install something like the Portainer addon to use Docker directly.

I sure hope the bug is fixed sooner rather than later, but for now there doesn’t appear to be any ETA on a fix.

Once fixed I would expect the addon to be updated as well.

So I really only need to cycle this outlet on command (turn off, then back on). Do you know if I can make a button to force it off, then back on while ignoring the state?

If I set the state directly back on in OpenZWave UI it does work, just HA UI can’t do it with those entity switches.

You should be able to call the switch.turn_off and switch.turn_on services regardless of the state in HA.

I confirmed that HA will send the off command to OZW, even if HA already knows a light is off (using light.turn_off).

Thanks. Maybe I can put a button on the Lovelace dashboard to call that…

There"s a good chance this is your issue: https://github.com/OpenZWave/open-zwave/pull/2370

Yes I believe it is. However I encountered a lot of other issues with the beta Open Z-Wave add-on, so I ended up rolling back to the old one.

Since then I’ve had no issues (and this issue doesn’t happen anymore either). I would say the beta Open Z-Wave add-on is a long way from being ‘ready’ for general HA use.

There is a fix for this issue committed into open-zwave. I’ve posted a rebuilt docker image including this bugfix that is compiled for Raspberry Pis (linux-arm). Credit to l3arcf for the fix.

https://hub.docker.com/r/blhoward2/qt-openzwave_leviton_bugfix

I’m happy to post instructions if anyone needs to build one for another arch. It’s fairly simple.

The ozw PR for this was incorporated into ozw a couple of days ago. How does this end up making it to my system? I upgraded to 117.4 (JUST released) on my RPi Hass.io image install (i.e. docker addons) and I still have erratic behaviour with the Leviton, though I would say it is slightly different as before, I could turn the switch off and it would spam zwave, now I TRY to turn the switch off and it doesn’t turn off but it spams zwave.

The addon needs to be updated.

I’m not clear as to the responsibility for each of the pieces. Does ozw make the addon or does HA make the addon from ozw code (plus, presumably, some HA code). Or, perhaps, you mean I must update the addon on my system. I doubt the latter because my addon is still at 0.5.2 and I don’t see any update avaialble.

Sorry, but when HA uses outside code, “update” becomes confusing.

Keith

This. HA builds their own docker container. It is fixed to specific versions of the openzwave code. Someone on the HA side would need to update the openzwave versions (commit IDs really) and release a new addon version.