How to Manage Xiaomi Smart Home with Alice: From Connection to Voice Commands

Voice assistant Alice from Yandex has become an integral part of the management of smart devices, and the Xiaomi Smart Home ecosystem is one of the most popular platforms for home automation. The combination of these two technologies allows you to control lights, sockets, sensors and even a robot vacuum cleaner with simple voice commands. However, many users face difficulties in setting up the interaction between Aqara, Mi Home and Alice โ€” especially when it comes to informal integration methods or specific scenarios.

In this article, you will find step-by-step instructions for connecting Xiaomi devices to Alice, both through official bridges (such as Yandex IoT) and through alternative solutions like Home Assistant or Node-RED. We will analyze unique commands for managing group devices, look at typical errors (such as โ€œdevice not respondingโ€) and give recommendations for optimizing the system. Particular attention is paid to security โ€“ how to protect a smart home from unauthorized access through a voice assistant.

Why Alice and Xiaomi are the perfect combination for a smart home

Xiaomiโ€™s ecosystem offers more than 400 compatible devices, from Yeelight light bulbs to Aqara security systems, and Alice is a universal interface that:

  • ๐ŸŽค It recognizes natural speech in Russian (unlike Google Assistant, which often requires precise wording).
  • ๐Ÿ”Œ Supports local management (some commands run without the cloud, which speeds up the response).
  • ๐Ÿ“ฑ Integrates with Yandex mobile application, where you can create automation scenarios.
  • ๐Ÿ›ก๏ธ Has built-in protection mechanisms (e.g. voice confirmation for critical actions).

The key advantage is the flexibility of the setup, for example, you can create an Alice Mode command that simultaneously:

  • It will turn off the main light (Xiaomi Smart Bulb).
  • It will also be lighted on the TV (Yeelight Lightstrip).
  • Activates the "Do Not Disturb" script on your smartphone.

However, there are limitations. Officially, Alice does not support all Xiaomi devices, for example, some Aqara sensors (like the Cube). T1 Pro) require workarounds. This is discussed in the next section.

๐Ÿ“Š What kind of smart home ecosystem do you use?
Only Xiaomi.
Xiaomi + Other Brands
Another brand (not Xiaomi)
I'm just planning.

How to connect Xiaomi devices to Alice: official and alternative

There are three main methods of integrating Xiaomi devices with Alice.The choice depends on the model of the gadget, your technical skills and the stability requirements of the system.

1. Official integration through Yandex IoT

The easiest way to connect devices is through the Yandex IoT platform, which works for most Xiaomi certified gadgets, such as:

  • ๐Ÿ’ก Xiaomi Mi Smart LED Bulb (all models).
  • ๐Ÿ”Œ Xiaomi Mi Smart Plug (Wi-Fi-enabled outlets).
  • ๐ŸŒก๏ธ Aqara Temperature and Humidity Sensor (New Versions Only).
  • ๐Ÿค– Xiaomi Mi Robot Vacuum (Vacilities with Mi Home Support).

Instructions for connection:

  1. Open the Mi Home app and make sure the device is added to your account.
  2. Go to Profile. โ†’ Settings โ†’ Yandex IoT.
  3. Log in through Yandex account and allow access.
  4. In the application Yandex (section "Smart home") will appear your device.

Update the firmware of Xiaomi device to the latest version|

Make sure the device is connected to the same Wi-Fi as the Alice speaker|

Turn it off. VPN or proxy in the phone settings|

Check that the device is tied to the region "Russia" (Mainland China is not supported)-->

Limitations of the method:

  • Not all Aqara devices are supported (e.g., Aqara Door & Window Sensor may not be displayed).
  • Delay in execution of commands until 1-2 Seconds (due to cloud processing).
  • It is not possible to create complex scenarios with conditions (e.g., if the temperature is above 25).ยฐC, turn on the air conditioner").

2. via Home Assistant (for advanced users)

If your device isnโ€™t officially supported or you want more flexibility, use Home Assistant, an open platform for smart homes.

  • ๐Ÿ”— Connect any Xiaomi device (including those running on Zigbee via Aqara Hub).
  • โšก Create local scenarios (without depending on the cloud).
  • ๐Ÿ”„ Integrate Alice through a component yandex_smart_home.

