Integrating the Xiaomi ecosystem with Yandexβs voice assistant is a challenge that requires understanding the architecture of the smart home. Directly connecting the Xiaomi Gateway to the Yandex app is impossible because of the Chinese manufacturerβs closed protocols. Youβll need an automation server to implement voice control scenarios.
The most common and stable solution is the Home Assistant platform, which is a bridge that translates commands from the Yandex Smart Home protocol into Zigbee signals that are understandable to the gateway. The setup process may seem difficult for a beginner, but the result is worth it.
You can control hundreds of sensors and light bulbs in one sentence, and in this article we will look at the step-by-step algorithm of actions, the necessary software, and the typical errors that users encounter during the first integration.
Equipment and software required
Before you start setting up, make sure you have a basic set of devices. The centerpiece will be the Xiaomi gateway itself, which supports the Zigbee protocol. Models like the Mi Smart Home Hub or older versions of Gateway 2 and Gateway 3 are suitable for this task, but their functionality in conjunction with Alice may differ.
The second critical component is a computer or a single-board computer (such as the Raspberry Pi) that will deploy Home Assistant on. Without a local automation server, Xiaomiβs closed ecosystem will not be able to make friends with the Yandex cloud, and a stable Wi-Fi connection will be required for all participants.
- π± Smartphone with installed applications Mi Home and Yandex.
- π Local server with Linux or specialized firmware (HAOS).
- π Xiaomi Gateway, put into developer mode (if required for your model).
- π‘ Zigbee devices (sensors, relays, lamps) already tied to the gateway.
Itβs important to understand that the gateway firmware version plays a key role: Some newer Hub models run exclusively over the cloud and require a special integration approach, while older Gateways are often managed locally through the Xiaomi Gateway 3 plugin.
β οΈ Warning: Make sure your Mi Home account is set up in the βChinaβ region. Many advanced features and integrations are only available when choosing a Chinese server, as the European versions of firmware have a stripped-down version of the service. API.
Installation and configuration of Home Assistant
The Home Assistant platform is the heart of your future system, and if you haven't installed it yet, it's recommended that you use the Home Assistant Operating System (HAOS) method for maximum stability.
The next step is to install the add-on manager. In modern versions of HA, it's built-in by default. You need to go to the system settings and activate the ability to download third-party repositories if you plan to use informal but powerful integrations.
Configuration -> Settings -> Add-ons -> Add repositoryTo work with the gateways Xiaomi most often use the integration of Xiaomi Gateway 3 from the author AlexxIT. This is a third-party solution that opens full access to the device, allowing you to throw into Alice not only the gateway itself, but all the sensors connected to it.
βοΈ Preparation of Home Assistant
Once the integration is installed through the HACS (Home Assistant Community Store), the system will need to restart, a standard procedure required to apply changes to the kernel configuration.
Integration of Xiaomi Gateway in Home Assistant
The process of adding a gateway depends on the model. For popular Gateway 3 models, integration is automatically done by searching for devices on the LAN. IP-lock-place MAC-address.
If you use cloud protocols, you will need to log in and password from your Mi Home account. When you enter data, the system will try to get an access token. If you use two-factor authorization, you may need to enter a code from an SMS.
| A model of a lock | Protocol of communication | Type of integration | Stability |
|---|---|---|---|
| Gateway 2 | Zigbee / Wi-Fi | Local (LAN) | Tall. |
| Gateway 3 | Zigbee 3.0 / BLE | Local / Cloud | Very high. |
| Mi Smart Hub | Zigbee 3.0 | Cloud (MiOT) | Medium |
| Aqara Hub | Zigbee | Cloud / Local | Tall. |
Once you successfully add the device to the Home Assistant interface, you'll see a list of all the child devices connected to the gateway: motion sensors, temperatures, switches, all of them should be displayed as separate entities.
What to do if the gateway is not located?
It is recommended to immediately rename the entity in clear names in Russian, as they will be broadcast in the smart home of Yandex.
Set up integration with Yandex Smart Home
When all devices are displayed in Home Assistant, it's time to bundle with Alice, using the official Yandex Smart Home integration. Go to the integration settings and find the relevant component.
The system will suggest logging in to your Yandex account. Once you have successfully logged in, you need to choose which Home Assistant devices you want to export to the Yandex cloud.
- π Choose a room for each device (Kitchen, Bedroom, Living room).
- π‘ Specify the type of device (Light, Rosetta, Sensor).
- π Disable unnecessary entities that do not require voice control.
- π Click the button βUpdate the list of devicesβ in the Yandex application.
The synchronization process can take from 30 seconds to several minutes, after which new devices should appear in the Yandex or Yandex Smart Home app, marked that they are controlled through Home Assistant.
β οΈ Warning: When changing the configuration in Home Assistant (addition of new sensors or renaming), be sure to start manual synchronization in the Yandex application, otherwise Alice will not see the changes.
Device management and scripting
Now that Xiaomi's gateway has been added to Alice, you can control devices with voice. Phrases can be standard, like, "Alice, turn on the light in the hallway," or "Alice, what's the temperature in the bedroom," the system recognizes the types of devices and suggests appropriate commands.
But the real power of the bundle is revealed in scenarios, and you can create complex logic in the Home Assistant that will be triggered by voice command, for example, the command "Alice, I'm leaving" can turn off all the lights, close the smart curtains and turn on security mode on Xiaomi sensors.
alias: "The exit scenario"
trigger:
- platform: state
entity_id: switch.yandex_scene_care
to:"on"
action:
- service: light.turn_off
target: {entity_id: all}
- service: cover.close_cover
target: {entity_id: all}To implement such scenarios, Home Assistant creates automation, and Yandex creates virtual switches or scenes that change the state of these automations, which bypasses the limitations of Aliceβs standard functionality.
π‘
Use device groups in Home Assistant. Create a group called All Lights and put it in Yandex, so you can manage multiple light sources at once, even if they are from different manufacturers.
Remember that the delay in execution of the command depends on the response speed of the cloud and your Internet connection. Local commands inside Home Assistant are executed instantly, but the voice request always passes over the Internet.
Problem solving and communication debugging
During operation, there may be situations when devices become unavailable or no longer respond to Alice's commands. IP-Xiaomi gateway addresses after router reboot.
To avoid this, set up static address rentals (DHCP Reservation, on the router. MAC-lock-address IP. This will ensure the stability of the communication between the automation server and the hub.
If devices are missing from the list in Yandex, check the integration logs in Home Assistant. Authorization errors often occur when you change your password from your Mi Cloud account or the access token expires.
- π Check availability of Home Assistant server from an external network (if cloud integration is used).
- π Reboot the Xiaomi gateway, disconnecting it from power for 10 seconds.
- π In the Yandex application, remove the device and find it again.
- π Check the error logs in the home-assistant.log file.
π‘
The stability of the entire system depends on the quality of the local network. Use a wired connection for the Home Assistant server and the Xiaomi gateway, if possible.
It is also worth considering that some specific properties of Xiaomi devices (for example, the brightness of a colored lamp or the exact values of humidity) may not be thrown into Yandex completely due to the limitations of the data model of the smart home of Yandex.