How to set up Alice to control Xiaomi robot vacuum cleaner: from communication to voice commands

Voice control of a robot vacuum cleaner via Alice from Yandex is not only convenient, but also the ability to automate cleaning to the smallest detail. However, the Xiaomi bundle (with its closed Mi Home ecosystem) and Yandex.Stations requires additional settings that are not always obvious. Unlike native integration with Google Assistant or Apple HomeKit, you will have to use workarounds here, from official connection via Yandex IoT to third-party services like Home Assistant or Node-RED.

Many users face problems when logging in, syncing devices, or setting up voice commands, such as a robot vacuum cleaner may not appear on Alice’s device list even after successfully connecting to Mi Home, or voice commands may be delayed. In this article, we will analyze all methods of integration - from the simplest (through the official application) to advanced (using the use of the application). MQTT and custom scripts, and also consider typical errors and their solutions.

If you're new to the smart home world, start with the basic method through Yandex IoT. The Home Assistant section will be useful to power users, allowing you to flexibly customize scenarios, such as running a schedule with traffic or humidity sensors in mind. And for those who like experimentation, we've prepared a guide to build your own bridge between Mi Home and Alice via Python scripts.

1.Preparation: What will be needed for integration

Before you start setting up, make sure you have everything you need. Without some components, you can't link Alice and Xiaomi's robot vacuum cleaner.

Mandatory conditions:

  • πŸ“± Smartphone with installed applications Mi Home (version not lower than 6.0) and Yandex (with support for Alice).
  • πŸ€– Xiaomi robot vacuum cleaner from supported models (see table below) The device must be connected to Mi Home and be on the same Wi-Fi network as the smartphone.
  • 🎀 Smart speaker or smartphone with Alice (for example, Yandex Station, Yandex Module or Yandex application with voice assistant).
  • 🌐 Stable Internet connection (robot and speaker must be on the same network or have access to the Mi Home cloud).

Additional tools (for advanced methods):

  • πŸ’» Computer with Home Assistant, Node-RED or Python 3.8 installed+ (custom-solution).
  • πŸ”Œ MQTT-broker (e.g. Mosquitto) to exchange data between devices.
  • πŸ”‘ Access tokens API Mi Home (you can get them through special scripts or services like Mi Token Extractor).

⚠️ Note: If your Xiaomi robot vacuum cleaner is released before 2019 (e.g. Mi Robot Vacuum 1), it may not support cloud computing. API. In this case, local management will be required through MQTT or custom software firmware (for example, Valetudo).

Model robot vacuum cleanerSupport for Yandex IoTSupport for Home Assistant SupportA token is required
Xiaomi Mi Robot Vacuum-Mop 2 Liteβœ… Yes.βœ… Yes.❌ No.
Xiaomi Mi Robot Vacuum-Mop Pβœ… Yes.βœ… Yes.βœ… Yes.
Xiaomi Mi Robot Vacuum-Mop 2 Proβœ… Yes.βœ… Yes.βœ… Yes.
Xiaomi Mi Robot Vacuum-Mop S5/S6❌ No, only through HA)βœ… Yes.βœ… Yes.

If your model is not in the table, check its compatibility on the official Yandex IoT website or in the Home Assistant documentation.

πŸ“Š What kind of robot vacuum cleaner Xiaomi you have?
Mi Robot Vacuum-Mop 2 Lite
Mi Robot Vacuum-Mop P
Mi Robot Vacuum-Mop 2 Pro
Another model
I haven't bought it yet.

2. Method 1: Official integration via Yandex IoT

The easiest method is to connect a robot vacuum cleaner to Yandex IoT via the Mi Home app, which works for most modern Xiaomi models (see table above) and does not require technical skills.

