HomeSonoffFlashing Tasmota on Sonoff ZigBee Bridge

Flashing Tasmota on Sonoff ZigBee Bridge

One more device to flash Tasmota on

It’s finally here, thanks to amazing hacking work and collaborative effort of people in this GitHub post! With thanks in mind, I will show you how to flash Tasmota on Sonoff ZigBee Bridge (review) so you could use it with Home Assistant, NodeRED and more.

But why…?

I’m already rocking a CC2531 Zigbee stick flashed with Zigbee2MQTT, connected to a Raspberry Pi. Why would I flash Tasmota on Sonoff ZigBee Bridge instead? Apart from great range, using it comes with a great advantage: I can position the device anywhere at home optimising the range of my ZigBee network. I’m no longer tied to a physical location of the Raspberry Pi. In a well developed ZigBee mesh, that may not be an issue, but if you are getting started, it’s a great way to maximise your ZigBee coverage without extra devices.

As an added benefit, using Tasmota on Sonoff ZigBee Bridge will enable the device to support more ZigBee sensors, not just Sonoff Zigbee Sensors (review). Anything that is compatible with Z2T (Zigbee2Tasmota) firmware, will work. I already have guides how to add compatible ZigBee devices to Zigbee2MQTT & how to add new devices too.

Flashing Tasmota on Sonoff ZigBee Bridge

This is a 2 stage process, as Sonoff ZigBee Bridge comes with ESP8266 to control WiFi and MG21(EFR32) to handle ZigBee traffic. Thankfully, the process had been made a relatively easy and all you need is a couple of basic tools:

  • a soldering iron – TS80 (review) or YIHUA 992DA+(review)
  • 5 dupont cables
  • FTD programmer (like this one)
  • Raspberry Pi (for later)

Flashing Tasmota on Sonoff ZigBee Bridge

This is a standard procedure. Flip the board on it’s back as the dev pins are labelled for your convenience. Locate the following pins and connect them to the FTD programmer:

Sonoff ZigBee BridgeFTD programmer
3V3Vcc/3.3v
GNDGND
ERXTX
ETXRX
I00 (GPIO00)GND (for flash only)

I used Tasmotizer to flash and configure the Tasmota. Just run it as administrator if you come across any issues. Instead of the regular tasmota.bin, you will need a pre-compiled version for ZigBee devices, which you can get from here:tasmota-zbbridge.bin. The process of flashing is described in detail in the Tasmotizer article.

At this stage, only configure the WiFi. If your device isn’t connecting automatically to WiFi and the LED is blinking constantly, you can find Tasmota-XXXX SSID with your mobile and configure credentials this way. Find the device on your network (I use Fing Desktop app) and access Tasmota interface.

Go directly to the console option and execute this command so set the Tasmota with the interface for MG21(EFR32) flash:

Backlog Weblog 3; Module 0; Template {"NAME":"Flash ZBBridge","GPIO":[56,208,0,209,21,22,0,0,0,158,0,0,17],"FLAG":0,"BASE":18}

Sonoff ZigBee Bridge will reboot, and you will see a familiar Tasmota interface, but with 2 relay toggles. You are ready for the step 2.

Buy Sonoff Zigbee Bridge

Buy it using these links to support NotEnoughTech.

Flashing firmware for MG21(EFR32)

First, you have to figure out what are you going to use the Sonoff ZigBee bridge for. As this will determine the firmware choice. Let’s install stuff that will help us: git & lrzsz

sudo apt-get install lrzsz git -y

Clone Tasmota repo onto your Raspberry Pi (you can remove it when it’s done)

git clone https://github.com/arendst/Tasmota.git
cd Tasmota/tools/fw_zbbridge/
ls
ncp-uart-sw_6.5.5_115200.ota   //HomeAssistant
ncp-uart-sw_6.7.6_115200.ota  //Zigbee2Tasmota
readme.txt

There are 2 firmware files. One is for HomeAssistant, one for Zigbee2Tasmota – at this point, you have to make a call which one to flash. Before you can flash anything, you have to set the MG21(EFR32) into the correct mode.