Cons:

  • You need a server that is running continuously (you can deploy it to a Raspberry Pi).
  • The setup takes 1-2 The hour (basic knowledge required) YAML).

Example configuration for connecting the Yeelight light bulb:

light:


- platform: yeelight




devices:




192.168.1.100: # IP- address of the light bulb




name: "Living room"




transition: 1000

3. via Node-RED (Visual Automation)

Node-RED is a tool for building automation with flowcharts, and it's useful if you want to:

  • ๐Ÿ”„ Combine Xiaomi devices with other brands (e.g. Philips Hue).
  • ๐Ÿ“Š Processing sensor data before sending Alice.
  • ๐Ÿ”Š Use custom voice commands (e.g., โ€œAlice, show us a weekly temperature chart").

Integration will require:

  1. Install Node-RED on the server (or local PC).
  2. Add node-red-contrib-mi-home and node-red-node-yandex-smart-home packages.
  3. Create a flow that will transmit commands between systems.

๐Ÿ’ก

If you have a Xiaomi Gateway, it can be used as a Zigbee bridge to connect Aqara sensors to Alice via Home Assistant. xiaomi_aqara and point out gateway_key (You can find it in the Mi Home application through the browser code inspector).

Step-by-step setting up voice control

Once the devices are connected, you need to configure voice commands, and Alice supports three types of control:

  1. Direct commands (e.g., "Alice, turn on the light in the hallway").
  2. Scenarios (a set of single-team actions, such as "Alice, I'm leaving").
  3. Smart answers (Alice reports status devices, such as "Alice, what's the temperature outside?")

Let us consider each option in detail.

1. Direct commands: syntax and examples

Alice understands commands in the format:

[Action] [Device] [Location/Name]

Type of deviceExample of teamSupported action
Light bulbs (Yeelight, Mi) LED Bulb)"Alice, turn off the lights in the bedroom."Turn it on/off, brighten it/dark it, set the color [red], set the temperature. [2700K]
The sockets (Mi Smart Plug)"Alice, turn on the kettle socket."turn on/off
The Robot Vacuum (Mi Robot Vacuum)"Alice, start cleaning the living room."Start/stop cleaning, get back to base, find a vacuum cleaner
Sensors (Aqara)"Alice, what's the moisture in the nursery?"Tell the temperature/humidity, is the window open?

Important: the names of the devices in the Yandex application should match those you use in the commands. For example, if the Mi Home socket is called "Kettle in the kitchen", then the command "Alice, turn on the kettle" will not work - you need to say "Alice, turn on the kettle in the kitchen".

2. Creation of scenarios in the Yandex application

Scenarios allow you to combine several actions into a single team, such as a Good Night scenario that might:

  • Turn off all lights.
  • Activate the Aqara Hub (Security Mode)
  • Turn on the white noise on the column.

How to create a script:

  1. Open the Yandex app. โ†’ section โ€œSmart home".
  2. Press "Scripts" โ†’ "Create a script".
  3. Select the trigger: Voice command or Schedule.
  4. Add actions (for example, turn off) โ†’ Bedroom lamp).
  5. Save and test the command (Alice, launch Good Night).
How to add Xiaomi devices to the script if they donโ€™t show up?
If the device is connected via Home Assistant but does not appear in the script action list, check it out: 1. The configuration.yaml Home Assistant file must have a section yandex_smart_home parameterized expose_by_default: true. 2. Reboot Home Assistant and update the list of devices in the Yandex application (may take up to a few minutes). 5 minute). 3. Make sure that the device settings in Home Assistant are entity_id without special symbols (e.g. light.gostinaya, not light.gostinaya) light.gostinaya_1!).

3.Smart Answers: How Alice Reports Device Status

Alice can inform you of the state of the smart home on her own.

  • Enable the option "Smart answers" in the device settings in the Yandex application.
  • Ask the question in the format: "Alice, [what happens to] [the device]?"

Examples:

  • "Alice, is the kitchen window open?" (for the Aqara Door Sensor)
  • โ€œAlice, how much power did the outlet use today?โ€ (for Mi Smart Plug, power-adjusted)
  • "Alice, when was the last time the lights were turned on in the bathroom?"

