Xiaomiβs ecosystem offers some of the most affordable and functional smart home devices, from Mi Motion Sensor motion sensors to Mi Robot Vacuum vacuum cleaners. However, their native integration with Appleβs HomeKit is missing: the manufacturer officially supports only its own Mi Home platform (now Xiaomi Home) and partly Google Home, which poses a problem for iPhone users who want to control all equipment through a single app, Home.
Fortunately, there are workarounds. In 2026, three main methods are relevant: using Home Assistant (with the Xiaomi MIOT plugin), setting up Homebridge (with the homebridge-mi-home or homebridge-xiaomi-miio plugins), and alternative solutions like the Aqara Hub for compatible devices. Each method has its own nuances: from the need to deploy a local server to device model constraints. In this guide, we will review all options with the latest updates to the MIOT and Zigbee protocols, and we will also explain how to avoid typical synchronization errors.
Why Xiaomi doesnβt support HomeKit directly?
The main reason for the lack of native integration is the MIOT (Mi IoT) protocol, which Xiaomi uses to connect devices to the cloud, which is closed and requires authorization through a Mi Account, which contradicts the principles of Apple HomeKit, which is focused on local management without necessarily binding to the cloud, and Xiaomi actively promotes its own ecosystem and is not interested in supporting competitive platforms.
The second barrier is hardware constraints: Many Xiaomi devices (especially budget ones) do not have HomeKit certification, as it requires a HomeKit Secure Router or an Apple Authentication Coprocessor chip, which increases the cost of production, with the exception of some Aqara models (a subsidiary of Xiaomi brand), which initially support HomeKit through its own hub.
- π Closed protocol MIOT: Requires authorization through Mi Account, which conflicts with the local architecture of HomeKit.
- π° Xiaomi wonβt pay Apple to certify and test every device.
- π‘ HomeKit chips: Most devices donβt have HomeKit hardware support.
- π Regional restrictions: even compatible devices (e.g. Aqara Hub) M2) It may not work in some countries due to the frequency difference between Zigbee and other countries.
β οΈ Note: After the firmware update on Xiaomi devices (especially after 2023), some plugins for Homebridge may stop working. MIOT Before integration, check the firmware version of the device!
Method 1: Integration with Home Assistant (recommended method)
Home Assistant is an open platform for smart homes that allows you to combine devices from different manufacturers, including Xiaomi, and export them to HomeKit. The advantage of this method is full local operation without dependence on the Xiaomi cloud, which speeds up the response of devices and increases reliability.
The setup will require:
- Install Home Assistant (on Raspberry Pi, NAS, or Docker)
- Add Xiaomi MIOT integration through the HACS (Home Assistant Community Store) interface.
- Get a MIOT Token for each device (instruction below).
- Set up export to HomeKit through built-in integration.
Install Home Assistant on a separate device (RPi 4/5 recommended)
Create a backup of the current Mi Home configuration
Get access tokens for devices (via Mi Home Token Extractor)
Check the compatibility of the device model with the Xiaomi MIOT plugin
Disconnect devices from the Mi Home app (optional but recommended)
-->
The hardest part is getting the MIOT Token.
- Install the Mi Home Token Extractor app on Android (requires Android 8+ and ADB debugging).
- Log in to Mi Home and select the device that you need token for.
- Run the script via ADB: adb shell am start -n com.xiaomi.smarthome/.plugin.debug.DebugPluginActivity
- Copy the generated token and enter it in Xiaomi MIOT integration settings in Home Assistant.
| Xiaomi device | Support for Xiaomi MIOT | Notes |
|---|---|---|
| Mi Robot Vacuum (all models) | β Complete. | A token is required and IP-device address on the local network. |
| Mi Air Purifier 3/4 | β Complete. | All cleaning modes are supported except for voice control. |
| Mi Temperature & Humidity Sensor | β Partial | The data is updated with a delay of up to 5 minutes. |
| Mi Smart Plug (Wi-Fi) | β Complete. | It only works with the latest firmware (2023+). |
| Mi Door/Window Sensor | β οΈ Limited. | Aqara hub is required for stable operation. |
π‘
If the device is not detected in Home Assistant, try manually specifying it. IP-Address in the integration configuration. IP post MAC-the device address in the router to avoid changes after rebooting.
Method 2: Using Homebridge with plugins for Xiaomi
Homebridge is a lightweight server that emulates the HomeKit bridge and allows you to connect incompatible devices. For Xiaomi, two plugins are relevant:
- Homebridge-mi-home is for devices that work through the Mi Home cloud.
- Homebridge-xiaomi-miio β for local management (requires tokens).
Homebridge has the advantage of having less hardware requirements (even on the Raspberry Pi Zero 2W) and easier to set up.
- The cloud plugin (mi-home) depends on Xiaomi servers β when they fall, management will disappear.
- A local plugin (miio) requires manual token acquisition (as in Home Assistant).
- Not all devices are supported β for example, Xiaomi cameras may not stream video to HomeKit.
Instructions for setting:
- Install Homebridge on your device (instructions are available on the official website).
- Install the desired plugin via npm: npm install -g homebridge-mi-home or for local management: npm install -g homebridge-xiaomi-miio
- Add the configuration to the config.json file (example below).
- Restart Homebridge and add a bridge to the Home app.
{
"platforms": [
{
"platform": "MiHomePlatform",
"name": "Xiaomi Devices",
"appId": "your app_id,"
"appKey": "your app_key,"
"serverCountry": "cn", // or "ru", "us" depending on the region
"devices": [
{
"deviceId": "123456789",
"token": "your miot_token,"
"name": "Robot vacuum cleaner"
}
]
}
]
}β οΈ Note: When using a cloud plugin (mi-home), your data (including device history) will be transferred through Xiaomi servers in China.If privacy is critical, use only a local plugin (miio) with tokens.
Home Assistant (local management)
Homebridge (easy to set up)
Aqara Hub (Native Support for HomeKit)
Another option
-->
Method 3: Using the Aqara Hub to support HomeKit natively
If you use Aqara devices (a subsidiary of Xiaomi), the most reliable way is to buy an Aqara Hub (like the Aqara Hub). M2 Or Aqara Camera Hub. G3). These hubs have built-in support for HomeKit and do not require additional servers. Just connect the hub to Mi Home, and then add it to HomeKit via the Internet. QR-code.
Advantages of the method:
- π Native integration: devices appear in HomeKit as native, with full support for automation.
- πΆ Local control: the hub communicates with sensors on Zigbee, not dependent on the cloud.
- π Automatic updates: Hub firmware and devices are updated through Mi Home.
Limitations:
- It only works with Aqara devices (not all Xiaomi devices are compatible).
- The hub must be connected to the Mi Home, and without it, some functions (such as geofences) do not work.
- Price: The Aqara Hub M2 costs ~$50, which is more expensive than the Homebridge on the Raspberry Pi.
| Hub model | Support for HomeKit | Protocol | Max. Devices. |
|---|---|---|---|
| Aqara Hub M2 | β Yes. | Zigbee 3.0 | 128 |
| Aqara Camera Hub G3 | β Yes. | Zigbee 3.0 + Wi-Fi | 128 |
| Aqara Hub E1 | β Yes. | Zigbee 3.0 | 32 |
| Mi Smart Home Hub | β No. | Zigbee | β |
How to add Aqara Hub to HomeKit?
Problem Solving: Typical Errors and Corrections
Even with the right setup, Xiaomiβs integration with HomeKit can be unstable, and here are the most common problems and ways to solve them:
- π« Device not detected: Check that device and server (Home) Assistant/Homebridge) You can turn off the firewall or the antivirus that can block ports. IP-router.
- β οΈ Authentication error (incorrect token): Get a new token - old ones may expire after the firmware update. Check the region in the plugin settings (should match the Mi Home account region).
- π’ Status update delays: For Mi Temperature Sensor, increase the survey interval in integration settings. If you use a cloud plugin, go to local.
- π Device disconnects from HomeKit: Check if deviceId has changed after rebooting the device. Update the plugin to the latest version.
β οΈ Note: If Xiaomi devices stopped working in HomeKit after the firmware update, try to roll back to the previous version of the software. Use the Mi Home Firmware bootloader tool and manually swipe the device through Telnet or ADB.
π‘
The most stable devices are connected through local plugins (Xiaomi MIOT or homebridge-xiaomi-miio). Cloud solutions (homebridge-mi-home) depend on Xiaomi servers and can lie.
Alternative methods: what to do if nothing works?
If none of the above methods work, consider alternative options:
- π Using Google Home as a bridge: Add Xiaomi devices to Google Home, then link Google Home to HomeKit via the Home app (starting with iOS 16).Cons: delays of up to 5 seconds and limited functionality (e.g. no sensor support).
If you want 100% stability, consider buying native-supported HomeKit devices such as:
- Aqara (sensors, switches, hubs),
- Philips Hue (lighting),
- Eve (Sockets, Environmental Sensors)