HomeHome AutomationHow to flash Tasmota on Sonoff ZB Bridge Pro

How to flash Tasmota on Sonoff ZB Bridge Pro

That was quick!

First of all, hats off to everyone who has contributed to this GitHub thread and made Tasmota and custom ZigBee coordinator firmware possible on Sonoff ZB Bridge PRO. I received mine a couple of weeks ago, and if you want to know more about the stock use with eWeLink – this is the post for you. In this article, we will flash Tasmota and the custom coordinator on the latest ITEAD’s ZigBee bridge.

Tasmota on Sonoff ZB Bridge Pro

There are 3 Sonoff ZigBee devices that can be flashed with custom coordinator firmware.

While USB Dongle requires Raspberry Pi (or similar) device to work, both Sonoff ZB Bridges can run independently. In this guide, I’ll show you how to flash Sonoff ZB Bridge PRO with Tasmota and load custom coordinator firmware. Bear in mind, that this guide is written just as the method is released and things may change over time. You are doing this at your own risk, so no moaning about it if things go bad!

Flash Tasmota on Sonoff ZB Bridge Pro

Tasmota on Sonoff ZB Bridge Pro

First, we need to flash Tasmota onto ESP32 inside the Sonoff ZB Bridge Pro. I will use Tasmota features to communicate with CC2652 and push custom coordinator firmware. To do this, you will need the following:

Open Sonoff ZB Bridge Pro and locate the GPIO header. I used 5 pins to solder to the bridge, but you can get creative with how you are going to connect Sonoff ZB Bridge Pro to the FTD Flasher. Whatever you do, follow this schema:

Sonoff ZB Bridge PROFTD programmer
3V3Vcc/3.3v
GNDGND
RXTX
TXRX
GPIO00GND (on power on)

Download the ESP Flash tool and one of the Tasmota .bin file from the source:

Depending on the .bin selected, you will have to resize the partition yourself and upload the files needed to flash coordinator software. Both procedures are described later on for your reference. The video tutorial was made before these were included in the tasmota32-zbbrdgpro.factory.bin so use that one, and continue with coordinator flash next. The only limitation here is that you must upload .factory.bin file via the web interface as ESP Flasher won’t do this. Yes, you will need to flash another image first.

This is the Tasmota firmware to use with your Flash tool. Power on Sonoff ZB Bridge Pro (with GPIO00 connected to GND) and select the correct COM port in the flash utility. Select your firmware and flash Tasmota on Sonoff ZB Bridge Pro.

Once done, disconnect the wires and power on your Sonoff ZB Bridge Pro. It will take a minute or two to start and you will see a Tasmota access point. Connect to it, navigate to 192.168.4.1 to add your WiFi credentials and connect Sonoff ZB Bridge Pro to the internet.

Configuring Tasmota for Sonoff ZB Bridge Pro

You can use your router or app like Fing to find the new IP on the network and open the Tasmota web interface. Navigate to “Configuration” => “Configure Other” and use the template below (make sure to activate it using the checkbox):

{"NAME":"Sonoff Zigbee Pro","GPIO":[0,0,576,0,480,0,0,0,0,1,1,5792,0,0,0,3552,0,320,5793,3584,0,640,608,32,0,0,0,0,0,1,0,0,0,0,0,0],"FLAG":0,"BASE":1}

Restart your device, and access the interface again.

The latest Tasmota firmware should have the FS partition already set for you, but if your partition size is under 500kb, follow the steps below to resize it. Otherwise, you can skip this step and go directly to upload files.

To flash custom coordinator, we need to expand the current file system to fit all the files used in the process. Navigate to “Consoles” => “Berry Scripting Console” and run this script to upload Partition_Wizard.tapp

var wc=webclient() wc.begin('https://raw.githubusercontent.com/arendst/Tasmota/development/tasmota/berry/modules/Partition_Wizard.tapp') var wstatus=wc.GET() if wstatus==200 print(wstatus, wc.write_file('Partition_Wizard.tapp')) wc.close() else raise 'connection_error', 'status: '..str(wstatus) end

Alternatively, you can download the file yourself and upload it to Sonoff ZB Bridge Pro using the “Manage File System” option. Make sure you open the RAW version of the file and use right-click to “save as…” – otherwise, the file will be saved as HTML and you DON’T want that!

When the file is present in the File System, reboot your device. It will install the script and enable the “Partition Wizard” option in the Consoles menu. Use that to change the FS partition size. It will likely say 320 when you open the menu, so increase this to 1152, and let the script finish the job. If all went well, you should have over 1MB to work with.

Uploading Files

Now you can upload all needed files.

It’s vital that you save files correctly (either use the download option or open RAW and use save as…). Then use the Manage File System to upload each file to your Sonoff ZB Bridge Pro.

Flashing coordinator firmware on Sonoff ZB Bridge Pro

We are finally ready to flash coordinator firmware on Sonoff ZB Bridge Pro. Go back to “Consoles“=>”Berry Scripting Console” and run the following:

