Integrating Xiaomi smart lamps into the Apple HomeKit ecosystem is a challenge that many users face when trying to unify device management through the Home on iPhone or iPad. Despite the fact that Xiaomi does not officially support the HomeKit protocol, there are workarounds: from using Home Assistant to configuring Homebridge on Raspberry Pi or even cloud services like HOOBS. In this article, we will analyze all the current methods, their pros and cons, as well as typical errors that prevent successful connection.
Itβs important to understand that the process depends on the light bulb model. For example, Yeelight (a subsidiary of Xiaomi brand) is often easier to integrate than the classic Mi LED Smart Bulb. Weβll focus on both options, and also consider what additional devices may be needed (for example, Xiaomi Gateway or Aqara Hub). If you are new to the world of smart homes, donβt worry: the instructions are adapted for users without a technical background.
Why Xiaomi doesnβt officially support HomeKit?
The root of the problem lies in different ecosystems: Xiaomi is focused on Mi Home/Home Assistant and Zigbee protocol (for most lamps), while Appleβs HomeKit runs on Thread and Wi-Fi. In addition, Apple requires manufacturers to certificate MFi (Made for iPhone/iPad), which involves additional costs and control from Cupertino. Xiaomi prefers to develop its own platform without paying for integration with competitors.
But that doesn't mean that you can't connect, and there are three main ways to get around the restriction:
- π Homebridge β Local Server Bridge Emulating HomeKit Devices.
- π Home Assistant β Advanced Automation System with a HomeKit Plugin.
- βοΈ Cloud services (HOOBS, Athom β Simplified versions of Homebridge with a web interface.
Each method has its own nuances, such as Homebridge requiring a device that is always on (Raspberry Pi, NAS, or even an old Mac mini), and Home Assistant providing more automation options but more difficult to set up, and cloud solutions are simpler, but depend on the stability of the Internet connection.
Method 1: Connecting via Homebridge (for beginners)
Homebridge is the most popular solution for Xiaomi integration into HomeKit. It is open source software that is installed on a separate device (most often Raspberry Pi) and acts as a bridge between ecosystems. For Xiaomi lamps, you will need a homebridge-mi-aqara plugin or homebridge-yeelight (depending on the model).
Here's the step-by-step instruction:
- Install Homebridge: Download the image for Raspberry Pi from the official homebridge.io website or install via npm on macOS/Linux: sudo npm install -g homebridge --unsafe-perm
- Add a plugin for Xiaomi: In the config.json configuration file (located in the ~/.homebridge folder), add a plugin and specify your light bulb token. The token can be obtained through the Mi Home app (instructions below).
- Configure the connection to Mi Home: In the file config.json The block must appear: "platforms": [{"platform": "MiAqaraPlatform", "devices": { "1234567890": { // ID Your light bulb name: "Bedroom", "token": "your_token_here" } } } ]
βοΈ Preparing Homebridge for the job
Critical: Xiaomiβs light bulb token changes when reset or reconnected to another hub. If the bulb was previously paired with Xiaomi Gateway, it must first untie in the Mi Home app.
β οΈ Warning: If the light bulb doesn't appear in HomeKit after setting up, check that the Mi Home settings have Local Area Network enabled (in the device profile) without it, Homebridge won't be able to control the lamp directly.
Method 2: Integration with Home Assistant (for advanced users)
Home Assistant is a more powerful alternative to Homebridge, which not only connects devices to HomeKit, but also allows you to create complex automation scenarios. To connect Xiaomi lamps, it uses the Xiaomi Miio component, which communicates with devices using the Mi Home protocol.
Main steps:
- π¦ Install Home Assistant on Raspberry Pi, Docker or Virtual Machine.
- π§ Add Xiaomi Miio integration through the Settings menu β Devices and services β Add integration.
- π Enter. IP-address of the light bulb and its token (you can get through Mi Home or special utilities).
- π Activate integration with HomeKit in Home Assistant settings.
The advantage of this method is flexibility. For example, you can set up automation where the Yeelight lamp will turn on when you detect motion with the Xiaomi camera, and then duplicate this event in HomeKit to control via Siri. However, setting up the Home Assistant requires more time and knowledge.
How to get a Xiaomi light bulb token without root?
| Method of integration | Difficulty | Equipment required | Pluses | Cons |
|---|---|---|---|---|
| Homebridge | Medium | Raspberry Pi/NAS | Easy to set up, local management | Limited Automation |
| Home Assistant | Tall. | Raspberry Pi/server | Maximum flexibility, script support | Complex setup, resource-intensive |
| HOOBS | Low. | Any PC | Ready-made solution, web interface | Paid license, dependence on the cloud |
Method 3: Cloud Services (HOOBS, Athom)
If you donβt want to mess around with the Raspberry Pi setup, you can use the cloud-based solutions available. HOOBS (Homebridge Out Of The Box) offers a pre-configured Homebridge with a web interface, installing it on any device (even an old laptop) and adding a plugin for Xiaomi.
Algorithm of action:
- Download the image of HOOBS from the official website and write it down on a flash drive.
- Boot from the flash drive on any PC (supported macOS, Windows, Linux).
- In the web interface (http://[IP-address]:80) Add the homebridge-mi-aqara plugin.
- Enter the light bulb token and restart the service.
- Open the Home app on your iPhone and add a new accessory (scan). QR-interface HOOBS).
The main advantage of this method is the lack of need for a Raspberry Pi. HOOBS There is a limitation: the free version allows you to connect only 5 More devices will require a paid subscription ($5/month).
π‘
If the Xiaomi light bulb is not found in HomeKit, try manually specifying it. IP-Address in the plugin settings. IP by device in the router (through binding) MAC-address).
Addressing common mistakes
Even with the right setup, users often face problems, and here are the most common ones and ways to solve them:
- π΄ The light bulb does not appear in HomeKit: Check that: The device token is correct (regenerate it via Mi Home). The light bulb and the Homebridge device are on the same network. The Mi Home settings enable access over the local network (Device Settings) β General. β Local area network).
- π Light bulb periodically shuts off: This may be due to: Unstable Wi-Fi (reconnect the lamp to the network) 2.4 Homebridge overload (check logs via journalctl) -u Homebridge! β Update to the light bulb firmware (sometimes Xiaomi blocks third-party connections).
- β οΈ Error "Can't add accessory": Remove the HomeKit cache on iPhone: go to Settings β Home β Home settings β Remove the house (the data will be saved to iCloud.
β οΈ Note: If you use the Xiaomi Gateway, its firmware can block access to the light bulbs from the outside, in which case you will either have to untie the lamps from the gateway or flash the gateway with alternative firmware (for example, OpenMiHome), which cancels the warranty.
Alternative methods: Aqara Hub and Matter
If all of the above seem complicated, consider two alternatives:
- Using Aqara Hub: Aqara (a subsidiary of Xiaomi) produces hubs that partially support HomeKit. For example, the Aqara Hub M2 can control Xiaomi light bulbs via Zigbee and stream them to HomeKit. However, this does not work with all lamp models - check compatibility on the Aqara site.
Matter is not yet a ubiquitous standard in 2026, but it is the most promising way to integrate.
π‘
If your Xiaomi light bulb supports Matter, wait for a firmware update to help you avoid having to use Homebridge or Home Assistant.