SNZB-02D Firmware upgrade

Because this is not really an eWeLink issue I have opted to ask this as a help question that others may have an answer to.

I have switched my home setup to use HomeAssistant locally rather than relying on outside servers. Most of my devices are Sonoff and I had originally used them via eWeLink.

I have a Sonoff Dongle acting as my Zigbee coordinator connected to my Pi which is running HomeAssistant. My Zigbee setup on HomeAssistant is using ZHA

I have a couple of SNZB-02D temp sensors that HA shows have a firmware update available. Over the last 6 months or so I have tried to update the firmware on these devices from HA but I have never been successful. I have tried (multiple times) to ensure that I have completed all the necessary tasks in order to upgrade. These include things like proximity to coordinator, battery replacement, pressing wake-up button etc. I generally get a timed out error after about 1.5% completion although I have been as high as about 16% on a couple of occasions.

I finally gave up trying in HA and pulled out my original Sonoff Zigbee Bridge and thought I could connect it up to my eWeLink account and complete the update that way. However when I went to connect my Zigbee Bridge in eWeLink the app could see the device but I could only get to 60% (retrieving device info) before the pairing would fail. I have gone through all the steps I could find to solve this, but to no avail. I suspect that the bridge itself is faulty. Considering that this is only for 2 devices I am not willing to shell out the money to buy a new bridge for this so I was hoping that someone had figured out a better solution for OTA updates using HA or can point out something that I have missed that will allow me to complete the firmware updates.

Any suggestions would be greatly appreciated.

Firmware updates for battery-powered Zigbee devices are generally rather frustrating and can be a challenge. This doesn’t apply only to Sonoff devices. I have several SNZB-02P sensors, and so far I’ve always had to temporarily connect them to a coordinator linked to the eWeLink cloud to successfully perform the update in the app. Even then, the updates weren’t visible right away. Sometimes, it was necessary to wait a few or even several hours.
First of all, make sure to add the following entry to your configuration.yaml file:

yaml
zha:
  zigpy_config:
    ota:
      extra_providers:
        - type: sonoff     # Auto update Sonoff devices
        - type: ikea       # Auto update IKEA devices

After saving the changes, restart Home Assistant to apply the configuration. This enables ZHA to use the official OTA source from Sonoff. However, this doesn’t guarantee that updates will be detected immediately.
Sometimes, triggering and detecting the firmware update can be achieved as follows:

  1. In the card of the selected device, click the three vertical dots next to “RECONFIGURE” and choose Manage Zigbee Device.

  2. Then proceed as shown in the screenshot. Adjust Query Jitter Slider In the debug window, locate the Query_jitter slider.
    :warning: Make sure it is set to any value above 0 — this helps prevent timing issues.

  3. Click ISSUE ZIGBEE COMMAND — even if it appears greyed out and seems inactive. After a moment, it will turn green with a check mark confirming the action was successful.


    Close the card and return to the device screen. When you click the Firmware entity, you should see the indication of the installed and potentially available firmware version for the selected device.

You’ll also see a note that says: “If you are having issues updating a specific device, make sure that you’ve eliminated common environmental issues that could be affecting network reliability. OTA updates require a reliable network.

As you can see in the attached screenshot, the installed firmware version is higher than the available one — an interesting quirk in itself :smiling_face_with_sunglasses:

Here are some tips for multiple update attempts:

  • Synchronize wake-up with update initiation Wake the device (using the button, or by removing and reinserting the battery) just a few seconds before starting the update, and don’t wait too long after “waking it up.”

  • Monitor Zigbee logs: Enable debugging for ZHA in Home Assistant (logger: section in configuration.yaml) and track the messages. Sometimes the update actually begins, but HA doesn’t confirm it due to misinterpreted timing.

  • Change the position of the device and coordinator Even small changes in positioning, like rotating the device 180°, can significantly affect signal quality.

  • Avoid updates during heavy Zigbee network load. Perform updates in the morning or at night, when other devices (like motion sensors or smart bulbs) aren’t transmitting data heavily.

Above all → Don’t get discouraged after several failures! Sometimes, after 5–6 failed attempts, the next one suddenly works flawlessly. Sounds ridiculous, but many users (including myself) confirm it. :wink:

Just to be clear — using the method I described, I managed to kick off a firmware update on a Sonoff device… once. That’s not a success rate to brag about, unless you’re the kind of person who cheers when their toaster doesn’t catch fire.

IKEA devices, on the other hand? Oh boy. Buttons like the RODRET Dimmer are a whole different drama. Imagine trying to convince a moody teenager to clean their room. That’s how updating those things felt. I had to restart the update countless times, watching it stall at random stages like it was throwing a tantrum.

Eventually, it worked. Miraculously. Like the device finally got tired of being difficult and decided to play nice. I still don’t trust it, but hey - firmware updated.

Happy updating!

You have given me new hope. My yam zha settings already had the ota setup but I was unaware of the Query_jitter slider. One new step to try.
I will give that a try and see if it impacts the timeout error I get when the update is proceeding.

Thanks soooo much.

This is not a permanent solution. It works on a one-off basis, and if you want to trigger a check, it must be repeated each time. ZHA does not stay in a constant checking state. Keep that in mind before getting too swept up in enthusiasm.

I did try it once but the device still times out. However it gives me a new avenue to follow to try and get this working.
Its also good to know that it not does retain those settings. I have no idea what all those options do. Is there any documentation on those that I could read to help me get a better understanding?
Its a little tedious and time consuming using trial and error trying to figure out what the different things do.
Thanks again for your help

I truly don’t mean to sound dismissive, but all of this information is quite easily searchable or you could even have an AI neatly break it down in a clear and approachable way. Honestly, you’d have it sorted in minutes. Will you? :slight_smile:

Thanks, I’ll do some more searches. So far I haven’t found anything but I wasn’t looking for info related to this area. I had seen this dialog previously in my tries but I never tried to make any changes since there was no info connected to any of the fields and I couldn’t remember how to get into those dialogs from the main screens. Now that I know how to get there I can start looking the specific things up.

That greyed out button is certainly not very intuitive. I would have just ignored it if you hadn’t pointed it out.

Thanks for the assistance.

kim

Search?!

I truly don’t mean to sound dismissive, but when folks have little knowledge of HA, trying to find any solution to problems they have, frequently have little chance of getting any useful results from an (internet?) search.

You need to know what you don’t know, in order to ask the right questions to get the relevent answers.

So many ‘solutions’ can be, for example, for earlier versions of HA - frequently difficult to identify - and have no bearing on later installs.
So trying some of the suggested fixes can create even bigger problems…
It did for me. The ‘old stuff’ is still there and pops up in searches, relevent or not.

I think thats why folk use forums like this.
They’ve done at least some seaching, but became bewildered by the ‘answers’?

As long as there are people around to give info like you have, there is hope…