I tried updating again with the load off (though I was pretty skeptical of this since I’m basically always sitting in this room with the lights on when doing any update) and unfortunately it didn’t change the behavior at all. Update still seems to complete, swBuildId still comes back as 2.14
What are you using to upgrade? Did you wait 25 mins after your tool said upgrade was completed then pull the swBuildID?
I’m using Z2M, every time I basically just let the update run, then waited until I noticed that Home Assistant was notifying me that there was an update available again, so several hours generally
What Zigbee adapter are you using? It sounds like maybe you have a poor network signal and the update is failing during file upload.
Here’s what I have experienced and how I work around it. I’ve upgraded 36 of my VZM31-SN switches so far, from 2.14 to 2.15, using zigbee2mqtt’s OTA tab. Only 9 of the 36 successfully reported version 2.15 after completing the upgrade. 27 still showed version 2.14 in the zigbee2mqtt UI. If I re-click “Check for new updates” on any of those switches, though, they do not indicate an available update.
What I found is that the switches will continue to report stale information for a few minutes even after successfully completing the OTA update. As an example, I just did an update on a 2.14 switch and then from the Debug panel I read the value for
genBasic / swBuildId as soon as I could after the update completed. The switch continued to report 2.14 to me:
- 2023-08-30 11:59:27
Read result of 'genBasic': {"swBuildId":"2.14"}
I waited a few more minutes and tried to read the value again and got:
- Info 2023-08-30 12:01:48
Read result of 'genBasic': {"swBuildId":"2.15"}
However, since the zigbee2mqtt believes that the device interview is complete, it continues to display what I assume is a locally cached value from database.db.
What I’ve found I can do is when a switch is in this state, I can go into debug and manually read the swBuildId and the dateCode values. Then after I’ve done that, I can click the little orange “reconfigure” button on the bottom of the device “About” page, and the correct, updated firmware build date and version values will be reflected on the OTA page.
I have experimented with manually editing the database to indicate interviewCompleted as false (see this thread) but I’ve had no luck with that approach. z2m never seems to re-interview, no matter what I do and then I just get a little warning badge on the device.
I have a ZZH!, but I’d be very surprised if that was the issue. I have a very dense mesh with multiple powered devices in every room, and this particular switch has an LQI of 195, so quite a strong signal. I would understand if network issues prevented the update from applying successfully once (which did happen for a few switches) but I’ve tried to update this device probably 6-8 times now and they’ve all shown the same behavior
There are 2 different firmware issues going on, I think its important to note which issue is being experienced.
The first issue is Z2M complete the firmware upgrade but still reports the old version in the GUI. If the software version is read through the developer console, it shows the new version. THIS IS NOT THE ISSUE I AND OTHERS ARE HAVING.
The second issue is that Z2M is saying it upgrades a switch, but its not upgrading. The GUI still shows the old version, the developer console still shows the old version, the OTA tab will repoll the switch and kick off the firmware upgrade (over and over).
In the second issue, I have…
tried it with switch powered off
tried it with no load
tried it with switch powered on
tried factory resetting switches first
tried air gapping switches before and after
these are switches that have upgraded just fine previously.
these are switches that are in the same gang box as other switches that upgraded just fine
You might be running into the bootloader issue a select few have run into (myself included). I’m using z2m as well. I would reach out to @Eric_Inovelli
Yes, anyone that seems to be scratching their head during an update, let me know and I can help you. The easiest way to fix it is to force the update via the manual harness. I know it sounds daunting, but it’s not bad and it will get around the OTA issues that seem to be happening. It’s really hard for us to troubleshoot.
As mentioned, I can send the harness on us and all I ask in return is that you send it back or send it to the next person.
We’re also happy to walk you through the process.
Our working theory is that there may be something going on with the boot-loader as @stu1811 mentioned which is causing these continuous loops, but what we can’t figure out is why it’s happening to certain people and not others. I also haven’t seen anyone experience this outside of Home Assistant, so it’s just an all around mystery. We’ve asked the engineers their thoughts and they are just as stumped, so they offered us a fresh instance of the boot-loader which is what the wiring harness will provide.
At the end of the day, we want you to have the latest and greatest firmware, so if that requires a bit of a cost to us to ship out some harnesses, then we’re happy to do it. After all, you guys are what make our products amazing.
Has anyone with ZHA had this issue or only z2m?
1.) The issue about Z2M reporting the wrong version is completely normal and cannot be fixed. The reason for this is because Z2M instantly tries to pull version after switch’s first reboot, but the switch hasn’t even updated yet so of course it will pull the older version still.
2.) If your switch is not able to load a new version it is likely the switch is too far from the adapter or the Zigbee network is not stable. If you’re having upgrade issues it’s likely it is your adapters firmware causing the problem or the switch’s signal is too weak.
@Eric_Inovelli it is unlikely this is a bootloader problem at all. It seems some adapters are not compliant with Zigbee OTA standards. The people having the problem aren’t even getting a successful upload of the file, the switch never actually tries to run from bootloader at all. It’s likely the adapter people are using is the problem. I would have them try to update the firmware for their adapter first as this will likely fix the problem. Z2M in particular also has specific requirements for support adapters, if the user’s adapter isn’t on the supported list it will likely not work. I will also say this, the Conbee/Rasbee sticks are terrible and will likely not work properly nor work with larger networks.
I’m using the sonoff p adapter. I can try updating the firmware but i don’t think it’s that old
I don’t know how you came to that conclusion. Half of my switches have taken the update, and about half won’t. Same adapter being used for all of them.
@stu1811 Yes, I’m having this problem on the most recent stable version of HA + ZHA.
If you’re using Z2M, make sure “Home Assistant legacy entity attributes” is DISABLED (UNCHECKED). This can cause issues with newer HA-core and Z2M when trying to send OTA command. Found this in testing today. Keep in mind that this change can break some automations if you used legacy entity attributes in them.
ZHA and HA are irrelevant. I’m talking about adapter firmware itself.
I have been having the issue with one of my switches (again, 5 updated fine), with a sonoff dongle p running the latest z-stack firmware (20230507).
I’ll be updating the switch via hardware sometime over the weekend, probably…
Before you do, can you turn logging in Z2M on and copy log file to send to me? I’m curious if it’s failing during OTA deployment or if it’s an issue when running code on the switch itself.
Also- what version are the switches currently running that is failing to update to 2.15?
I was directing that to Stu’s question and simply stating that yes, we’re seeing this with ZHA as well.
To your point on signal quality, I have switches at -75 to -80 RSSI that updated and others that are closer to the adapter around -60 to -65 that will not update.
Edit: All of my switches were on 2.14 before attempting to go to 2.15. The stuck ones are still on 2.14.
Do you have “Home Assistant legacy entity attributes” enabled?