node-red-contrib-xiaomi-home 0.1.1

A node to receive input from the Xiaomi Smart Home kit on the same LAN

npm install node-red-contrib-xiaomi-home

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

Xiaomi smart devices and sample output

This module can be used to receive data from the following sensors:

  • Temperature/humidity sensor
  • Magnet switch
  • Button
  • 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.

Node Info

Version: 0.1.1
Updated 8 months, 1 week ago


4 in the last day
19 in the last week
48 in the last month


  • xiaomi-home


  • node-red
  • xiaomi


  • timmmmmmmmm