Because of the irritation I got from my Xiaomi Zigbee bridge (talking in Chinese, sending data to Chinese cloud and a bad app) I started to look if it is possible replace the Xiaomi gateway with a more open solution.
I found that Andrew Linden had a proof of concept for this. It bridges events and allows you to control your Zigbee devices via MQTT. In this way you can integrate your Zigbee devices with whatever smart home infrastructure you are using.
I found this idea very interesting so I forked his repo and started to refactor the code, add features and write documentation.
Currently everything is working quite well for me so I thought it would be nice to share it here. You can find zigbee2mqtt on Github: https://github.com/Koenkk/zigbee2mqtt.
How to get started
- Bridge Zigbee device messages to MQTT
- Control Zigbee devices via MQTT
- Home Assistant MQTT discovery (makes integrating with home assistant a breeze)
- Supports Xiaomi, Hue and Tradfri devices
- Support for new devices can be added very easy
- Docker images
Please let me know what you think about zigbee2mqtt!
Very interesting as I too have xiaomi, hue and TRÅDFRI. I will read more tonight!
Are you considered to make a hassio addon from your docker image?
Does this only work with a USB-Version? Or can this potentially work with CC2530 too via the GPIO?
Good tip! Will look into it.
I’ve only tested with the USB version -> I don’t know.
I have both Xiaomi & Hue in my home and would LOVE to get away from those bridges. That being said, some questions:
Is there a limit of devices that will work with methodology? I ask because Hue has a 50 device limit on their hub, and I’m getting very close to it and would love avoid getting another bridge.
When you mean Xiaomi, does this include the Air Purifier / Roborock ?
Thanks so much for this awesome awesome implementation!
Thanks so much! Really appreciate the clarification. I think I’ll (for now) transition my Xiaomi & Tradfri stuff over and as the limit increases transition my Hue stuff over. Total game changer for my instance.
Now if we could do something about the Lutron bridge…
I’ve mentioned this before in some other threads. Awesome project. Later down the road, add some ZWave action to it and you’ve got a killer product. A simple no holds barred device doing all the Zwave & Zigbee action over MQTT to whatever project/software you need.
This look awesome! I would LOVE to get rid of my Xiaomi GW.
Will the Xiaomi Button “double_click” “long_press” action still be sent under an MQTT topic?
Even more: Xiaomi MiJia wireless switch (single, double, triple, quadruple, many and long click) (from https://github.com/Koenkk/zigbee2mqtt/wiki/Supported-devices#xiaomi)
Is this the sort of USB Zigbee device you are using?
(edited link - other one was 2540)
or have a link to (UK available) device I can buy?
Thats the one, note that you also need to flash the stick with a firmware, for that you need a CC debugger (see https://github.com/Koenkk/zigbee2mqtt/wiki/Getting-started)
I looked for this page but didnt find it - thanks for the direct link
(please may I humbly suggest to edit you 1st post to link to this getting started page)
For those of us without access to a windows machine, does anyone know another way to flash the cc2531?
There is a similar project, open source and leaded by a French guy: Zigate. You can buy a device or do it yourself.
Content is mostly in French but it seems there are a lot of Zigbee devices compatible with the current firmware.
cc-tool is compatible with macOS and Linux, and the SourceForge page states that it is compatible with the CC2531. I use it often on macOS, but not yet with CC2531 specifically.
There is also the Dresden Conbee and deconz solution… but choice is good.
Mqtt and easy (it seems) addition of new devices looks to be the strength here.
What’s the benefit in HA→MQTT→Zigbee bulbs over using ZHA and just having HA→Zigbee bulbs?
This is great, I would love to replace my Tradfri hub with an open solution. Will order the hardware and try it out.