A node to receive input from the Xiaomi Smart Home kit on the same LAN
A Node-red node to expose the messages sent by the Xiaomi Smart Home accessories sold under the Mijia brand. This is a Node-red integration of the Node.js module developed by quibusus
This module can be used to receive data from the following sensors:
- Temperature/humidity sensor
- Magnet switch
- Motion sensor
- State change of smart power plug
This code is based on works of:
You need to enable LAN mode in the gateway unit#Adding_the_Xiaomi_Gateway_to_Domoticz) to be able to receive the data packages on your LAN. Don't bother the MAC/IP addresses and passwords, you won't need them.
There's no further configuration required on the Node.js/Node-red side.
cd ~\.node-red npm install node-red-contrib-xiaomi-home
In the current version there's only one Xiaomi Smart Home node to expose all the Xiaomi events found on the network. The node outputs a msg.payload object with the event (type of sensor), sid (unique identifier of that unit) and the type or on state (the action).
For now you have to add sid filtering manually after this node.