How to connect Xiaomi from China to Marus

Integrating Xiaomiโ€™s Chinese-made devices into the Yandex ecosystem is often a challenge for smart home owners. Many people buy smart home devices from China to save money or access unique models, but they face the inability to synchronize them directly with Aliceโ€™s voice assistant in the House with Alice app. The problem is that Mi Home (CN) servers and Yandex (RU) servers are located in different domain zones and do not โ€œseeโ€ each other by default.

However, there is a proven workaround that allows the two systems to be linked through the Home Assistant platform or specialized cloud gateways such as AlexxITโ€™s Xiaomi Gateway 3. The key here is to create an intermediary link that will translate the state of devices from the Chinese cloud into a protocol that Yandex understands. Without the use of a third-party server or local hub, direct account binding is impossible due to manufacturersโ€™ security policies.

In this article, we will discuss the connectivity architecture, the tools needed, and the step-by-step algorithm of actions. Attention: the process requires basic networking skills and a willingness to experiment with software, and the result will be full control of gadgets through voice commands, despite their regional binding.

Why Chinese devices are not visible in Yandex

The main reason lies in the segmentation of the server infrastructure of Xiaomi. Devices released for the domestic market of China, when first activated in the Mi Home application, are tied to servers with a cn domain zone. At the same time, Yandex services for the integration of the smart home use the API of the global or European version, where the domain ru or sg (Singapore).

When you try to find Mi Home skills in the House with Alice app, the system checks authorization. If your Mi Account is registered in China and the link request comes from a Russian Yandex server, there is a denial of access. This is not a software bug, but a conscious restriction that prevents cross-regional data exchange without a special gateway.

โš ๏ธ Warning: Attempts to change the region in the Mi Home app from China to another country will result in the disappearance of all added devices from the list.

This requires middleware that can log in to the Chinese cloud and toss devices to Yandex at the same time, most often using a bundle of Home Assistant with Xiaomi MiOT integration or a ready-made Xiaomi Gateway 3 solution that emulates a local server.

๐Ÿ“Š What type of Xiaomi device are you having trouble with?
Lights and lights
Robot vacuum cleaners
Security cameras
Sensors and sensors
Smart sockets

Equipment and software required

Before you start setting up, make sure you have a basic set of tools. To bridge ecosystems, you need a device that works. 24/7. It could be an old laptop, a Raspberry Pi single-board computer, or even a laptop. NAS-server.

The main software component will be the Home Assistant automation system, an open source platform that can integrate devices from different manufacturers, and it will take on the role of a translator between the Xiaomi and Yandex protocols.

  • ๐Ÿ–ฅ๏ธ Computer or server for installing Home Assistant (minimum 2 GB of RAM).
  • ๐ŸŒ Stable Internet connection with open ports (or configured) VPN).
  • ๐Ÿ“ฑ Smartphone with installed applications Mi Home (China region) and Yandex.
  • ๐Ÿ”‘ Mi Account to which devices are linked.

You also need to install the Xiaomi Gateway 3 (AlexxIT developer) app inside the Home Assistant, which can work directly with devices over the LAN or through the cloud if direct access is closed, and it creates a virtual gateway that is visible to the system as a normal device.

๐Ÿ’ก

Use the dedicated IP-address for your automation server in the router so that the device address does not change after the network restart.

Installation and configuration of Home Assistant

The process of installing Home Assistant can vary depending on the hardware you choose. If you use a Raspberry Pi, the easiest way to write a finished HAOS image to a memory card is to install it. For Windows or macOS users, the option of installing it via Docker is available, although it requires more knowledge in the command line area.

After the initial installation and the basic network setup, you need to access the control panel interface, which is usually available at the address. http://homeassistant.local:8123 or IP-The first step is to create a user and select a location.

Next comes the critical step of installing add-ons. From the menu, select Settings โ†’ Add-ons โ†’ Add-on Store. Find the AlexxIT repository or use the Home Assistant Community Store (HACS) to find Xiaomi Gateway 3 integration.

ComponentAppointmentStatus of installation
Home Assistant OSBasic operating systemI'll be sure.
Xiaomi Gateway 3Integration of Xiaomi devicesI'll be sure.
Yandex StationIntegration of Yandex columnsOptionally.
Node-REDVisual programming of scenesRecommended

After installing the Xiaomi Gateway 3 integration, go to Settings โ†’ Devices & Services โ†’ Add Integration. Find Xiaomi Gateway 3 and follow the instructions of the customization wizard. You will need to enter the username and password from your Mi Account (Chinese).

โ˜‘๏ธ Checking before integration

Done: 0 / 5

Mi Home Account Integration and Device Distribution

The hardest part is getting the right authorization, because your account is Chinese, the standard methods may not work. Xiaomi Gateway 3 integration uses a tokenization method. You may need to extract the device token or use debugging mode.

