Hi all, I’m running openHAB 3.3.0.M2 on a RPI (Openhabian).
I want to extend my system with a Zigbee dongle (thinking of SONOFF Zigbee 3.0 USB Dongle Plus) and I’m looking into the different options and the pro’s/con’s.
What would you advice? Use the zigbee binding? Or flash the dongle with Tasmota and use Zigbee2MQTT (I already have a MQTT broker running on the Pi). I can’t really find out what the reasons could be to decide for on or the other.
Hardware. If you have some zigbee device that isn’t supported by one but is supported by the other would be the main reason to choose one over the other. Typically, if it’s branded and sold as Zigbee it should work with the Zigbee binding. However there are lots of vendors (Xiaomi, Ikea, Aquara, etc.) that use Zigbee but add their own proprietary stuff on top. Support for those will be hit and miss with some supported by the binding and other supported by zigbee2mqtt.
I’d recommend using the Zigbee binding as it will be far less work over all. But if you have hardware only supported by zigbee2mqtt your choice is made for you. I happily use the binding, but I’m careful to only buy things that are sold as Zigbee with the Zigbee logo and avoid the rest.
I had been using the Zigbee binding, when I bought my first Zigbee devices. However I often had trouble with devices not reacting or going offline randomly. I investigated a lot and finally decided to try out Zigbee2MQTT. Since then I have never looked back and my Zigbee devices are stable. I’m not sure, if this is due to some problem with the Zigbee binding or if it was caused by the specific Zigbee devices I use.
But I agree with @rlkoshak, that you should look at the hardware support for your intended devices first. The list of Zigbee2MQTT is rather long, so chances are good that your devices will be supported there.
I’d just add that the list of supported devices listed in the Zigbee binding readme is rather short. But that doesn’t mean that the list is complete. Theoretically, any device that is pure Zigbee without proprietary additions should work just fine with the binding.
FWIW we just added the option to install zigbee2mqtt to openHABian. Mosquitto is already there as well.
Thanks msormi, I was just convinced by rlkoshak and ardmore to try the default Zigbee binding and now you make me doubt again
Just kidding, it’s actually great that I don’t have to choose and tha topenhabian supports this (when I eventually need it).
thx all !!!
Some reasons that I use zigbee2mqtt:
- Large support and maintenance community. As a result issues get fixed quickly, and support for new devices is also fast.
- Agnostic to my choice of home automation software. If for some reason I decide to use something other than openHAB, as long as the new thing can accept MQTT then switching over is less painful.
- Related to the above - if openHAB shits the bed, I still have control of my devices through MQTT, or through the zigbee2mqtt web UI.
- I found it very useful when transferring from OH2 to OH3 - because the controller isn’t connected to openHAB it was super simple to transition gradually, without taking anything offline!
- I am cheap, and am likely to encounter devices which do not conform to the Zigbee standard. Zigbee2mqtt supports many many quirky devices.
What I currently use:
I can only second that.
Using z2mqtt since the beginning across various devices (IKEA light bulbs and remotes, Xiaomi sensors and smoke detectors, Tuya light switches, no-brand-but-tuya-inside stuff). I am at about a total of ~40 devices now.
Maybe to add to @hafniumzinc’s list is that z2mqtt basically supports any zigbee device, following the standard or not, hence the long list of supported devices. In line with that you can even get devices supported yourself (by writing the conf code) which might be helpful for very strange once that are not widely used by other users.
ZHA vs. Z2MQTT vs. Deconz
According to the Zigbee binding doc, it is not yet supporting the Sonoff Dongle. But it works very well with Zigbee2MQTT. I just installed it this week with said dongle and had no problems at all. It wasn’t even necessary to flash the dongle.
What branch of openhabian is it in?
I prefer to stay with original openhabian since it’s way better supported rather then trying out myself without knowing exactly what I’m doing
main of course as it’s new.
I’ve changed the branche of Openhabian to
main and installed zigbee2mqtt.
However, the front-end is not accesable on my_ip:8081.
zigbee2mqtt is runnig: this is the status:
openhabian@openhabian:/etc $ sudo systemctl status zigbee2mqtt
● zigbee2mqtt.service - Zigbee2MQTT
Loaded: loaded (/etc/systemd/system/zigbee2mqtt.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2022-04-23 18:14:20 CEST; 23s ago
Main PID: 28977 (npm)
Tasks: 23 (limit: 4225)
├─28988 sh -c node index.js
└─28989 node index.js
Apr 23 18:14:20 openhabian systemd: Started Zigbee2MQTT.
Apr 23 18:14:21 openhabian npm: > firstname.lastname@example.org start /opt/zigbee2mqtt
Apr 23 18:14:21 openhabian npm: > node index.js
Apr 23 18:14:24 openhabian npm: Zigbee2MQTT:info 2022-04-23 18:14:24: Logging to console and directory: '/var/log/zigbee2mqtt/2022-04-23.18-14-22al' filename: log.txt
Apr 23 18:14:24 openhabian npm: Zigbee2MQTT:info 2022-04-23 18:14:24: Starting Zigbee2MQTT version 1.25.0 (commit #6f1460e4)
Apr 23 18:14:24 openhabian npm: Zigbee2MQTT:info 2022-04-23 18:14:24: Starting zigbee-herdsman (0.14.20)
I think it has something to do with permissions: this is the coxntent of /var/log/zigbee2mqtt/…/log.txt
info 2022-04-23 18:14:24: Logging to console and directory: '/var/log/zigbee2mqtt/2022-04-23.18-14-22al' filename: log.txt
info 2022-04-23 18:14:24: Starting Zigbee2MQTT version 1.25.0 (commit #6f1460e4)
info 2022-04-23 18:14:24: Starting zigbee-herdsman (0.14.20)
error 2022-04-23 18:14:45: Error while starting zigbee-herdsman
error 2022-04-23 18:14:45: Failed to start zigbee
error 2022-04-23 18:14:45: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
error 2022-04-23 18:14:45: Exiting...
error 2022-04-23 18:14:45: Error: Failed to connect to the adapter (Error: SRSP - SYS - ping after 6000ms)
at ZStackAdapter.start (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/zStackAdapter.ts:102:27)
at Controller.start (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/src/controller/controller.ts:123:29)
at Zigbee.start (/opt/zigbee2mqtt/lib/zigbee.ts:58:27)
at Controller.start (/opt/zigbee2mqtt/lib/controller.ts:100:27)
at start (/opt/zigbee2mqtt/index.js:101:5)
But when I try to fix the user-rights via Openhabian-config I get an invalid user error
$ fix_permissions /var/log/mosquitto mosquitto:openhabian 644 755
+ fix_permissions /var/log/mosquitto mosquitto:openhabian 644 755
+ [[ -e /var/log/mosquitto ]]
+ chown mosquitto:openhabian /var/log/mosquitto
+ [[ -n 644 ]]
+ [[ -f /var/log/mosquitto ]]
+ [[ -n 755 ]]
+ [[ -d /var/log/mosquitto ]]
+ find /var/log/mosquitto -type d -print0
+ xargs -0 chmod 755
+ return 0
+ return 0
+ [[ -d /opt/zigbee2mqtt ]]
+ [[ -s /etc/systemd/system/zigbee2mqtt.service ]]
+ return 0
+ cond_redirect fix_permissions /var/log/zigbee2mqtt zigbee2mqtt:openhabian 644 755
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ fix_permissions /var/log/zigbee2mqtt zigbee2mqtt:openhabian 644 755 \033[39;49;00m'
$ fix_permissions /var/log/zigbee2mqtt zigbee2mqtt:openhabian 644 755
+ fix_permissions /var/log/zigbee2mqtt zigbee2mqtt:openhabian 644 755
+ [[ -e /var/log/zigbee2mqtt ]]
+ chown zigbee2mqtt:openhabian /var/log/zigbee2mqtt
chown: invalid user: ‘zigbee2mqtt:openhabian’
+ return 1
+ return 1
+ echo 'FAILED (zigbee2mqtt log permissions)'
FAILED (zigbee2mqtt log permissions)
+ [[ -s /etc/ztab ]]
+ return 1
+ echo OK
Any tips where to look for?
Open a Github issue please so I can assign this to the author.
Please let me know if I’ve done it OK (never opened an issue on Github before)
It turns out I didn’t select the correct USB zigbee dongle.
The first ‘selection’ was other USB device and I selected with ‘enter’ (and not with space bar)
there is a third option that i use and i am pretty happy with it.zigbee2tasmota i use a sonoff zigbee bridge flashed with tasmota for coordinator and several sonoff and aqara zigbee devices.