Xiaomi Gateway (Aqara)

From Domoticz
Jump to: navigation, search

Xiaomi Gateway

Xiaomi (Aqara) makes a smart home gateway/hub that has support for a variety of Xiaomi sensors. They can be purchased on AliExpress or other stores at very competitive prices. Protocol is Zigbee and WiFi, and the gateway and Domoticz need to be in the same network/subnet.

Multiple gateways are not supported, however the Smart Socket/Plug acts as a wireless repeater so you can use these to extend network range.

Currently you need the beta version of Domoticz to support the Xiaomi Gateway and devices

Note that the gateway needs to be at least version 2. Radio support on the gateway indicates at least version 2. If you are unsure, please ask your supplier before purchasing

Xiaomi.jpg

Compatible Devices

Compatible Devices:

  1. Human Body Sensor (Motion Sensor)
  2. Wireless Smart Switch
  3. Door/Window Sensor
  4. Temperature and Humidity Sensor
  5. Smart Socket/Plug - Zigbee version (The WiFi version is not supported)
  6. Xiaomi Mi Smart Cube
  7. Wireless Aqara Switch (Dual Button)
  8. Wireless Aqara Switch (Single Button)
  9. Wired Aqara Switch (Dual Button)
  10. Wired Aqara Switch (Single Button)
  11. Xiaomi Gateway LED

Adding the Xiaomi Gateway to Domoticz

You first need to enable local network functions by using the Android Mi Home App https://play.google.com/store/apps/details?id=com.xiaomi.smarthome

Make sure you set your region to Mainland China under settings -> Locale - at time of writing this seems to be required.

Select your Gateway in Mi Home, then the 3 dots at the top right of the screen, then click on about. Tap the version number at the bottom of the screen repeatedly until you enable developer mode - you should now have 2 extra options listed in Chinese. Choose the first new option, and then tap the toggle switch to enable LAN functions. Note down the password (91bg8zfkf9vd6uw7 in the screenshot). Make sure you hit the OK button (to the right of the cancel button) to save your changes.

Xiaomi 01.png

Now choose the second new menu option, and note down the IP address after "localIp".

Then in Domoticz go to Setup -> Hardware, and choose the Xiaomi Gateway Type. Enter the following:

  1. Name: "Xiaomi Gateway" or anything you want to name it
  2. Remote Address: the IP address of your gateway
  3. Port: Use 9898 Note that you cannot have another service on your system already using port 9898
  4. Password: The password of your gateway

Note that you may need to clear your browser cache if you can't see the Xiaomi Gateway option and/or all the fields

Xiaomi 03.PNG

then click the Add button. Navigate to Setup -> Devices, and you should now see detected devices listed.