Success with Sonoff zigbee bridge and zigbee binding

I tried following your instructions, but I am getting [ERROR] [zigbee.dongle.ember.ZigBeeDongleEzsp] - NCP requires unsupported version of EZSP (required = V8, supported = V4) error in openhab.log .

OK after reboot I am not getting that error anymore, but I am still getting “Status: OFFLINE - COMMUNICATION_ERROR” in " Ember EM35x Coordinator".

I used ncp-uart-sw_6.7.6_115200.ota

I can access /dev/ttyzbbridge with openhab user.

And I am using openhab with docker

Anyone had success with starting socat with start.sh? I keep crashing my docker startup

I already tried using this feature and was able to connect the sonoff zbbridge as a serial bridge with the serial binding.

Additionally the zigbee binding is supposed to work with RFC2217 out of the box, but I couldn’t get this to work.

Is it possible to increase data refresh rate? it takes > ~2 seconds to refresh it. So door sensor is not displaying correct state.

socat has no delay, it must come from the zigbee binding, but I have no idea how to fix this

:frowning: the whole zigbee setup is soooo unstable in my OH 2.5 setup. Crashes for no reason from time to time

It seems that crashing was fixed after upgrading OH. 6h+ uptime without crash

Is this feature described somewhere? I only have the options to connect zigbee USB dongles.

Its called “Ember EM35x Coordinator”. Look at the steps in first second post/comment.

FYI, ITead has announced in a video that they will soon sell a Sonoff branded Zigbee 3.0 USB Dongle that is based the exact same Silicon Labs EFR32MG21 SoC as their Sonoff ZBBridge Zigbee Bridge

image

Note! Ember USB Zigbee adapters/dongles/sticks like these are highly recommended over using a remotely connected Ember module using a serial-to-ip bridge / serial forwarding server like ser2net. The reazon for this is that clients using the EZSP serial protocol requires a robust connection between the EmberZNet Zigbee stack running on EFR32 MCU and the serial port of the Zigbee radio. With solutions such as ITEAD Sonoff ZBBridge or a Ser2Net serial proxy connection over a WiFi network it is expected to see NCP entered failed state. Requesting APP controller restart in the logs. This is a normal part of the operation and indicates there was a drop in communication which caused packet loss to occurred between the zigpy radio library and the Zigbee radio. The use of serial network proxies/bridges/servers over WiFi is therefore not recommended when wanting a stable Zigbee environment with Silicon Labs Ember based Zigbee radios. The developers of the bellows radio library for the zigpy project has more information about this if needed.

Quick question; you guys using the Tasmota-flashed Sonoff Zigbee Bridge - do any of you have a working example controlling an RGB light through MQTT (I am interested in the .things definition) ??
I raised the question seperately here: Issue with Sonoff Zigbee Bridge with Tasmota - controlling RGB strip through MQTT - but guess that I might get easier success asking in this thread ?

Can somebody help me? I dont understand how to connect openhab with tasmota.

From what I understood I need to enter the tasmota ip as a port so I tryied like this:

It didn’t worked.
I read on other topics and also on this about serial binding so I created this:


Witch seemed to work, the status changed to online.

But how do I connect the serial binding with the zigbee binding? Or is there something I’m missing here?
I’m using openhab 3.0.1 build.

Thanks!

Your configuration seems correct, since it appears online.
When you use to rfc2217:// (with OH3), you don’t need socat+serial binding anymore.
You should now be able to pair new devices.

I didnt use socat.
So it should work only with the zigbee binding set to rfc2217://… as port?

Yes.
I don’t have OH3 currently running to compare, has anybody else a working setup ?

I tried using the ZigBee Binding like that but could not get it to work at all.
Somewhere on GitHub a ZigBee Binding developer said it should work but it does not.
All in all I was so disappointed that I switched to Z2M.

This is my setup


with rfc2217://172.16.2.32:8888 as port and the rest are default.

This is the log

23:09:03.872 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing 'zigbee:coordinator_ember:zbBridge' changed from UNKNOWN to OFFLINE: Failed to open communications port
23:09:03.893 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing 'zigbee:coordinator_ember:zbBridge' changed from OFFLINE: Failed to open communications port to OFFLINE (COMMUNICATION_ERROR)
23:09:08.894 [INFO ] [gbee.handler.ZigBeeCoordinatorHandler] - ZigBee dongle inactivity timer. Reinitializing ZigBee
23:09:08.896 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing 'zigbee:coordinator_ember:zbBridge' changed from OFFLINE (COMMUNICATION_ERROR) to UNKNOWN
23:09:09.897 [ERROR] [.zigbee.dongle.ember.ZigBeeDongleEzsp] - EZSP Dongle: Unable to open serial port

This is a fresh openhab install on a container.

Switched to openHAB 3.1.0 Build #2177 still not working.

Tryed with socat.

  1. Modified /etc/default/openhab
EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyzbbridge"
  1. Executed
socat -dd pty,link=/dev/ttyzbbridge,raw,user-late=openhab,group-late=dialout tcp:172.16.2.32:8888
  1. Created

And it works.

LATER EDIT:
To start socat as a service at system start you can create /etc/systemd/system/socat-serial.service

[Unit]
Description=Socat zbBridge
Before=openhab.service

[Service]
Type=simple
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=socat-serial

ExecStart=/usr/bin/socat -d -d pty,link=/dev/ttyzbbridge,raw,user-late=openhab,group-late=dialout tcp:1$
Restart=always

[Install]
WantedBy=multi-user.target

Of course you will need to change the ip address.

Then start the service and enable it to start.

systemctl daemon-reload
systemctl start socat-serial
systemctl enable socat-serial

You can check the service status with

systemctl status socat-serial

I tested it on a Debian 10 container running under ProxmoxVE.

Have fun!

Has anyone succeeded with rfc2217 instead of socat ? I’ve tried and failed. Here is the log

2021-02-04 17:32:42.804 [ERROR] [nding.zigbee.serial.ZigBeeSerialPort] - Serial Error: Device cannot be opened on Port rfc2217://192.168.129.132:8888. Caused by Unable to establish remote connection to serial port rfc2217://192.168.129.132:8888
2021-02-04 17:32:42.806 [ERROR] [zigbee.dongle.ember.ZigBeeDongleEzsp] - EZSP Dongle: Unable to open serial port
2021-02-04 17:32:43.816 [INFO ] [bee.handler.ZigBeeCoordinatorHandler] - ZigBee dongle inactivity timer. Reinitializing ZigBee
2021-02-04 17:32:44.930 [ERROR] [nding.zigbee.serial.ZigBeeSerialPort] - Serial Error: Device cannot be opened on Port rfc2217://192.168.129.132:8888. Caused by Unable to establish remote connection to serial port rfc2217://192.168.129.132:8888
2021-02-04 17:32:44.931 [ERROR] [zigbee.dongle.ember.ZigBeeDongleEzsp] - EZSP Dongle: Unable to open serial port
2021-02-04 17:32:49.935 [INFO ] [bee.handler.ZigBeeCoordinatorHandler] - ZigBee dongle inactivity timer. Reinitializing ZigBee

I’m able to open a telnet session with 192.168.129.132:8888

Edit: probably does not work, see #577

I didn’t manage without socat, but your errors seems different then mine.

Serial Error: Device cannot be opened on Port rfc2217://192.168.129.132:8888

Did you tried to telnet to 192.168.129.132:8888? Maybe the port is closed.

image