Integration of Xiaomi vacuum cleaners in Apple HomeKit: a step-by-step guide

Owners of the Apple ecosystem often face limited choices of smart appliances that support the native HomeKit protocol. Xiaomi and Roborock are among the best on the market, however, their direct integration with the Home app on iPhone or iPad is often not available without additional action.This creates a situation where the user is forced to keep two smart home management apps, which reduces the overall efficiency of automation.

Fortunately, there are several proven ways to get around this limitation and connect your robot vacuum cleaner to the Apple ecosystem.The process can range from using third-party bridge apps to deploying your own server based on Raspberry Pi. In this article, we will take a detailed look at all the methods available, assess their complexity and help you choose the best option for your level of technical training and available equipment.

Before you start setting up, it is important to understand that native support for HomeKit in Xiaomi vacuum cleaners is extremely rare, mainly in models released specifically for the Western market or in new lines with the logo "Works with Apple HomeKit". For the vast majority of devices, including the popular models of Roborock S5, S6, S7 and Xiaomi Vacuum Mop, you will need to use middleware. The key to successful integration is to obtain a local access key (Token) of your device, without which third-party systems will not be able to manage the vacuum cleaner.

Why Xiaomi vacuum cleaners are not visible in HomeKit by default

The main reason Xiaomi devices are not visible in the Home app is Apple’s policy: the Cupertino-based company requires manufacturers to undergo strict MFi (Made for iPhone) certification, which is a paid and complex process. Chinese manufacturers, focused on the mass segment, often save on this certification, preferring to develop their own Mijia platform.

Xiaomi’s device interface architecture is built around the company’s cloud servers. Phone teams travel a long way through the Internet before reaching a vacuum cleaner. HomeKit’s protocol, in turn, relies on local management and a high degree of data encryption, which requires a dedicated chip or software directly in the device. The lack of such a chip in budget and mid-budget models makes direct integration impossible without “crutches”.

However, the enthusiast community has created a variety of tools to broadcast commands between Xiaomi’s cloud and Apple’s local network Home, which not only allows you to run the cleaning, but also to receive statuses such as battery level, water level in the tank or the amount of dust collected, if the vacuum cleaner model supports these sensors.

📊 What kind of robot vacuum cleaner Xiaomi?
Roborock S5/S6/S7
Xiaomi Vacuum Mop
Xiaomi Robot Vacuum
Another model

Preparatory stage: obtaining a device token

The most important and often the most difficult step for a beginner is to extract your device’s unique identifier, known as Token.This 32-character key is required by any third-party software to log into the Xiaomi cloud on your behalf.Without this token, no plugin will be able to send a command to your vacuum cleaner.

There are several ways to get a token, but the most versatile and secure is to use the Home Assistant platform or specialized utilities for the PC. If you plan to use the method with Homebridge on your computer, you will have to use command line tools or third-party apps from the App Store that can pull tokens from your Mi Home account.

☑️ Checklist before receiving the token

Done: 0 / 4

It is important to note that the process of obtaining a token requires that your phone and computer (or server) be on the same local network.Also make sure that your Xiaomi account is tied to a region corresponding to the server on which the device is registered (usually China or Europe).

What to do if the token does not work?
If the standard methods don't work, try temporarily changing the region in the Mi Home app to China, adding the device again, getting the token, and then returning the region back, sometimes helping to bypass the locks.

Method 1: Use of a plugin for Homebridge

The most popular integration method for macOS and Linux users is to install the Homebridge platform.This is a server that emulates the HomeKit accessory and allows you to add thousands of devices that are not supported by Apple natively. For Xiaomi vacuum cleaners, there is a well-established plugin called homebridge-xiaomi-roborock-vacuum.

Installing Homebridge requires a computer or a single board computer (such as a Raspberry Pi) that will work around the clock. UI) You need to find and install a plugin for Roborock or Xiaomi. In the configuration file you will need to enter the previously received token, IP-vacuum cleaner address and your account details.

The advantage of this method is that it is highly customized, and you can set up additional accessories like virtual switches for Do Not Disturb or a room to clean. However, it is worth considering that Homebridge can be resource-intensive for older computers and requires basic knowledge of working with the command line or the command line. JSON-configuration.

Below is a table comparing the main plugins for Homebridge suitable for different models of vacuum cleaners:

Plugin nameSupported brandsDifficulty setting upStability
homebridge-xiaomi-roborock-vacuumRoborock, XiaomiMediumTall.
homebridge-mi-robot-vacuumXiaomi (old models)Tall.Medium
homebridge-miioDevices of the Mi ecosystemTall.Depends on the device.

Method 2: Integration with Home Assistant

For those looking to build a truly powerful and autonomous smart home, the ideal solution is the Home Assistant platform. Unlike Homebridge, which primarily emulates HomeKit, Home Assistant is a full-fledged automation system. Xiaomi Miio integration is built in by default or installed via HACS (Home Assistant Community Store).

