Xiaomi Zigbee to MQTT bridge using zigbee-shepherd.
This little script allows you to use Xiaomi Zigbee sensors and switches without Xiaomi's gateway. It bridges the events sent from the sensors to MQTT. You can integrate the cheap and nice Zigbee sensors and switches with whatever smart home infrastructure you are using.
Install
$ git clone https://github.com/AndrewLinden/xiaomi-zb2mqtt.git
$ cd xiaomi-zb2mqtt
/xiaomi-zb2mqtt$ npm install
Configuration: for the moment you have to edit index.js and set your serial port and mqtt broker.
Run it
/xiaomi-zb2mqtt$ node index.js
To see whats happening behind the scenes run it with debug enabled:
/xiaomi-zb2mqtt$ DEBUG=* node index.js
WXKG01LM - Single, double, triple, quad and "more than five" click. Push and hold long click.
WXKG02LM - Left, right and both click
WSDCGQ11LM - Aqara Temperature Hudimity sensor with Temperature, Humidity and Pressure
RTCGQ11LM - Xiaomi Smart Home Aqara Human Body Sensor
MCCGQ11LM - Xiaomi Aqara Window Door Sensor