Xiaomi Gateway (Aqara)
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
- Human Body Sensor (Motion Sensor)
- Wireless Smart Switch
- Door/Window Sensor
- Temperature and Humidity Sensor
- Smart Socket/Plug - Zigbee version (The WiFi version is not supported)
- Xiaomi Mi Smart Cube
- Wireless Aqara Switch (Dual Button)
- Wireless Aqara Switch (Single Button)
- Wired Aqara Switch (Dual Button)
- Wired Aqara Switch (Single Button)
- 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.
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:
- Name: "Xiaomi Gateway" or anything you want to name it
- Remote Address: the IP address of your gateway
- Port: Use 9898
- Password: The password of your gateway
then click the Add button. Navigate to Setup -> Devices, and you should now see detected devices listed.