Limitation: Smart answers only work for devices connected via Yandex IoT. If you use Home Assistant, you will need additional customization via the Yandex IoT. yandex_smart_home parameterized report_state: true.

๐Ÿ’ก

For sensor devices (such as the Aqara Motion Sensor), Alice can send notifications to the phone when triggered, and in the script, select Send Notification and specify text (such as โ€œMove in the hallway!โ€).

Common Problems and Their Solutions

Even with the right setup, users are faced with errors.-5 problems and ways of solving them:

1. "Alice doesn't see Xiaomi's device."

Causes and solutions:

  • ๐Ÿ”„ Device not synced with Yandex IoT: go to Mi Home โ†’ Profile โ†’ Yandex IoT and Update Connectivity.
  • ๐ŸŒ Region of the device - China: in Mi Home, change the region to "Russia" (you will have to remove and add the device again).
  • ๐Ÿ”Œ Offline Device: Check the Connection to Wi-Fi/Zigbee, Reboot the gateway (Xiaomi Gateway).

โ€œCommands are delayedโ€

A delay of more than 2 seconds is usually associated with:

  • ๐ŸŒฅ๏ธ Cloud processing: if the device is connected via Yandex IoT, the command goes through the servers of Yandex and Xiaomi.
  • ๐Ÿ“ถ Weak Wi-Fi: Check the Internet speed (minimum requirements are 5 Mbps). For Zigbee devices (Aqara), make sure the gateway is no further than 10 meters from the sensors.

3. "Alice says 'The device is not responding'"

An error occurs when:

  • The device is physically disabled (for example, a light bulb is twisted from the cartridge).
  • Xiaomi or Yandex IoT servers are not available (check status at status.mi.com and Google). yandex.ru/dev/status).
  • Mi Home has changed the password, but not updated in Yandex IoT (you need to log in again).

๐Ÿ’ก

If the problem only occurs with one device, try resetting it to factory settings (usually hold the button on the device). 5-10 seconds) and add again to Mi Home.

4. "The conditions are not working"

Alice in the Yandex application does not support difficult conditions (for example, if the temperature is not the same). > 25ยฐC, turn on the air conditioning. Solutions:

  • Use Home Assistant to create trigger automations.
  • In Mi Home, set up local scripts (Automation section) and use Alice for voice-activation only.

5. "Alice is controlling other people's devices."

If the voice assistant responds to commands addressed to other users in the home, check:

  • ๐Ÿ”’ Voice Profile: In Aliceโ€™s settings, enable the โ€œVoice Recognitionโ€ option and train the system to your voice.
  • ๐Ÿ  Sharing: in the Yandex application (Smart home) โ†’ Settings โ†’ Access) check who has the management rights.

๐Ÿ’ก

If you use Home Assistant, limit access to Alice through the yandex_smart_home, Add the filter option: with a list of allowed devices, which will prevent accidental control of other people's gadgets.

Security: How to protect a smart home from hacking through Alice

Voice assistants are convenient, but they create additional risks.

  • ๐Ÿ”Š Listen to commands through the column (if it is always on).
  • ๐Ÿšช Manage locks or voice alarms (unless authorization is configured).
  • ๐Ÿ“ก Intercept tokens access to Mi Home or Yandex accounts.

How to minimize the risks:

1. Adjusting voice recognition

Enable this option in the Yandex app:

  1. Go to Settings. โ†’ Alice. โ†’ Voice and speech.
  2. Select "Voice Recognition" and get training.
  3. Activate the โ€œMy Voice Onlyโ€ option for critical devices (such as smart locks).

Two-factor authorization (2FA)

Protect your accounts:

  • At Mi Home: Profile โ†’ Security settings โ†’ Two-step verification.
  • In Yandex: Account โ†’ Security โ†’ Two-factor authentication.

3. Restriction of access for guests

If you have smart devices that other family members use:

  • Create separate guest scenarios (e.g., Guest Lights for hallway lamps only).
  • In Home Assistant, set up person entities and restrict access through group.

Local area network and VPN

