Update firmware of sonoff devices without sonoff bridge - Best practice?

Hi!

I am looking for a nice way to update the firmware of my sonoff devices (motion sensors + zbmini-l). How are you guys doing that?

I am using ZHA with a conbee stick so far, which doesnt support OTA updates for sonoff devices.

@davidaichi I use a Sonoff Zigbee Stick with Z2M and also I have paired my Sonoff devices (plugs and ZBMINIs) to the Sonoff Zigbee Bridge with the EweLink app and I can see no way to update the devices. @Koenkk has mentioned previously that Sonoff have not released any OTA links for Z2M

1 Like

FYI, this is still the case, and what more, ITead has not yet released any Zigbee OTA firmware image updates for any Zigbee Router or Zigbee End-Device products/devices at all, not even through their own Sonoff ZBBridge Gateway. See related this somewhat discussion → https://github.com/Koenkk/zigbee2mqtt/issues/10282

FYI, ITead has released OTA firmware for Sonoff ZBMINI-L that is meant to address delay issues:

https://github.com/Koenkk/zigbee-OTA/tree/master/images/Sonoff

https://github.com/zigpy/zha-device-handlers/issues/1519

https://community.home-assistant.io/t/sonoff-zbmini-l-zigbee-3-0-smart-switch-by-itead-works-without-neutral-wire-and-based-on-cc2652p-so-should-be-a-good-zigbee-router/384644/

You can flash these with ZHA if enable OTA and then manually copy the OTA file(s) to correct directory:

https://www.home-assistant.io/integrations/zha#ota-firmware-updates

https://github.com/zigpy/zigpy/wiki/OTA-Device-Firmware-Updates

I’ve not read about any ZHA/zigpy developers working on adding OTA provider to zigpy for sonoff, see:

https://github.com/zigpy/zigpy/issues/987

https://github.com/zigpy/zigpy/issues/535

https://github.com/zigpy/zigpy/tree/dev/zigpy/ota

zigpy developers prefer manufacturers or independent developers to contribute PR with download code:

https://github.com/zigpy/zigpy#zigbee-device-ota-updates

If you are using Zigbee2MQTT then need to copy Zigee OTA image files manually as well as no OTA provider for ITead/Sonoff is yet in zigbee-herdsman-converters:

https://github.com/Koenkk/zigbee-herdsman-converters/tree/master/lib/ota

https://www.zigbee2mqtt.io/guide/usage/ota_updates.html

PS: Off-topic, FYI, recommendation is also to disable “permit join” in Zigbee2MQTT due to both security reason as well as a memory leak issue found in some Zigbee Router firmware for ITead Sonoff devices.

4 Likes

I see that the S40ZB Lite has a firmware as well in Koenkk’s repo.

It would be great if the original ZBMINI would receive some love as well, in a form of an updated firmware.

Note! There are also old hardware revisions/variants of Sonoff ZBMINI based on older CC2530 chip and newer hardware revisions/variants of Sonoff ZBMINI based on the newer CC2652 chips.

I don’t think the old or new hardware revisions/variants support Zigbee OTA in their original firmware(?).

FYI, PVTO has built unofficial (third-party) custom firmware for the newer revisions of ITead’s Sonoff ZBMINI (01MINIZB) and eWeLink Switch ZR-02 based on CC2652P (CC2652P1F) chip. The main disadvantage: you need the cJTAG-compatible flasher debugger probe adapter (XDS110 or J-Link V11) in order to flash as the original firmware does not have a serial bootloader. see → https://ptvo.info/custom-firmware-for-sonoff-zbmini-01minizb-and-ewelink-switch-zr-02-923/

https://ptvo.info/custom-firmware-for-sonoff-zbmini-01minizb-and-ewelink-switch-zr-02-923/

1 Like

I am not that desperate at the moment to rip it out from behind the wall switch. But I am sad to read that the functionality is missing.

Otherwise, I have no idea is it the older or newer revision. Probably the older, because I have it for a few years.

Then you are out of luck. Regardless, suggest send OTA feature request to Sonoff for future products.

1 Like

FYI, victorigualada wrote a step-by-step guide in the Home Assistant community forum on all the elaborated steps currently needed for an end-user to manually apply a custom Zigbee OTA firmware image to a device in the ZHA integration if there is not an OTA provider in zigpy:

Does anyone know if you can also upate 01MINIZB OTA? We see some very strange issues with the device where we have big delays and sometimes it completely stops responding until a power cycle.

I’m having similar issues. New zbminis purchased a month ago. Devices fall offline even when they are very close to the sonoff zigbee stick attacked to a rpi3B+.
Another strange thing is that when toggling the hardware switch the light turns on for a few seconds and than turns off again. I have to toggle the light switch twice again to get light again and often again in a few seconds the lights are turned off again. I’ll write to sonoff support as well to see if I need a firmware update. Firmware in mentioned as v 2.0.0 with a build date of 20210320.
I also have 4 older zbminis that don’t report a firmware version, just the build date (20200927) and those are working without any issues for a couple of months already

I bought these switches the other day, firmware is from 2020.

Would the fw in the repo work on this model without -L?

No, firmware images are almost always model-specific and can sometimes even be model revision specific if they replace or redesign internal hardware circuits inside a device without changing the product name or look.

https://github.com/Koenkk/zigbee-OTA/tree/master/images/Sonoff

“zbminil” firmware image in that repository is for “ZBMINI-L/ZBMINIL” model, and the “zbminil2” firmware image there is for " ZBMINI-L2/ZBMINIL2/" model (also known as “ZBMINI Extreme”).

There are no official firmware updates released as Zigbee OTA images available from ITead/Sonoff for the original “ZBMINI” which is model "01MINIZB from ITead/Sonoff, but you can find unofficial community-developed custom firmware from for example PTVO, however you will need to flash firmware using a debug probe adapter, see:

https://ptvo.info/custom-firmware-for-sonoff-zbmini-01minizb-and-ewelink-switch-zr-02-923/

https://ptvo.info/custom-firmware-for-sonoff-zbmini-01minizb-and-ewelink-switch-zr-02-923/

I see. Well my mini seem to work perfectly fine so I won’t worry about it.

Did you changes something or fixing your problem?

I have zbmini with the firmware 20210320 and it is losing connection after some time.

I changed the default active timeout time to 15 minutes in zigbee2mqtt and they haven’t been offline except for one. I think I have to push some wires harder in the ceiling box so no pressure is on the zbmini itself. If there is the device might be resetting itself due to pressure on the internal switch.