Success with Sonoff zigbee bridge and zigbee binding

Tags: #<Tag:0x00007f6173bc3460> #<Tag:0x00007f6173bc31e0> #<Tag:0x00007f6173bc3050>

Hi,
I wanted to start using zigbee at home, and I wanted it simple.
First, I bought Itead Sonoff Zigbee Bridge (SNZB or zbbridge) and flashed it with tasmota.
See https://notenoughtech.com/home-automation/flashing-tasmota-on-sonoff-zigbee-bridge or https://www.digiblur.com/2020/07/how-to-use-sonoff-zigbee-bridge-with.html (without soldering, but more HomeAssistant oriented).
It works fine, but I like items auto-discovery and don’t want to bother with magic-voodoo-json data extraction and formatting.
The article from digiblur shows native integration with HomeAssistant binding, and I’ve managed to achieve it with OpenHAB.

So here is a litlle howto:

  • Read Digiblur’s article and strictly apply all steps, except the HA ones. The related video is also helpful.
    I uploaded the latest UART firmware (6.7.6), it seems you don’t have to stick to older 6.5.5 with OH
    A the end, you should be able to telnet to port 8888

  • Install socat, and bind your serial port to the zbbridge radio:
    socat -dd pty,link=/dev/ttyzbbridge,raw tcp:192.168.x.y:8888
    Of course, adjust the IP address to point the zbbridge one.

  • Install serial binding in OH
    You must also configure OH startup script to include /dev/ttyzbbridge as stated in the documentation

  • Install Zigbee binding in OH

  • Add a new Zigbee “Ember EM35x Coordinator” thing
    Just set the serial port to /dev/ttyzbbridge. I didn’t touch other settings since I was not sure of what they really do

  • Pair zigbee devices as stated on the zigbee binding documentation:
    Search for Zigbee things
    Put your device in pairing mode, it should appear.
    Wait for the discovery to finish (a name should appear, not “unknow zigbee device”

  • Enjoy :slight_smile:

I did this minutes ago, this is a basic procedure. I was able to pair Xiaomi plug, Aqara temp/hum and door sensors, and a Ikea Tradfri dimmer. Some of the devices don’t report battery status as zigbee2tasmota does.

There is room for a lot of enhancements, for example:

  • Make socat a service with auto-reconnect
  • Fine-tune the zigbee coordinator settings

Finally, it would be great the the serial binding allows Serial-over-TCP connections as HA does with socket://<your bridge IP>:8888 as serial port path.

1 Like

That is a serial binding issue and hopefully it can make it into OH3.

Apparently zbbridge also works with MQTT, have you tried it ?

https://tasmota.github.io/docs/Zigbee/

Good news, I’ll try it (in a few weeks :slight_smile:)

If you are lucky, OH3 will be released shortly before the end of the year.

Yes, that’s where I started.
It works very well, but I was dispapointed by some aspects : No real detection of device downlink (LWT does not works), all sensors are send in JSON format throught the same MQTT topic that is parsed by ALL channel of ALL MQTT things, no discovery (like Homie) …
I know a lot of people are happy with this way of doing, but I wanted to test if remote-zigbee-binding was doable and, indeed, it is !
Things are not perfect however : socat is needed, and some channels are not managed (battery status, …) on some devices.

In fact, I’ll keep using the MQTT way for some weeks at least.

This post simply aimed to report that it’s perfectly doable with the integrated ZigBee binding.

1 Like