I am maintaining a collection Xiaomi device drivers for Hubitat in a GitHub repository, at veeceeoh/xiaomi-hubitat.
These device drivers are based on the bspranger/Xioami repository of device handlers for SmartThings, but with significant modifications for specific use only with Hubitat.
Rather than start a new thread for each separate Xiaomi device driver as I finish them, I will post announcements on this thread, and add them to the list below in this initial thread post.
Currently supported Xiaomi devices:
- “original” & Aqara Temperature/Humidity sensors (code here)
- “original” Motion Sensor (code here)
- Aqara Motion Sensor (code here)
- “original” & Aqara Door/Window contact sensors (code here)
- Aqara Leak sensor (code here)
- “original” Button (beta code here)
- Aqara Button - models WXKG11LM & WXKG12LM (code here)
- Aqara Smart Wall Switch - 2 button wireless model WXKG02LM (code here)
- Mi “Magic” Cube Controller (beta code here)
- MiJia Honeywell Smoke Detector (code here)
Notes on all Xiaomi device drivers:
- All references to a mobile app user interface that were in the original SmartThings device handlers have been removed, since there is no UI in Hubitat (at this time)
- Xiaomi devices send reports based on changes, and a status report (including battery voltage data) every 50-60 minutes. These settings and the report time intervals are hardware-based and cannot be adjusted.
- The battery level / voltage is not reported at pairing. The sensors are programmed to supply battery voltage data in their first status report, 50-60 minutes after pairing.
- Pairing Xiaomi devices can be difficult as they were not designed to use with a Hubitat hub.
Basic pairing instructions (except for Leak sensor, Smart Wall Switch, & Smoke Detector):
- Holding the sensor’s reset button until the LED blinks will start pairing mode.
- After a brief pause, the LED will flash again.
- 3 quick flashes indicates success, while one long flash means pairing has not started yet.
- In either case, keep the sensor “awake” by short-pressing the reset button repeatedly, until the sensor is recognized by Hubitat, ready to be named.
Dropped Connection Issue:
As of Hub Update 698, real progress has been made in that after applying the update, Xiaomi sensors have remained connected for most users. However, there have still be reports by some users of sensors dropping their connection less than 60 minutes after pairing, and for others within 24 hours. Just be forewarned: Since they were specifically designed to work with a Xiaomi Gateway hub, there’s no guarantee that Xiaomi devices will stay connected for 100% of Hubitat users.
To reconnect a “lost” sensor without deleting and re-pairing it:
- Put Hubitat in “Discover Devices” mode.
- For the Temperature/Humidity sensors, Short-press the sensor’s reset button once.
For any other sensors, LONG-press the reset button and release when the LED flashes (same as for pairing).
- Wait for the LED to flash again.
- 3 quick flashes indicates reconnection.
- If only one long flash, short-press the button and go to step 3.
- The device will resume reporting as normal.
Please if you have feedback about any of my Xiaomi device drivers, post on this thread.
If you have any general feedback on pairing Xiaomi devices and whether they are staying connected to your Hubitat hub, please join the discussion on this forum thread.