Did anyone manage OTA firmware upgrade of SONOFF TRVZB with ZBDongle-P ? How ?

Hi,

I have installed 5 SONOFF TRVZBs which came with firmware 1.2.1.
After many tries I’m still unable to upgrade them to 1.4.4. I’m using ZHA but have added z2m as extra_providers in zigpy_config, this has 1.4.4 available.

My setup is HAOS on Raspberry Pi3B (only 1GB RAM + swap, need to upgrade but works ok), SONOFF ZBDongle-P (znp)
19 Zigbee devices total (the 5 TRVs, battery operated thermometers, smart plugs that are also routers).
There’s a smart plug in every room that has a TRV so that should help I think.
The dongle is sitting on top of a shelf away from the Raspberry and other electrical devices, plugged into a thick 3m long USB extension cable.
The TRVs are across 2 floors. One of them is in the same room as the dongle, about 4 meters away with line of sight. I’ve replaced all batteries with new non-rechargeable ones, they’re now reporting 97-100%

The first problem is that the update option randomly appears and disappears in Settings. The only consistent thing is that the firmware is sometimes reported as “unknown” (even when the TRVs respond to command), and that’s when it shows no update available. I don’t know how to reliably trigger this.

The second problem is that I never managed to complete an update, not once ! It will start fine, I’ll watch it progress slowly to 15-25% usually (I think the furthest was 45%), and when I come back to it either the update section is back to “install update” as if I did nothing, or it disappeared completely.

At first I was starting all updates at once, but I thought it might overwhelm the Zigbee network so I tried one by one, no difference. Even the TRV in the same room as the dongle won’t update.

I have seen an old GitHub PR that improved reliability for ZHA OTA updates by doing 2 things IIRC : 1. more aggressively retrying when packets were lost 2. allowing a failed update to resume, but it seems only the first change was merged by maintainers.

Would it help to update my dongle’s firmware ? Not sure how to check the version. The diagnostic entity “sensor.texas_instruments_cc2652” is disabled. I got it in 2022 and I think I updated it at the time, but haven’t touched it since.

Does anyone have tips for troubleshooting ? Relevant logs ? Other things to try ?
Would z2m likely work better ? I don’t have time to do a migration right now (unless it’s super easy), but I may be willing to borrow another dongle for z2m and pair each TRV temporarily to it just to run the update.

Is there any other way to update those than OTA ? At this point it feels like even a USB EPROM programmer would be less hassle !

Thanks

Almost the same setup but using the E dongle, originally I bought a sonoff ultra hub because it was the only way to pair the 9 trvs I have. It took 90 minutes per valve to upgrade from 1.3.something to 1.4.1 but no restarts.
I’ve since moved them to Z2M I didn’t have any luck with zha - I started yesterday to upgrade to 1.4.4 OMG, how many times did it fail most common error was something about running out of ack buffers causing a fatal error - I tried several sets of parameters but the default works the best, managed 2 yesterday and left the rest on schedule(waits for device to ask for upgrade apparently), thus morning one had upgraded to 99.71%, it took over an hour for it to complete, generally I did them one at a time and started the next when the previous was in sub minute left. Only had a couple of failures today so I guess it depends on how your network is, it definitely needs a stop and restart from current progress though.
There doesn’t seem to be much difference between the two firmwares but it’s early days

Same issue here. I do get to 100% but everytime it fails and the logs say it timed out.

Takes about 50 minutes to upload.

Update: tried again the following day and every device updated ok, not sure why it worked that day rather than any other.

Now just waiting on the zha update to make it into the next ha release.