Tag - xiaomi

xiaomi mqtt udp zigbee    2016-11-08 07:46:41    43052    0    0

Update

I have uploaded a working version of the connector code on github : https://github.com/jon1012/mihome

What is it ?

The Xiaomi smart home solution is a low-cost zigbee ecosystem of devices that can stay on for a very long time with deep sleep on little batteries.

Best part about it is the price, less than 40 euros for the gateway (hub), and less than 20 for the individual sensors (you can maybe even find better prices online, just avoid gearbest!).

 

Available sensors :

  • Door Sensor
  • Motion sensor (Body sensor)
  • Wireless switch (a button that support clicks, double clicks and long presses)
  • Magic Cube (I haven't got one to test yet)
  • Probably others

1st tentative

This is my naïve test according to some specs found on the web.

import socket
import binascii

UDP_IP = "192.168.0.107"
UDP_PORT_FROM = 54322
UDP_PORT = 54321
MESSAGE = binascii.unhexlify('21310020ffffffffffffffffffffffffffffffffffffffffffffffffffffffff')

print ("UDP target IP:", UDP_IP)
print ("UDP target port:", UDP_PORT)
print ("mess