The main advantage of Home Assistant is that it can create complex scenarios, such as setting up an automatic vacuum cleaner start when all the smartphones in the family leave the geofence at home, or sending a notification to an iPhone if the dust container is full. Home Assistant + HomeKit allows you to stream all these features to the Home app on Apple devices.

💡

Tip: Use HomeKit Bridge integration in Home Assistant to vacuum the Apple Home.This gives you less command latency compared to cloud plugins.

Setup integration in Home Assistant is done via a GUI, which makes the process more understandable for beginners than manually editing configs. IP-The system will determine the model of the vacuum cleaner and offer available management services, such as: vacuum.clean_spot, vacuum.locate vacuum.return_to_base.

Alternative solutions and bridge applications

If you find server deployment too complicated, there are simpler, less functional solutions. Some apps in the App Store, such as HomeBridge for HomeKit (paid versions) or Aqara Home (for a limited number of devices), try to solve the problem at the smartphone level. However, they often require the phone to be on and connected to Wi-Fi to execute commands, which is not automation.

Another option is to use smart outlets with HomeKit support. By connecting the base of the Xiaomi vacuum cleaner to such an outlet, you can completely turn off the device or reboot it on a schedule or with a voice command. This will not allow you to start cleaning, but will give control over power, which is useful for resetting the hanging devices.

⚠️ Warning: When using bridge apps on iPhone, remember that if the phone runs out or loses Wi-Fi connection, vacuum control via HomeKit will disappear (Homebridge/Home Assistants) are not in this disadvantage.

And there are community firmware, like Valetudo, that allows you to completely untie the vacuum cleaner from the Xiaomi cloud and manage it locally, which increases security and response speed, but the firmware process is complicated, requires you to open the device (in some models) and takes away warranties. For most users, using an external server is a safer tradeoff.

Setting up scripts and automation in the application Home

When you successfully add a vacuum cleaner to your home app, you can create scenarios that can do multiple things at once, like the I Leave scenario, which can turn off the lights, close the smart curtains, and run the robot vacuum cleaner to clean the apartment.

For advanced users, you can customize specific rooms. If your vacuum cleaner supports mapping and room division (via Homebridge or Home Assistant plugins), you can only run cleaning in the kitchen or living room with a voice through Siri.

💡

Using Siri Shortcuts allows you to create complex voice scripts, such as “Siri, General Cleanup Time,” which will start the vacuum cleaner, turn on the air purifier and open windows (if there are smart actuators).

Remember to set up notifications. In the standard Mi Home app, they may be delayed or not coming at all due to the aggressive energy savings of iOS. When integrated via HomeKit, notifications of completion of cleaning or errors (stuck, low charge) come instantly and reliably, as they use Apple push services.

Typical problems and ways to solve them

Users often face a number of typical problems during the setup process, one of the most common being the loss of connection to the vacuum cleaner after changing the password from the Wi-Fi or router, and since tokens are often tied to specific network settings, it may be necessary to re-receive the token and update the plugin configuration.

Another common problem is high ping or timeouts when executing commands, which may be because the Homebridge server or Home Assistant is far from the router, or the vacuum cleaner itself has a bad signal at the parking lot, the solution lies in improving Wi-Fi coverage or using Mesh systems.

⚠️ Attention: If after updating the vacuum cleaner firmware integration stopped working, do not rush to reset the device. Often, plugin developers release updates within a few days.

If you send commands too often (for example, if you created a script that polls the status of the vacuum cleaner every second), your IP-The address may be temporarily blocked for suspicious activity. 10-30 seconds.

The Secret to Stable Work
Secure the static IP-The address for your vacuum cleaner in the router settings will prevent the vacuum cleaner from getting a new one after restarting the router. IP, The server will lose contact with him.

Frequently Asked Questions (FAQ)

Do I need the Internet to work with a vacuum cleaner through HomeKit?
Yes, in most cases, Internet is needed. Although management is transferred locally through Homebridge or Home Assistant, these systems themselves often use Xiaomi’s cloud APIs to send commands, unless using a local network token method (which does not work on all models), fully local work is possible only with alternative firmware or if the plugin supports local MiIO protocol.
Is it safe to transfer the token to third-party programs?
Open source codes like Home Assistant and Homebridge are considered relatively secure, as the code is verified by the community. However, there is always a risk. The token gives access to device management, but not to your personal files or cameras (unless they are part of the same device).
Can I control the vacuum cleaner through Siri without a server?
No, it's not. Without the use of middleware (Homebridge, Home Assistant, Serverless), you can't add a device to the Home app. There are launcher apps with widgets, but they don't integrate fully with Siri and Apple Home scripts.
Is a cleaning card supported in HomeKit?
In the standard Home app, the cleaning map doesn't show up; you only see statuses (working, charging, error) and charge levels. You still have to open the native Mi Home app or Home Assistant interface to view the map and provide detailed statistics.