How to restart stalled/crashed OTA updates with Zigbee2MQTT?

Any ideas on how to get these failed OTA updates to start again?

You may get a faster answer if you ask your question here:

thank you, will post the answer back here too

1 Like

no resolution yet but i discovered you can still kick off the stalled installs by clicking ā€˜installā€™ in the notification telling you that there is an update available

Personally, I donā€™t think there will be a solution for this, because firmware updates for Philips Hue devices are always very slow and the devices take a long time to updateā€¦ even if the devices are directly connected to a Hue bridge.

What if you stop z2m and clear the state manually in data/state.json?

1 Like

Just worked out that Z2M does not handle multiple updates at once very well. The way Iā€™ve made them get going again is via Home Assistant Settings/Updates, select just one Z2M Update and choose install. Go back to Z2M web ui / OTA and you should see that one start to update. Let it finish. Then do the next one, one at a time.

1 Like

worked for me as well. thanks for posting! @shanelord

has anyone figured out how to stop an update that gets stuck? Mine has been on for days and I canā€™t get it to stop ā€œspinningā€.

2023-11-08_11-48-27

2 Likes

I had the same problem with my Hue lightstrip. A combination of restarting Z2M addon and update through Z2M gui-> OTA ā†’ Update FW, did the trick for me.

this is much more broken now than it was, i canā€™t get 36 devices out of thinking they are updating (including with reboots).

When I then attempt to update through the Zigbee2MQTT OTA page, I get this:

image

1 Like

Yup, same here. aborted by device and, after a manual restart, no new image availableā€¦ Hopefully the new z2m release in december will fix this

I had a couple of IKEA TrĆ„dfri lights on the same light switch that showed up in HA as if they were upgrading which happened automatically after I connected them to Z2M. Previous upgrades of other devices would require me to click on a button, but didnā€™t seem to be the case for these two lights.

When a device is upgrading in Z2M I would normally expect to see the upgrade progress for the devices, but I wasnā€™t seeing it in this case. So maybe the error is actually in HA and not Z2M?

Finally I figured that maybe the issue was them both attempting to upgrade at the same time so I deleted them from Z2M, disconnected one light from power and the other to Z2M.

Seems like I never saw the OTA tab in Z2M before, as I clicked the button to check for update, and then to actually perform the update and it seems to be going fineā€¦

2 Likes

I have the same problem. Have you found a solution?

not yet, awaiting December updates from all the various components in the hope that a fix comes.

Having the same issue here, december update changed nothing.

Iā€™ve had exactly the same issue with x3 IKEA E1743 switches that have all been showing ā€˜Update availableā€™ in HA for months and months, and they always fail! Hereā€™s what I have done today to get them to update:

  1. Open up the Z2M interface in HA
  2. Hit ā€˜OTAā€™ from the top menu, and identify which switch you want to update
  3. Click ā€˜Update device firmwareā€™. A confirmation dialogue will appear, but DONā€™T YET hit the confirmation button to start the update
  4. On your physical IKEA switch, press the ON or OFF button
  5. Quickly press the confirmation button in Z2M to begin the update. You should see a small notification in Z2M indicating the update has begun
  6. Every ~1 second, alternate pressing the ON then OFF button on your physical IKEA switch to keep ā€˜awakeā€™ and stop it going to sleep
  7. Stop pressing the buttons once you see a notification along the lines of ā€˜Update of X switch at 0% complete, X mins remainingā€™ (this usually takes 5-10 secs or so)

It seems that these switches go to sleep very quickly, so following these steps means that when the update begins, the switch doesnā€™t go to sleep and cause it to fail. Once the update has started, the switch seems to stay awake.

I did read somewhere that Z2M doesnā€™t handle updating multiple switches at the same time very well, so Iā€™m doing my x3 sequentially - but it might work doing them at the same time!

The updates take some time - the first one I did took ~100 minutes, but it did complete successfully. Currently doing the second oneā€¦

5 Likes

I was actually able to initiate and run the update this way, which didnā€™t work at all before. But the main problem remains: the firmware stays still the old one and after checking again, the red update button is there (btw. for me itā€™s about the Philips Hue switches, does not matter whether v1 or v2).

Solution worked for my E1743 exactly as described. Thx.

This problem hit me today!

I finally succeed to put the device in the initial status by hitting the ā€œupdate allā€ button. It is not a nice solution but that was a way to do it.

OTOH,

I open /opt/zigbee2mqtt/data/state.json (see screen capture) and I manage to find how the update is documented. An alternative way could be to:

  1. systemctl stop zigbee2mqtt
  2. edit the data/state.json file manually to fix the update section
  3. systemctl start zigbee2mqtt

5 Likes

ran into this problem again after accidentally update z2m while doing OTA. Got stuck for a short while but after rechecking all updates I got the ā€œupdate device firmwareā€ button back in z2m and I could restart/continue the OTA.

1 Like