Step-by-step:

  1. Open the Mi Home app and make sure that the robot vacuum cleaner is added to your account and connected to Wi-Fi.
  2. Go to Profile. β†’ Settings β†’ Yandex (or Smart Home) β†’ Yandex in new versions).
  3. Click Connect and log in to Yandex account.
  4. Select a robot vacuum cleaner from the list of devices and confirm synchronization.
  5. Open the Yandex app (or tell Alice, "Find my devices"). The robot should appear on the list.

Possible problems and solutions:

  • πŸ”΄ The robot does not appear in Yandex IoT β†’ Check that the model is supported (see table). If yes, reconnect the device to Mi Home and repeat sync.
  • πŸ”΄ Authorization error β†’ Make sure that Mi Home and Yandex use the same region (e.g. Russia or Mainland China).
  • πŸ”΄ Alice's commands not being followed β†’ Reboot the robot and the column, then say, β€œUpdate the list of devicesΒ».

⚠️ Note: Once connected via Yandex IoT, some robot features (such as zoning or suction power tuning) may not be available in Alice.

Check out the Mi Home app version (update to the latest one)|Make sure that the robot and smartphone are on the same Wi-Fi network|Reboot the robot vacuum cleaner (hold the power button for 10 seconds)|Untie and re-add the robot to Mi Home|Try changing the region in Mi Home to Russia"-->

What voice commands are supported?

After successful connection, Alice will be able to execute basic commands:

  • β€œAlice, start cleaning” – start the standard cleaning.
  • "Alice, get back to base" is a return to the dock.
  • "Alice, stop cleaning" - pause.
  • β€œAlice, how is the status of the vacuum cleaner?” – information about the charge and condition.

Critical limitation: You can't configure zone cleaning or change voice suction mode with Yandex IoT, and you'll need Home Assistant or custom scripts.

πŸ’‘

Formal integration via Yandex IoT is the easiest way, but with limited functionality. Use Home Assistant for advanced management.

3. Method 2: Advanced setup via Home Assistant

If you need advanced scenarios (such as scheduling based on your location or sensor data), use Home Assistant (HA). This method takes longer to set up, but gives the robot full control.

Step 1: Installation of Home Assistant

You can install it. HA on:

  • πŸ–₯️ Separate computer (recommended Raspberry Pi 4 or mini PC).
  • πŸ’Ύ Docker container on any server.
  • ☁️ Cloud service (such as Home Assistant Cloud) but it is a paid option).

Step 2: Connecting a Robot Vacuum Cleaner

  1. In the control panel. HA Go to Settings. β†’ Devices and services β†’ Add integration.
  2. Find Xiaomi Miio and enter your Mi Home account details (login and password) or device token.
  3. Select a robot vacuum cleaner from the list of detected devices.

Step 3: Set up voice control through Alice

So Alice could control the robot through HA, perform the following actions:

  1. V HA Go to Settings. β†’ Voice assistants β†’ Yandex Alice.
  2. Log in to Yandex account and allow access.
  3. Create scripts for commonly used commands (like β€œliving room cleaner”) and export them to Alice.

Example of a script for HA (zone-cleaning):

alias: "Living room cleaning"


sequence:




- service: vacuum.send_command




target:




entity_id: vacuum.xiaomi_vacuum




data:




command: app_zoned_clean




params: [[23000, 23000, 25000, 25000, 1]] # Zone coordinates




mode: single

The advantages of Home Assistant:

  • βœ… Full control over all robot functions (zoning, suction power, schedule).
  • βœ… Integration with other devices (e.g. starting a cleanup in the absence of a house from geolocation data).
  • βœ… Local management without depending on the cloud Mi Home.

⚠️ Note: Do not use questionable online services to get a Xiaomi device token. Use the official Mi Token Extractor tool or miio-cli script.

How to get a Mi Home token without risk to your account
1. Install Python 3.8+ The Miio Library: Pip Install Python-Miio 2. Connect to the robot via Wi-Fi (network data is indicated on the device sticker). 3. Launch a script to extract the token: mirobo --debug --ip <IP_robot> discover 4. The token will be displayed in the console output.

Method 3: Custom solutions (MQTT + Node-RED)