In the integration configuration, choose the Cloud connection method if the devices are not on the same local network as the server, or Local if you have a gateway (hub) that supports local management. For most Chinese devices that do not have their own hub, the cloud method through MiOT servers will suit.

Enter your credentials. The system will try to get a list of all the devices associated with the account. If the list is empty, check if the server region is correctly selected in the integration settings (should be cn or China).

โš ๏ธ Note: When connecting through the cloud, command delay can be from 1 to 3 seconds. For instantaneous reactions (for example, motion sensors), try to configure local control through Zigbee gateways.

Once added successfully, the devices will appear in Home Assistant as entities. light.xiaomi_lamp or switch.plug_cn. Now they are managed inside the system, but not yet visible in Yandex.

What if the integration gives an authorization error?
The error often occurs due to two-factor authentication or blocking a suspicious login. Try logging into your Mi Account from your browser in incognito mode, confirming the login, and then trying again in Home Assistant. VPN, if IP-The server address is on the blacklist of Xiaomi.

Setting up the skill Yandex Smart Home

For Marusya to see your Chinese gadgets, you need to throw them from Home Assistant to the Yandex ecosystem. HACS).

Go to the Yandex Smart Home integration settings and click Register Skill. The system will redirect you to the Yandex website, where you will need to log in and confirm access rights. After that, a new skill associated with your server will appear in the House with Alice app.

It is important to configure the types of devices correctly. switch.living_room_lamp โ€” This is a lamp, not just a switch. In the configuration file configuration.yaml or through the integration interface, specify:

yandex_smart_home:




entities:




- id: switch.xiaomi_plug_01




type: devices.types.switch




name: "Desktop lamp"




- id: light.bedroom_ceiling




type: devices.types.light




name: "Light in the bedroom"

After saving the settings, click the Home with Alice button to Update the Device List. In a few seconds, Chinese devices should appear in the general list, ready for voice control.

๐Ÿ’ก

The key to success is to properly classify device types in the YAML configuration, otherwise Alice wonโ€™t know how to control them (turn on or change color).

Scenario creation and voice control

Now that all the devices are connected, you can create complex scenarios, Marusya allows you to run whole chains of action in one sentence, for example, the phrase "I'm home" can turn on the lights, run a robot vacuum cleaner and open the curtains.

In Yandex, go to Scripts and create a new one. Select a Phrase as a trigger and write text that the voice assistant will recognize. In actions, select a Smart Home Device and find your devices from Home Assistant.

  • ๐Ÿ’ก Cinema: Turns off the main light, turns on the backlight behind the TV at 10% brightness and puts the phone in silent mode (through integration).
  • ๐Ÿงน Cleaning scenario: Runs robot vacuum cleaner only in rooms where motion sensors have not recorded activity for more than 30 minutes.
  • ๐ŸŒก๏ธ Climate scenario: If temperatures fall below 20ยฐC, switch on the heater through a smart socket until reaching 23ยฐC.

Voice control works almost without delay if you use a local server, and you can ask, "Alice, what charge is the vacuum cleaner?" or "Alice, turn off the lights in the kitchen." The system will transfer the request to the Home Assistant command, which will instantly send a signal to the Chinese device.

โš ๏ธ Note: Do not create cyclical scenarios (e.g., โ€œif the lights are on, turn it offโ€), as this can lead to an endless cycle of switching and network congestion.

Frequent errors and methods of their elimination

Users often experience loss of connection between the server and devices during the setup process. Mi Home servers in China can block frequent status requests. To avoid this, increase the interval of the device survey in the integration settings to 30-60 seconds.

Another common problem is change. IP-If the address changes, the skill in Yandex will stop working, because it will knock on the old address. IP-router (DHCP Reservation).

If devices become unavailable (โ€œNo responseโ€), check the Home Assistant logs. Often the error lies in the expired session of the authorization token, in which case you need to reauthorize your Mi Account account in the integration settings.

Why are devices displayed with Chinese names?
This happens if the Mi Home app has device names in Chinese, rename them in the Mi Home app itself in Latin or Russian, then update the integration in Home Assistant and resynchronize the devices in the Yandex app.
Can I manage devices without the internet?
Yes, if you use local mode integration Xiaomi Gateway 3 and devices support local management (Zigbee, Wi-Fi with local API), however, voice control via Marusya requires access to the network for processing voice commands by Yandex servers.
Is it safe to enter a password from your Mi Account in Home Assistant?
Yes, data is transferred directly to Xiaomi servers to receive the token and is not stored in the public domain, but it is recommended to use a separate, limited account for tests if you are concerned about the security of the underlying data.
Does this work with Aqara brand devices?
Yes, Aqara devices connected to a Chinese hub and account also make their way through this scheme, and it is important that the Aqara hub is tied to the Chinese region in the Mi Home app.
Do you need a paid server for this?
No, the whole scheme runs on free, open-source software, and you only need to pay for the hardware (like a Raspberry Pi) and electricity to run it.