Zigbee2mqtt: getting rid of your proprietary Zigbee bridges (Xiaomi, Hue, TRADFRI)


#1

Hi all,

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

Features

  • 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! :honeybee:


Hass.io Add-on: Zigbee2MQTT
Coexistence between Zigbee systems (Xiaomi, Philips, IKEA...)
New custom component : ZiGate
What Wall Switch Options are there?
Moving in to new house. Advice needed
New Setup - Zigbee
Xiaomi without hub?
Door Chime - audible
Xiaomi Gateway Offline
CC2531 Zigbee USB Dongle
Xiaomi Aqara Confusion
Cheap termo sensors
Remote access to HA on internet from sim card only
Xiaomi gateway - Which one to buy?
Does Home assistant work with zigbee2mqtt sniffers
Ikea Tradfri PIR Sensor Experience
The Lightstrips choice thread
Xiaomi Gateway Key
Xiaomi. Use hub or not?
#2

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?


#3

Does this only work with a USB-Version? Or can this potentially work with CC2530 too via the GPIO?


#4

Good tip! Will look into it.


#5

I’ve only tested with the USB version -> I don’t know.


#6

I have both Xiaomi & Hue in my home and would LOVE to get away from those bridges. That being said, some questions:

  1. 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.

  2. When you mean Xiaomi, does this include the Air Purifier / Roborock ?

Thanks so much for this awesome awesome implementation!


#7
  1. At the moment 20 but with the firmware from oskarn97 48 devices, but haven’t tested this yet. https://github.com/oskarn97/xiaomi-zb2mqtt/tree/master/firmware. You can ofcourse use multiple instances of zigbee2mqtt.

  2. Only Xiaomi zigbee devices, so no.


#8

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…


#9

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.


#10

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?


#11

Even more: Xiaomi MiJia wireless switch (single, double, triple, quadruple, many and long click) (from https://github.com/Koenkk/zigbee2mqtt/wiki/Supported-devices#xiaomi)


#12

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?


#13

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)


#14

I looked for this page but didnt find it - thanks for the direct link :slight_smile:
(please may I humbly suggest to edit you 1st post to link to this getting started page)


#15

For those of us without access to a windows machine, does anyone know another way to flash the cc2531?


#16

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.


#17

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.


#18

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.


#19

What’s the benefit in HA→MQTT→Zigbee bulbs over using ZHA and just having HA→Zigbee bulbs?


#20

This is great, I would love to replace my Tradfri hub with an open solution. Will order the hardware and try it out.