Tried to update red series dimmer OTA w/ zwavejs UI and it's stuck at 13%

Last night I went through Home Assistant using ZwaveJS ui to update my red series dimmer OTA and today I just noticed it’s been stuck at 13%. I didn’t know it was updating earlier today so I restarted HA, which I think may have borked the update process. What can I do now?

If I pull the airgap switch to reset it will I brick it? It’s still stuck at 13% updating

IIRC it doesn’t write the firmware until it downloads the whole file. You should be fine to reset.

it says update in progress though?

Pull the airgap and reset the switch and also restart zwavejs then you could try it again if you wanted.

Did that. It gets to 13.3% again and freezes.

Did you check the switch firmware? It says 1/2 100% so maybe the target 0 did succeed. You can try them one at a time and see if you can get them through individually. I had a switch that took a bunch of tries to get target 1 to work.

I can’t seem to figure out how to update target 0 and target 1 separately. There is just an update button and a couple download buttons.

Click advanced and there is a firmware update option in there where you can pick one target. It looks like the bin file is good so you just need to try the otz file again.

Firmware is here,

https://files.inovelli.com/firmware/LZW31-SN/Beta/1.61/

I’ve noticed the exact same problem. Based on what I saw in the logs I think it’s likely a bug with the way zwavejs handles updating multiple firmware targets. There’s a 5 second pause hardcoded in between the two updates, and maybe that’s not long enough? As far as I know the Inovelli LZW red series is the only z-wave device ever manufactured that uses multiple firmware targets and has a manufacturer that actually provides updates. AlCalzone (the zwavejs maintainer) lives in Europe, and only recently got his hands on an inovelli switch, so hopefully he can reproduce it. Really I think zwavejs-ui should be smart enough to not flash an image that’s already at the right version. If it did that, then even if the second upload always failed, running “update” twice would get the right result.

I didn’t know about the “specify a single firmware image” option hidden behind Advanced. That’s good to know.

Z-Wave firmware updates are pretty safe. I’ve tinkered with them a lot, including fixing a bug in the source code of the hubitat firmware updater a couple years ago, and the basic design is

  1. Send the firmware to the device, in lots of itty bitty chunks.
  2. Tell the device you’ve sent the last chunk.
  3. The device (usually?) does some sort of checksum to make sure the image is correct.
  4. Only now does the device actually start updating its firmware

If anything stops or fails before step 4, the device just keeps running on its old firmware as if nothing happened.

Wasn’t that Z-Wave JS bug fixed in fix: wait between multi-target firmware updates by AlCalzone · Pull Request #6395 · zwave-js/node-zwave-js · GitHub?

I’m wondering if @neldonado is running an older version that doesn’t have that fix.

That’s the PR that added a 5 second wait. I don’t think that’s enough. Really the best would be to wait for some indication from the device that it’s ready for a second firmware upload, but I’m not aware of a Z-Wave command that would do that reliably.

I confirmed that I’m running a version that contains that fix, and I also have the issue.

I am running a current version on home assistant.

Interesting. In my case once I was running that version, updates worked normally. Sounds like increasing that wait to 20 or 30 seconds would probably cover it.

I agree that there doesn’t seem to be a standard way for Z-Wave JS to understand that it’s ready.

You should be able to manually complete the updates by pushing target 0 and target 1 yourself and waiting a longer period of time. It’s not as easy as the automatic way, but it does work.

The difference may also come down to whether the node has a direct connection to the hub, or whether it has to take multiple paths through the mesh. The node I’m failing to update is pretty far away from my hub.

Do you see the same issue with running the OTA updates manually in succession? I remember a while back I had trouble with all of mine updating manually (circa 2021 or so) because of the multiple hops involved. Getting a better Z-Wave controller with an external antenna made a big difference in eliminating more than 1 hop for everything on my network.