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.