If you want maximum flexibility (e.g., linking a robot vacuum cleaner to light or humidity sensors), use the MQTT-Broker and Node-RED to create complex scenarios.

Step 1: Setup MQTT-broker

Install Mosquitto (for example, on the Raspberry Pi):

sudo apt update


sudo apt install -y mosquitto mosquitto-clients

Step 2: Connecting the robot to MQTT

Use the Xiaomi Miio plugin for Home Assistant or script miio2mqtt:

npm install -g miio2mqtt


miio2mqtt --token YOUR_TOKEN --ip ROBOT_IP --mqtt mqtt://localhost

Step 3: Creating scripts in Node-RED

Example of flow to start cleaning at low humidity:

  1. Add the knot. MQTT In (subscription to the humidity sensor top).
  2. Add a Function node with the condition: if (msg.payload) < 40) { msg.topic = "xiaomi/vacuum/command"; msg.payload = "app_start"; return msg; }
  3. Add the knot. MQTT Out to send commands to a robot.

Example of integration with Alice:

You can create Node-RED through HTTP-Endpoint, which will take commands from Alice and transfer them to the MQTT-So, this is a message for a robot:

  1. Install node-red-contrib-yandex-smart-home.
  2. Set up webhooks for Alice in Yandex Smart Home.
  3. Create a stream that converts voice commands into MQTT-team.

The advantages of custom solutions:

  • βœ… Full freedom to create scripts (e.g., scheduling) + notifications in Telegram).
  • βœ… Local work without depending on the clouds Mi Home or Yandex.
  • βœ… Integration with other systems (e.g. Google Home or Apple HomeKit).

πŸ’‘

If the robot vacuum cleaner does not respond to MQTT-Teams, check that the device token is not expired.Mi Home tokens can be reset after the firmware update.

5. Typical errors and their solutions

Even if you set it up properly, you can have problems, and here are the most common mistakes and ways to fix them:

Problem.Possible causeDecision
Alice says, "The device is not responding."The robot is disconnected from Wi-Fi or Mi Home servers are not available.Check the robot's network connection. Reboot the router.
Commands are executed with a delayMi Home servers are overloaded or cloud-based.Go to local management through MQTT or Home Assistant.
The robot does not appear in Yandex IoTThe model is not supported or the region in the Mi Home is incorrect.Change your region to Russia or use Home Assistant.
Alice doesn't understand the teamIncorrectly configured scripts or scripts in HA.Check the entity names (entity_id) Home Assistant.

Additional advice:

  • πŸ”„ If the robot β€œhangs” after the command from Alice, restart it (hold the power button for 10 seconds).
  • πŸ“‘ For stable operation, use Wi-Fi at 2.4 GHz (Xiaomi robots do not support 5 GHz).
  • πŸ”’ If you use Home Assistant, set up a configuration backup (e.g., via Google Drive Backup).

πŸ’‘

Most of the problems are due to an unstable Internet or incorrect settings in the region in Mi Home. Always start your diagnosis with a network check!

Extended scenarios: examples of automation

Alice's bundle. + Xiaomi lets you create smart scripts that save time and energy. Here are some ideas:

1. Geolocation cleaning

In the Home Assistant, set up an automatic cleaning operation when all family members leave the house:

automation:


- alias: "Pleaning when no one's home"




trigger:




- platform: state




entity_id: group.all_devices




to: "not_home"




action:




- service: vacuum.start




target:




entity_id: vacuum.xiaomi_vacuum

2. Scheduled cleaning with weather in mind

Use the humidity sensor data to keep the robot from running during rain (if the windows are open):

automation:


- alias: "Cleaning when it doesn't rain"




trigger:




- platform: time




at: "10:00:00"




condition:




- condition: state




entity_id: sensor.weather_precipitation




state: "0"




action:




- service: vacuum.start

Voice control with confirmation

Set Alice up to ask for confirmation before starting the cleaning (helpful if there are pets in the house):