If you are using Home Assistant:

  • ๐Ÿ”’ Set up a reverse proxy (such as Nginx) with SSL-certificate.
  • ๐ŸŒ Restrict access to port 8123 (default for Home Assistant) only for your home. IP firewall.

๐Ÿ’ก

For additional protection, change the standard Home Assistant port (e.g., 18123) and disable access from the internet if you are not using remote control.

Advanced Features: Automation with Alice and Xiaomi

If you've mastered the basics, you can move on to advanced scenarios. Here are some ideas:

1. Geolocation scenarios

Alice can react to your location, like:

  • "Alice, I'm gone" โ†’ Turns off the lights, activates the guards.
  • "Alice, I'm back" โ†’ Turns on the right lamps, starts the kettle.

Setting:

  1. In the Yandex application, enable access to geodata.
  2. Create a script with the Arrival/Departure trigger and specify the radius (e.g. 500m from home).

2. Integration with other services

Through Home Assistant or Node-RED, you can connect Alice to:

  • ๐Ÿ“… Google Calendar (e.g., Alice, what appointments are today?").
  • ๐ŸŽต Spotify (Alice, turn on the playlist for training").
  • ๐Ÿ“บ Television (via BroadLink) RM4 Xiaomi IR Remote).

Schedule voice control

You can create teams that only work at certain times.

  • "Alice, wake me up" โ†’ It includes light and music, but only from 6:00 to 9:00.
  • "Alice, go to bed" โ†’ Turns off all devices, but only after 22:00.

In the Home Assistant, use the Automation Time Condition:

automation:


trigger:




platform: conversation




command: "Wake me up"




condition:




condition: time




after: "06:00:00"




before: "09:00:00"




action:




- service: light.turn_on




entity_id: light.bedroom

4.Management of device groups

Alice supports a grouping of devices, for example, you can create a group called "All kitchen" and control all the lamps and sockets with one command:

  • "Alice, turn off the kitchen."

How to form a group:

  1. In the Yandex application go to the Smart Home โ†’ Devices.
  2. Click "Add group" and select devices.
  3. Please specify a name (such as "Kitchen") and save it.
How to manage Xiaomi devices through Alice without the Internet?
It's only possible if: 1. Device connected to Home Assistant locally (no cloud). 2. Alice works through Yandex Station or Yandex.Station with the latest firmware (supports local commands for some devices). 3. In the settings yandex_smart_home Home Assistant has a setting included local_execution: The voice command is still sent to the Yandex cloud for recognition, but execution is local.

FAQ: Frequent questions about managing Xiaomi through Alice

Can you connect to Alice Xiaomi devices purchased in China (mainland China region)?
Officially, no. Mainland China's firmware devices do not support integration with Yandex IoT. Solutions: Change device region to "Russia" via Mi Home (remove and add it again). Use Home Assistant with custom integrations (e.g, xiaomi_miot protocol-wise MIOT). โš ๏ธ Note: after region change, some devices (e.g. Aqara Camera Hub) G2H) China may lose support for servers, which will lead to the inoperability of cloud functions.
How do you make Alice turn on 50% of the default brightness?
In the Yandex application there is no direct brightness setting by default, but there are workarounds: Create a script "Light" 50%" with the action "Set brightness" 50%" Then you say, "Alice, set the lights on." 50%". In Home Assistant, set up default_brightness For the device: light: - platform: yeelight devices: 192.168.1.100: name: "Lampa" default_brightness: 128 # 50% from 255
Why doesnโ€™t Alice understand the name of my devices in Russian?
The problem arises if: The device name has special characters (e.g., "Lamp #1"). Use only letters and spaces. The name is too long (over 20 characters" โ†’ "Kitchen lights. The device is connected via Home Assistant, but configuration.yaml does not include the Russian name: light: - platform: mqtt name: "Bedroom" # Must be in Russian schema: template
Can you control Xiaomi air conditioner through Alice?
Yes, but with reservations: Only some models are officially supported (e.g. Xiaomi Mi Air Conditioner). IR Remote) will need: Configure management through Home Assistant with the climate component. Create a virtual device in Yandex.Smart Home through yandex_smart_home.