Owners of Xiaomi equipment often face the problem of how to synchronize the humidifier with Apple HomeKit, if the manufacturer does not officially support this integration, the reason lies in the closed Mi Home ecosystem and the lack of MFi (Made for iPhone) certification on most devices of the brand.
Today, we're going to break down three proven methods: Home Assistant (the most reliable), HomeBridge plugin (for advanced users), and Mi Home cloud service with an intermediate bridge, all of which have their own nuances, from having a computer always on to functionality limitations, but the result is the same: your Mi Smart Humidifier 2, Humidifier 3 or Pro will appear in the Home app and be voice-controlled via Siri.
Important: All methods work with the latest firmware versions of devices (at 2026).If your humidifier is released before 2020, you may need to update the software through the official Mi Home app before you start setting up.
1. Device Preparation: What to Do Before Integration
Before you connect the humidifier to HomeKit, make sure it works properly in Xiaomiβs native ecosystem.This will eliminate firmware or hardware problems during the setup phase.
Preparation steps:
- π Connect the humidifier to the network 220V And wait for the beep to be ready.
- π± Install the Mi Home app (iOS or Android version) and log in.
- π Add the device to the application through the Profile β Add the device β Humidifier. If the device is not detected, reset it to factory settings (hold the power button 5-7 seconds).
- π Make sure the humidifier is connected to the same Wi-Fi network as yours. iPhone/iPad. Use only the nets. 2.4 GHz β Xiaomi does not support 5 GHz for most smart devices.
If the error "Cannot connect" occurs during the addition step in Mi Home, check:
- Application permissions: in iOS settings, give Mi Home access to the local network (Settings) β Mi Home β Local area network).
- Account Region: In Mi Home, switch to Mainland China β some humidifier models are not visible in other regions.
β οΈ Note: If you are using a dual-band router with a common router SSID For 2.4 and 5 GHz, temporarily split the networks. Some Xiaomi models can't connect to the combined networks.
Method 1: Integration with Home Assistant (Recommended)
Home Assistant is an open platform for smart homes that supports thousands of devices, including Xiaomi. The advantage of the method is that you do not need a constantly working computer (you can use a Raspberry Pi or even a Docker container), and the functionality of the humidifier will be available in full β from humidity adjustment to switching on on on schedule.
What you need:
- π₯οΈ Home Assistant (Recommended for Raspberry Pi 4 or Home Assistant Yellow).
- π Stable connection to a local network (Wi-Fi or Ethernet).
- π² iPhone/iPad with the latest version of iOS and the app Home.
Step-by-step:
- Install Home Assistant on your chosen device. For Raspberry Pi, use the official Home Assistant image. OS (You can download it on the project website).
- After installation, open the Home Assistant web interface at the address http://homeassistant.local:8123.
- Go to Settings. β Devices and services β Add integration and choose Xiaomi Mi.
- Enter the Mi Home account (login and password). If two-factor authentication is enabled, generate an app password in your Xiaomi account settings.
- After successful authorization, select your humidifier from the list of detected devices.
- Install the HomeKit Controller add-on via Settings β Supplements β Additions store.
- In the add-on settings, add a humidifier to HomeKit and scan. QR-code through the app Home on iPhone.
If the device doesn't appear in the integration list, upgrade the Xiaomi Mi component to the Home Assistant or check if your model is supported.A full list of compatible devices can be found in the documentation.
Humidifier connected to Mi Home|Home Assistant is launched and available on the local network|The router disabled the blocker of βsmart devicesβ (for example, AiProtection on the router) ASUS)|Port 8123 open to local access-->
3. Method 2: Use of HomeBridge (for users) macOS/Windows)
HomeBridge is a server that emulates HomeKit bridges for unsupported devices. Unlike Home Assistant, it requires a constantly running computer (Mac, Windows or Linux), but is easier to set up for beginners.
Requirements:
- π» Computer with macOS, Windows 10/11 Linux (Ubuntu/Debian).
- π Node.js version 16.x or higher (check the version with the node command) -v).
- π± iPhone with iOS 15+ and appendix Home.
Installation instructions:
- Install HomeBridge globally via the terminal: npm install -g homebridge
- Install a plugin for Xiaomi: npm install -g homebridge-mi-humidifier
- Edit the configuration file config.json (situated ~/.homebridge/ on macOS/Linux or %APPDATA%\homebridge\ Add the following block: {"platforms": [{"platform": "MiHumidifier", "name": "Xiaomi Humidifier", "ip": "192.168.x.x", // Replace it with IP your token moisturiser": "YOUR_DEVICE_TOKEN", // Get a token below the "model": "zhimi.humidifier.ca1" // Model of your device } ] }
- Get the device token with the help of the tool miio-cli: npm install -g miio-cli miio discover miio --ip 192.168.x.x --token YOUR_TEMP_TOKEN Info Note: Temporary tokens can be obtained through the Mi Home Packet Capture (Android) app or MIoT Spec service.
- Run HomeBridge with the homebridge team and scan QR-code.
β οΈ Note: If the humidifier does not respond to commands from HomeKit after adding, check: IP-The device address has not changed (set up static). IP Current token (token changes when the device is reset) In the computer firewall, incoming connections are allowed to port 51826.
How to find out the moisturizer model for config.json?
4. Method 3: Cloud Bridge over Mi Home + Home Assistant (without a local server)
If you canβt run Home Assistant or HomeBridge on a separate device, you can use a cloud bridge, which is less reliable (depending on Xiaomiβs servers), but doesnβt require a computer to be permanently on.
How it works:
- You set up Home Assistant in the cloud (for example, on a virtual server or through Home Assistant Cloud).
- Connect your Mi Home account to your Home Assistant through formal integration.
- Configure HomeKit with the HomeKit Controller add-on as in Method 1.
Limitations of the method:
- β³ Delay in execution of commands (up to 2-5 seconds).
- π A stable Internet is required (in case of communication failure, management is not available).
- π Risk of blocking Xiaomi account with frequent cloud survey.
Step-by-step:
- Register for Home Assistant Cloud (free for single device).
- Connect your cloud account to your local Home Assistant installation.
- Add Xiaomi Mi integration with cloud authorization (select the Cloud option when you set up).
- Follow the instructions from Method 1 to configure HomeKit.
π‘
If the humidifier doesnβt appear in HomeKit after setting up a cloud bridge, check the region of your Xiaomi account. Some models (such as the Mi Smart Humidifier 2) are only visible in the Mainland China region.
5. Common mistakes and their solutions
Even if you follow the instructions accurately, you can have problems, and we've collected some common mistakes and ways to fix them.
| Mistake. | Probable cause | Decision |
|---|---|---|
| Could not add an accessory in the app Home | Incorrect. QR-code | Remove the device from Home Assistant/HomeBridge And add it again. QR-current code (update the web interface page). |
| The humidifier does not respond to commands from HomeKit | Offline device or token error | Check the humidifier connection to Wi-Fi. Regenerate the token via miio-cli. |
| Invalid token in HomeBridge logs | Token is obsolete or incorrect | You get a new token. If the device is reset, the token changes. |
| Home Assistant can't see the moisturizer | The device is not in the Chinese region Mi Home | Switch your account region to Mainland China in the Mi Home settings. |
| Delay in execution of commands >5 seconds | Cloud bridge is being used | Go to local connection (see Method 1 or Method 2). |
If your error is not described in the table, check the Home Assistant logs. β System system β Logs) or HomeBridge (homebridge team) -D Often logs contain a specific error code that can be Googled.
β οΈ Warning: If the humidifier stopped working in Mi Home after integration, don't panic. This is normal behavior - the device can be "locked" with one bridge. To return control to Mi Home, remove the device from HomeKit and restart the humidifier.
6. Additional opportunities after integration
Connecting the humidifier to HomeKit opens up new automation scenarios that are not available in Mi Home.
Examples of automation:
- π‘οΈ Automatic on when humidity drops below 40% (use Xiaomi Temperature & Humidity Sensor).
- π Timetable: for example, turn on 30 minutes every 2 hours in the nursery.
- π Linking to other devices: Turning off the humidifier when opening the window (if there is an Aqara sensor) Door/Window Sensor).
- π£οΈ Siri voice control: Hey Siri, set the bedroom humidity to 50%".
How to create automation in HomeKit:
- Open the Home app on your iPhone.
- Go to the Automation tab. β Create automation.
- Select a trigger (such as Time or Sensor detected).
- Add Action: Choose a humidifier and set a target humidity or operating mode.
- Save the automation and test it.
Important: When you create automations with humidity sensors, set hysteresis (the difference between on and off) at least 5%. For example, turn on the humidifier at 40% and turn off at 45%. This will prevent frequent switching.
π‘
Local connection (via Home Assistant or HomeBridge) is more reliable than cloud: commands are executed instantly, there is no dependence on Xiaomi servers, and the load on the account is lower (there is less risk of blocking).
7. Alternative methods (for experienced users)
If none of these methods work, consider alternatives that require more technical knowledge, but can solve specific problems.
1. Firmware alternative software (at your own risk)
- Some enthusiasts are porting HomeKit-enabled firmware to Xiaomi devices, such as the OpenMiHome project.
- β οΈ Risks: loss of warranty, device failure, problems with updates.
2.Using the Aqara or Yeelight hub
- Some hubs (e.g. Aqara Hub) M2) Supports Xiaomi devices via Zigbee and native integration with HomeKit.
- Limit: only works with humidifier models that support Zigbee (e.g. Mi Smart Humidifier 2 in the Chinese version).
3. Cloud bridge services (IFTTT, Yandex Alice)
- Services of the type IFTTT Yandex Smart Home can act as an intermediate link between Mi Home and HomeKit.
- Cons: high latency, limited functionality, dependence on third-party servers.