Create a script in HA:

script:


confirm_cleaning:




sequence:




- service: notify.yandex_speaker




data:




message: "Run the cleanup?"




- wait_for_trigger:




- platform: conversation




command: yes




timeout: 00:00:10




- service: vacuum.start

4.Integration with other devices

Example: Starting a vacuum cleaner and turning on the air humidifier after cleaning:

automation:


- alias: "Humidification after cleaning"




trigger:




- platform: state




entity_id: vacuum.xiaomi_vacuum




to: "docked"




action:




- service: humidifier.turn_on




target:




entity_id: humidifier.xiaomi_humidifier

5. Notifications of cleaning status

Set up alerts in Telegram or via Alice:

automation:


- alias: "Notice of completion of cleaning"




trigger:




- platform: state




entity_id: vacuum.xiaomi_vacuum




to: "docked"




action:




- service: notify.telegram_bot




data:




message: "Cleaning complete! Opening time: {{ states.vacuum.xiaomi_vacuum.attributes.cleaning_time }} minutes."

πŸ’‘

Use the Developer Tools tool to debug scripts β†’ States in Home Assistant, where you can track the status of the robot and other devices in real time.

7. Alternative methods: if nothing works

If the formal and advanced methods don’t work (e.g., you have an old model robot), try alternative solutions.

1.Valetudo firmware

Valetudo is an open firmware for Xiaomi robot vacuum cleaners that allows you to control the device without the Mi Home cloud.

  1. Download the firmware from the official website.
  2. Connect to the robot on SSH (Instructions are available in Valetudo documentation).
  3. Sweep through the device and set up local management through the web interface.

2.Use of IFTTT

Service IFTTT Allows you to link Mi Home and Yandex Alice via applets:

  1. Create an account on IFTTT.
  2. Connect to Mi Home and Yandex Alice.
  3. Create an applet with a trigger (such as a voice command) and action (starting a cleanup).

3. Local management through Python scripts

If you are familiar with programming, you can write a script to control a robot using Python:

from python-miio import Vacuum



vacuum = Vacuum(ip="192.168.1.100", token="YOUR_TOKEN")




vacuum.start() # Start cleaning




vacuum.pause() #pause




vacuum.home() #Back to the base

To integrate with Alice, deploy the script on the local server and set up webhooks.

4. Cloud services (e.g. ioBroker)

ioBroker is an alternative to Home Assistant with support for Xiaomi and Alice Yandex. Install the miio and yandex-smart-home adapters, then set up the connection between the two.

⚠️ Note: Valetudo firmware voids robot vacuum warranty, only use it if you're risk-averse.

8. FAQ: Answers to Frequent Questions

Can you control a Xiaomi robot vacuum cleaner through Alice without a Home Assistant?
Yes, if your model is supported by Yandex IoT (see table in section 1). It is enough to connect Mi Home and Yandex accounts in the application.
Why doesn't Alice see my robot vacuum cleaner after plugging in?
Possible reasons: Model is not supported (check compatibility); Mi Home region is incorrect (must be Russia or Mainland China); account sync problems (try unplug and reconnect Yandex IoT).
How to set up cleaning zones through Alice?
Through the official integration of Yandex IoT, this is not possible.Use Home Assistant: Create a script with a team app_zoned_clean (see section 3). Export the script to Alice as a custom team. Team example: Alice, clean up the living roomΒ».
Can you drive a vacuum cleaner without the Internet?
Yes, but for this you need: Use local management through MQTT Or Home Assistant. Set the robot up to work on a local network (for example, through Valetudo). Note: Alice requires the Internet to process voice commands, but the robot itself can execute commands locally.
How to reset the robot settings if it does not connect?
To reset to factory settings: Hold the power button on the robot for 10 seconds until the beep sounds. Connect again to Mi Home as a new device. If the reset doesn't work, check if the router blocks the robot from accessing Mi Home servers (open ports 80 and 443).