import sonoff_zb_pro_flasher as cc
cc.load("SonoffZBPro_coord_20220219.hex")
cc.check()

This will check the firmware and confirm that the BSL GPIO is set to DIO_8.

18:32:05.964 FLH: Starting verification of HEX file
18:32:15.190 FLH: Verification of HEX file OK

If you receive any other message than this, check your .hex file. Chances are, you actually saved it as an HTML page or the new file revision is available and you should update the name of the .hex file in the cc.load() command. If file verification is ok, and you don’t want a coordinator backup, run:

cc.flash()

Any immediate errors at this point could indicate that you have an incorrect version of Tasmota flashed on your device. If you get instant feedback, check the file again and re-flash Tasmota on Sonoff ZB Bridge Pro.

The process will take approx 5 min, and you won’t see any changes on that screen. Give it 5 min, then go to “Main Menu“=>”Consoles“=>”Console” and check the output of the log file:

21:47:07.140 FLH: Verification of HEX file OK
21:49:06.780 FLH: cc2652_flasher rx=23 tx=19 rst=15 bsl=22
21:49:06.828 FLH: Flashing started (takes 5 minutes during which Tasmota is unresponsive)
21:54:43.835 FLH: Flashing completed: OK
21:54:43.948 FLH: Flash crc32 0x000000 - 0x2FFFF = bytes('1598929A')

Restart your device and chances are that after the reboot, your console log will look like this:

22:01:25.294 RSL: RESULT = {"ZbState":{"Status":3,"Message":"Configured, starting coordinator"}}
22:01:31.293 RSL: RESULT = {"ZbState":{"Status":40,"NewState":9,"Message":"Started as coordinator"}}
22:01:31.944 RSL: RESULT = {"ZbState":{"Status":0,"Message":"Started"}}

Adding devices and further steps

The device is ready. You can pair your ZigBee devices now, by allowing ZigBee devices to join and following the pairing instructions for each end device. Paired devices will show up in the Console and in the main Tasmota menu. You will be able to generate a map of your ZigBee mesh as well.

If you want to know more information on how to use ZigBee2Tasmota, please visit Tasmota documentation.

Final Thoughts

As Sonoff ZB Bridge Pro is CC2652 based, chances are that we are going to see router firmware as well as coordinator firmware too. While personally, I prefer Zigbee2MQTT as I’m more versed in that, it’s good to see custom firmware for Sonoff ZB Bridge Pro. Big thanks to everyone who worked hard on making Tasmota on Sonoff ZB Bridge Pro possible. Let me know if you have any questions in this Reddit thread.

🆓📈 – See the transparency note for details.

PayPal

Nothing says "Thank you" better than keeping my coffee jar topped up!

Patreon

Support me on Patreon and get an early access to tutorial files and videos.

image/svg+xml

Bitcoin (BTC)

Use this QR to keep me caffeinated with BTC: 1FwFqqh71mUTENcRe9q4s9AWFgoc8BA9ZU

Smart Ideas with

Automate your space in with these ecosystems and integrate it with other automation services

client-image
client-image
client-image
client-image
client-image
client-image
client-image
client-image
client-image

Learn NodeRED

NodeRED for beginners: 1. Why do you need a NodeRED server?

0
To server or not to server? That's a very silly question!

Best Automation Projects

Tuya SDK for beginners: Intro to Tuya Cloud API

0
Working with Tuya Cloud API. A guide to Cloud automation for beginners, get started with REST!

NEST your old thermostat under $5

0
Nest-ing up your older thermostat under $5

DIY Smart Washing Machine – for about 15 bucks!

0
Learn how to add washing machine notifications to your Google Home on the cheap

Nora – Google Assistant in NodeRED

0
Integrate Google Assistant with NodeRED thanks to Nora - NodeRED home automation

Things they don’t tell you about IKEA Trådfri

0
There are things you should know about IKEA Tradfri before you make your purchase

Smart Home

SwitchBot Lock: Smart security in seconds

0
Smart lock that takes 15 min to install and 2 years to enjoy on a single charge: SwitchBot Lock

“Secret” Zigbee2MQTT Dashboard

Zigbee2MQTT Dashboard
0
I can't believe no one told me about this sooner. After 2 years, I'm making sure you are not left in the same as me, cave - use Zigbee2MQTT Dashboard.

Smart Socket – IFREEQ [Tuya Expo edition]

0
Thanks to Tuya Expo, you can browse 100s of products that won't break your home automation budget - let's start with IFREEQ Smart Plug

Never mind Evvr Smart Switch, look at that panel!

0
Evvr Smart Switch brings 2 part module to enable no-neutral ZigBee and Z-Wave connections to your wall switches turning them smart without compromise!

Aqara TRV will support Matter!

0
Aqara just released Aqara TRV - their ZigBee 3.0 thermostatic radiator valve to control your heating - with... Matter support