Zigbee2MQTT with the Sonoff Zigbee Bridge
If you've been using your Zigbee bridge with the ZHA integration and don't like some of the oddities of buttons using ZHA Events, etc or simply just want to detach from HA, or even enable support more devices; it's time to jump on over to Zigbee2MQTT. Previously there wasn't the ability to use Zigbee2MQTT if you were using the Sonoff Zigbee Bridge. It is currently in the development branch of Zigbee2MQTT if you want to give it spin. Trust me, it's well worth it!!
Still using your Sonoff Zigbee Bridge with the cloud? Take it out of the cloud with this guide! https://www.digiblur.com/2020/07/how-to-use-sonoff-zigbee-bridge-with.html
iTead also is now selling their USB 3.0 dongle that uses the same chip as the Zigbee Bridge. It is preflashed with correct firmware out of the box that can also be used with ZHA and Zigbee2MQTT using the same procedure as below with the USB port.
If you are using the ZHA integration at this time I would suggest removing all your devices from the ZHA integration and then remove the integration itself as you can not point two integrating pieces of software at the bridge at the same time. If you were using TasmotaZigbee or using a newly flashed Sonoff Zigbee Bridge, follow the guide to set the correct template and rules to start the TCP server on the bridge. Once you get to the Home Assistant part adding it as ZHA, stop following the guide.
"Supervisorless" installs of Home Assistant, you'll simply need to pull the docker container for zigbee2mqtt, a recent production or developer build is fine.. More info can be found here. https://www.zigbee2mqtt.io/information/docker.html
Supervisor based installs of Home Assistant, add the repository URL under Supervisor → Add-on store → ⋮ → Manage add-on repositories: https://github.com/zigbee2mqtt/hassio-zigbee2mqtt This will add two versions of Zigbee2MQTT to the addon store. Install the zigbee2mqtt version you prefer, production or developer is fine.
The configuration to use the bridge will be very similar for both Supervisor and non-Supervisor installs. Either in the add-on configuration or the configuration.yaml file for the docker container, the adapter configuration is (replace the IP address with your local bridge IP):
If this is your first install I would highly recommend skimming through the docs for additional setup options at https://www.zigbee2mqtt.io and please remember to secure your network by by setting the network key as GENERATE. Sorry Supervisor users you'll need to make up your own random key as it doesn't seem to be supported by the supervisor yet. See more here - https://github.com/zigbee2mqtt/hassio-zigbee2mqtt/issues/41
Once you have it configured, start up the container/add-on and fingers crossed...check the logs to see if everything started correctly. If not, be sure your bridge rule is still enabled to start the TCP server on port 8888 and your network can reach it.
Enjoy! Open the GUI interface and start pairing up your devices. If you have some additional info to post in order to help with the testing and development of this adapter type, you can share it here: https://github.com/Koenkk/zigbee-herdsman/issues/319
Other Resources - Upgrade the HUSBZB-1 Nortek Zwave/Zigbee USB Stick to also use Zigbee2MQTT - https://github.com/walthowd/husbzb-firmware (UPDATE: Zigbee2MQTT not starting)
Amazon UK - https://amzn.to/2TnG2R4
Amazon CA - https://amzn.to/2JWsNq5
Discord Chat - https://discord.gg/bNtTF2v
Patreon - https://www.patreon.com/digiblurDIY
Facebook - https://www.facebook.com/groups/digiblurdiy
Instagram - https://www.instagram.com/digiblurdiy
Please note that links above may be an affiliate link, utilization could earn digiblurDIY a small commission of most purchases and helps with future video projects. Thank you!
I upgraded tht HUSBZB firmware to get Zigbee2MQTT to work with it,
ReplyDeletehowever it didnt work,
what else is needed aside the upgrade?
Set the usb adaptor to ezsp and connect it up.
DeleteThis comment has been removed by the author.
DeleteI did so, change to /dev/ttyUSB1
Deletehow ever:
Error: Failed to connect to the adapter (Error: SRSP - SYS - ping after 6000ms)
Tried that but it's complaining about "serial.adapter should be equal to one of the allowed values"
DeleteSuggest check more tips in https://github.com/Koenkk/zigbee-herdsman/issues/319
DeleteCorrection: Right hyperlink but wrong URL to https://github.com/Koenkk/zigbee-herdsman/issues/319
ReplyDeleteThanks! I'll get it updated.
DeleteWhen setting up ZIgbee2mqtt Edge, in HA with the config open, I copy your part:
ReplyDeleteserial:
adapter: ezsp
port: 'tcp://10.10.1.20:8888'
and when I save it's replaced with
serial:
port: /dev/ttyACM0
For the life of me I can't figure out what I might be doing wrong.
Any idea?
I think that has to deal with a cache issue of the supervisor for some odd reason. The zigbee2mqtt HA addon page had a fix for that I believe. If not, you should open an issue with them to get it fixed.
DeleteDid you ever find a fix? Struggling with this now. It does not like entering “ezsp” for the adapter. Using any of the other four options, it saves fine.
DeleteMake sure your software is up to date. If the supervisor still isn't saving then I would open a bug report for the issue.
DeleteGot same problem. Zigbee2mqtt 1.18.1-1 and home.io core-2021.5.4
DeleteI would open an issue on the addon for the bug https://github.com/zigbee2mqtt/hassio-zigbee2mqtt/issues
DeleteZigbee2MQTT:info 2021-05-13 21:31:43: Starting Zigbee2MQTT version 1.18.3-dev (commit #55ce381)
ReplyDeleteZigbee2MQTT:info 2021-05-13 21:31:43: Starting zigbee-herdsman (0.13.96)
Assertion failed
Assertion failed
Zigbee2MQTT:info 2021-05-13 21:31:49: zigbee-herdsman started
Zigbee2MQTT:info 2021-05-13 21:31:49: Coordinator firmware version: '{"meta":{"maintrel":"8 ","majorrel":"6","minorrel":"7","product":8,"revision":"6.7.8.0 build 373"},"type":"EZSP v8"}'
Zigbee2MQTT:info 2021-05-13 21:31:49: Currently 0 devices are joined:
not sure why it cannot connect - I followed the instructions and the only difference seems to be type":"EZSP v8"
i'm so silly.. its already working .. did not realised the coordinator will NOT show up ..ha! awesome! now sonoff Zbridge can be used with Z2M! without CC2531
DeleteI also get Assertion failed and when I try to pair a device I get a message saying Device left the network.
DeleteSeems to work with the latest edge version
DeleteI followed the instructions step by step but when I insert
ReplyDeleteserial:
adapter: ezsp
port: 'tcp://192.168.168.20:8888'
and save an error appears:
Impossibile salvare la configurazione del componente aggiuntivo, does not match regular expression. Got {'data_path': '/config/zigbee2mqtt', 'external_converters': [], 'devices': 'devices.yaml', 'groups': 'groups.yaml', 'homeassistant': True, 'permit_join': False, 'mqtt': {'base_topic': 'zigbee2mqtt'}, 'serial': {'adapter': 'ezsp', 'port': 'tcp://192.168.168.20:8888'}, 'advanced': {'log_level': 'info', 'pan_id': 6754, 'channel': 11, 'network_key': [1, 3, 5, 7, 9, 11, 13, 15, 0, 2, 4, 6, 8, 10, 12, 13], 'availability_blocklist': [], 'availability_passlist': []}, 'device_options': {}, 'blocklist'...
same issue here, did you manage to fix this?
DeleteEnsure you're on the latest version (v1.21)
DeleteI had the wrong Add-on repo in my HA setup. After removing and adding the error went away.
https://github.com/zigbee2mqtt/hassio-zigbee2mqtt
Every device I pair with the ZBBridge following this method shows as 'unsupported' under manufacturer.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteI can second that, everything is broken on zigbee2mqtt side related to this. EZSP is not officially supported tho so it might be fixed in another release.
ReplyDeleteThey even discourage the use of wifi based coordinator.
Issue is all discovered device are not recognized and thus marked as unsupported even if they are clearly in official supported list.
I tryed this with lidl gateway using ethernet cable and its the same result tho. So both(lidl and sonoff) EZSP devices are not working with zigbee2mqtt.
They work tho with ZHA.