home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.69k stars 30.82k forks source link

ZHA device firmware update failing #110254

Open Courty40 opened 9 months ago

Courty40 commented 9 months ago

The problem

I have a zigbee rgb bulb, model TS0505B by_TZ3210_katchgxy and with the lastest version, I’m offered a firmware update. On accepting, it instantly errors with the message ‘ Failed to call service update/install. unknown error’ IMG_1755 IMG_1756

What version of Home Assistant Core has the issue?

core-2024.2.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

ZHA

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Nothing seen in log

Additional information

No response

clfberlin commented 9 months ago

It is failing with several devices here too. Sonoff ZBMINIL2 Sonoff SNZB-06P Occasionally it starts a progress, which then aborts at 0% to max. 2% with "Update was not successful - result: <Status.FAILURE: 1>"

clfberlin commented 9 months ago

Update: 1/2h after posting this, the SNZB-06P finally did go through. ZBMINIL2 still has the error, though.

home-assistant[bot] commented 9 months ago

Hey there @dmulcahey, @adminiuga, @puddly, @thejulianjes, mind taking a look at this issue as it has been labeled with an integration (zha) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `zha` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign zha` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


zha documentation zha source (message by IssueLinks)

Courty40 commented 9 months ago

Update, looks like there's some confusion in the software, top says old firmware, middle says it's the new version ! image

clfberlin commented 9 months ago

Possible. Though I interpretated it as "installed firmware" vs. "available firmware".

buskjan commented 9 months ago

Also having the same problem with Ikea trådfri-e1743 remote.

stevegroom commented 8 months ago

The information displayed for a ZBMINI L2 is confusing:

image

Logbook shows Firmware turned on?!

What is Configuration Start up behaviour meant to do?

Mookunicorn commented 8 months ago

The information displayed for a ZBMINI L2 is confusing: image

Logbook shows Firmware turned on?!

What is Configuration Start up behaviour meant to do?

"Start up behaviour" : State in which the device must be after a power return.

clfberlin commented 8 months ago

Meanwhile my ZBMINIL2 updated.

Duke-Box commented 8 months ago

Well I wish both of my Sonoff SNZB-06P would update. One fails with "Update was not successful - result: <Status.FAILURE: 1>".

The other crashes the ZHA integration with "Entity unavailable" and a restart of HA is required to get ZHA working again. Although this could be a H/W problem with the SkyConnect dongle.

The failure is always the same type for the device each time I attempt the firmware update.

clfberlin commented 8 months ago

It took a lot of attempts for my ZBMINIL2 over days. Then at one point it finally reached 20% and kept going. No idea what was different that day. My SNZB-06P went through earlier.

Duke-Box commented 8 months ago

OK, after days of trying, I worked out that if you reload the ZHA integration before each attempt, it is more likely to work. So I have both my SNZB-06P's updated now. I had to reload the integration after each update to get them to show the correct firmware version that was installed as well.

Mookunicorn commented 8 months ago

OK, after days of trying, I worked out that if you reload the ZHA integration before each attempt, it is more likely to work. So I have both my SNZB-06P's updated now. I had to reload the integration after each update to get them to show the correct firmware version that was installed as well.

So, you just have to reload the ZHA integration then try to install the update? And that until the device updates? I guess I have to try this. 🤔 How many tries did you manage to update?

Duke-Box commented 8 months ago

It may have just been a coincidence. But I didn't get any "entity unavailable" errors doing it this way. It just worked or it didn't. It might be how busy the server is? It is a very frustrating and time consuming experience and it took several attempts for each device!

And the end result gives me no more functionality then I had before.

puddly commented 8 months ago

Try OTA out again in the beta coming out tomorrow. The update notification issues will be fixed.

Delivery errors, however, still need to be investigated. If you are able to get OTA to progress and then fail halfway through, please enable ZHA debug logging before starting and post a log.

Kevinsky86 commented 8 months ago

It may have just been a coincidence. But I didn't get any "entity unavailable" errors doing it this way. It just worked or it didn't. It might be how busy the server is? It is a very frustrating and time consuming experience and it took several attempts for each device!

And the end result gives me no more functionality then I had before.

Reloading ZHA, or restarting home assistant entirely even, does nothing for me in terms of beeing able to push updates to devices. This is the first time I see an update for a Zigbee device to begin with though so so i'm not sure if it ever did work.

Kevinsky86 commented 8 months ago

@puddly Installed latest beta related to logging issue #111733 that I saw in my logs, this update appears to have also helped the delivery issue?

Delivery wouldn't start at all spitting <Status.FAILURE: 1>, occasionally starting only to spit <Status.FAILURE: 1> at 2 or 3 percent. It's taking a while (device beeing updated is far away, probably less then ideal signal), but i'm now at 65%. Never gotten this far before.

Edit: Nevermind, it died at 80% spitting out <Status.FAILURE: 1> again. It's definately booking significantly more progress since the update though. At least on my install.

Edit 2: Device successfully updated on second attempt. This is definitely working much better for me now.

puddly commented 8 months ago

Unfortunately, OTA is initiated and progressed by the device itself (as in, the device asks for pieces of the firmware, we don't send it proactively). If the device gives up or the connection to the device is unstable and we can't send a firmware block, the device aborts the OTA. Some devices can resume if you restart OTA, others do not and will start from 0%.

In the future, we can potentially restart OTA in the background so you don't have to.

Duke-Box commented 8 months ago

"If the device gives up or the connection to the device is unstable and we can't send a firmware block, the device aborts the OTA."

FWIW - I think, once the downloads starts, it is the local zigbee network that dictates whether the update is successful. I moved one device, that failed consistently with the whole ZHA integration going down, to be physically next to the SkyConnect dongle and it worked.

But that's pure conjecture

tomg1970 commented 6 months ago

Same Problem - no firmware Update at any zha device. HA shows me a new update ... every day

DarthSonic commented 5 months ago

Same issue for IKEA devices.

Nukle0n commented 3 months ago

have tried various battery powered IKEA devices with HA and none of them will update, even if i sit and press a button on them every 30 seconds.

stevegroom commented 3 months ago

Same Problem - no firmware Update at any zha device. HA shows me a new update ... every day

I saw firmware updates for six Tradfri bulbs and over a couple of days they were all updated. Clicked on install and waited a few hours each time.

My system includes 124 Zigbee devices on ZHA - most are Hue bulbs.

issue-triage-workflows[bot] commented 2 days ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

davidjayb commented 1 day ago

This is still an issue on 2024.10.4