Access Tasmota’s console and enable extended logs by typing Weblog 3. At this stage you will see extra logs appearing on your console. Type TCPStart 8888 to open the port 8888 on the device.

14:31:34 CMD: TCPStart 8888
14:31:34 SRC: WebConsole from 192.168.1.5

Go back to the Tasmota menu and make sure that Relay 2 is OFF, then toggle Relay 1, set it to ON then OFF and ON again to put the bootloader into flash mode. Go back to Tasmota’s console – you should see a couple TCP commands flooding (yours won’t be the same but similar) in:

14:38:30 TCP: from MCU: 0D0A4765636B6F20426F6F746C6F
14:38:30 TCP: from MCU: 616465722076312E392E312E30340D0A312E2
14:38:30 TCP: from MCU: 2065626C20696E666F0D0A424C203E20

If you don’t see these, something is not right, but you can reset the MG21 (EFR32) by using a dupont wire to momentarily shorten Z_RST and GND pins on the board.

Go back to the terminal and assuming you are still in the Tasmota/tools/fw_zbbridge/ directory run:

sx -vv -X -b --tcp-client <tasmota_IP>:8888 ncp-uart-sw_6.7.6_115200.ota 

Change the command to reflect your Sonoff ZigBee Bridge IP and the file – Z2T in example above.

Sending ncp-uart-sw_6.7.6_115200.ota, 1486 blocks: Give your local XMODEM receive command now.
Xmodem sectors/kbytes sent: 0/ 0kRetry 0: Got 0d for sector ACK
Retry 0: Got 0d for sector ACK
Retry 0: NAK on sector
Bytes Sent: 190336 BPS:807
Transfer complete

Your Tasmota console will flash random TCP messages until the flash is complete.

11:15:23 TCP: from MCU: 0D0A53657269616C2075706C6F616420
11:15:23 TCP: from MCU: 636F6D706C6574650D0A

Congratulations. Now, it’s time to set the Tasmota on Sonoff Zigbee Bridge. Navigate back to main Tasmota menu and access Configuration->Configure Other to change the Tasmota template to:

{"NAME":"Sonoff ZBBridge","GPIO":[56,165,0,166,215,0,0,0,0,158,0,0,17],"FLAG":0,"BASE":18}

Don’t forget to tick the checkbox to activate the setting. Sonoff ZigBee Bridge will reboot and your device is ready for action. If your Tasmota still shows 2 relay toggles – go to Configuration->Configure Module and select Sonoff ZbBridge (75).

Buy Sonoff Zigbee Sensors

Buy it using these links to support NotEnoughTech.

Final thoughts

The process is still a little bit clunky, but you can enjoy Tasmota on Sonoff ZigBee Bridge. I will cover pairing sensors in another write-up, but if you are eager to get started, send ZbPermitJoin 1in Tasmota’s console and the device will enter the pairing mode for 60 sec. Read more information about Zigbee2Tasmota in the documentation. Let me know if the process worked for you in this Reddit thread.

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

Sonoff Zigbee Bridge – review

0
Sonoff line up will soon include Sonoff Zigbee Bridge and more Zigbee sensors - here is the first look

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

Smart Home

Multi-lights for your ceiling from Aqara

0
This is the biggest light I held in my hands so far. It's ZigBee and it comes from Aqara - meet Aqara Ceiling Light T1M

Almost the fastest PIR sensor you can buy

0
ITEAD introduced a new ZigBee sensor - Sonoff PIR (SNZB-03P) which is also the fastest PIR sensor in their line up. Is it good? Read more!

Smart Panel automation by Tuya

0
I'm checking out two smart panels by Tuya. Both run Linux systems, fit inside the wall switch cavity and offer a range of automation options

Adding Matter to Sonoff BasicR4

0
Sonoff goes back to basics with Sonoff BasciR4 - a new and improved basic smart relay - and I'm about to add Matter to it (and Tasmota)

Sonoff Presence Sensor (SNZB-06P) is not what you think

0
This mm wave radar sensor combines cool tech and ZigBee 3.0, but it's not what you think it is. Closer look at Sonoff Presence Sensor