Smart home Xiaomi 2021: where to start and how to build a system from scratch

Introduction: Why Xiaomi 2021 is relevant in 2026?

The Xiaomi Smart Home ecosystem of 2021 remains one of the most affordable and functional platforms for home automation even after three years. Despite the release of new devices, the main hubs and sensors of 2021 (for example, Mi Home Gateway 3 or Aqara Hub M2) continue to be supported by the manufacturer, receive firmware updates and are compatible with modern scenarios. Moreover, they can be found in the secondary market at a price 2-3 times lower than the original one – ideal for those who want to build a smart home without overpaying.

In this article, we will discuss how to start building a smart home based on Xiaomi 2021 in 2026: from choosing a central hub to configuring automation through the Mi Home or Home Assistant. Particular attention will be paid to the compatibility of older devices with new protocols (Zigbee 3.0, Matter) and workarounds for integration with Google Home or Apple HomeKit. If you are just planning a purchase, here you will find a checklist of necessary hardware and step-by-step instructions without water.

1. Central hub: which one to choose in 2026?

Without a hub, Xiaomi’s smart home won’t work as a single system, and in 2021, the company released several key models that still remain relevant:

  • πŸ”Ή Xiaomi Mi Home Gateway 3 is a basic version with support for Zigbee and backlight (16 million colors), Suitable for small apartments, but has a limit on the number of connected devices (up to 32).
  • πŸ”Ή Aqara Hub M2 β€” more advanced version with support for Zigbee 3.0, Ethernet port and backup power. Compatible with HomeKit (via firmware).
  • πŸ”Ή Xiaomi Mi Smart Home Hub (white round model) – budget option without RGB-backlight, but with Mi Mesh support for stable communication.

In 2026, the best choice for beginners is the Aqara Hub M2 – it supports more devices (up to 128), has a built-in speaker for the siren and can work autonomously when the lights are turned off (thanks to the battery compartment). If the budget is limited, take the Mi Home Gateway 3, but keep in mind that the expansion of the system will require additional hubs.

πŸ“Š What Xiaomi Hub Are You Using?
Mi Home Gateway 3
Aqara Hub M2
Another Xiaomi
I don't have a hub.
I'm using Home Assistant.

⚠️ Note: Xiaomi’s 2021 hubs don’t support Matter out of the box.To integrate with Google Home or Apple HomeKit, you’ll need to use Home Assistant or alternative firmware (e.g., Aqara Hub). M2).

2. Device compatibility: What works with hubs 2021?

Not all Xiaomi 2021 devices are compatible, but the basic rule is that Mi-logo devices (such as Mi Door/Window Sensor) only work with Mi hubs, and Aqara devices only work with Aqara hubs.

Type of deviceCompatible hubsNotes
Opening Sensors (Mi Door/Window Sensor)Mi Home Gateway 3, Aqara Hub M2Requires firmware for Aqara
Smart sockets (Mi Smart Plug)Any hub + Wi-FiIt works without a hub, but scripts need a gateway
Aqara Temperature and Humidity SensorJust the Aqara Hub.Not compatible with Mi Home Gateway
Smart lamps (Yeelight)No hub (Wi-Fi)It is integrated via Mi Home but does not support Zigbee.

Before buying, check compatibility on the official Mi Home website or in the Zigbee2MQTT database. For example, Mi Motion Sensor (2021) will not work with the Aqara Hub E1 (2023), although both use Zigbee.

πŸ’‘

If you plan to use devices from different brands (such as Xiaomi + Philips Hue), consider Home Assistant with Sonoff Zigbee 3.0 adapter – this will solve compatibility issues.

3. Minimum set of start devices

To build a working smart home from scratch, you need 4-5 devices, and here is the optimal starting kit based on Xiaomi 2021:

β˜‘οΈ The basic set of smart home Xiaomi 2021

Done: 0 / 5
  • πŸšͺ Mi Door/Window Sensor is for door and window control. 2 battery-year CR1632.
  • πŸ‘€ Mi Motion Sensor – motion sensor with a viewing angle of 170Β°. Can be used to automate lighting.
  • πŸ’‘ Yeelight LED Bulb is a smart lamp with color adjustment (16 million shades) and brightness.
  • ⚑ Mi Smart Plug is a power-monitoring outlet, useful for controlling a kettle or heater.

The cost of such a set in the secondary market (2026) is about 5-7 thousand rubles. If the budget allows, add Aqara Temperature & Humidity Sensor for microclimate control and Mi Smart Button for manual scenario management.

System configuration: step-by-step instruction

After buying the devices, we start setting up. The whole process will take 30-60 minutes:

  1. Install the Mi Home app (available for Android and iOS). Select China Mainland region, which will give you access to all features (including automation).
  2. Connect the hub to the network. For Mi Home Gateway 3, use an Ethernet cable (Wi-Fi is not supported!). In the Aqara Hub M2, you can choose any option.

If the hub is not connected, check:

  • πŸ”Œ Does the device power (the indicator should burn blue).
  • 🌐 Is Ethernet cable connected (for models without Wi-Fi).
  • πŸ“± Application version (update to the last version).
What if the hub is not defined in Mi Home?
1. Reset the hub (turn off power for 10 seconds). 2. Reset (press the reset button for 5-10 seconds before flashing yellow). 3. Try connecting via another region (e.g. Singapore instead of China). 4. If nothing helps, check if the router is blocking the connection (open TCP ports 80, 443, 1234).

5. Creating automation: examples for beginners

The main benefit of a smart home is that it automates routine tasks. In Mi Home, it's called "Scenarios." Here are 3 simple examples that you can customize in 5 minutes:

  • πŸ’‘ "Moving lighting: Trigger: Mi Motion Sensor (movement detected) Action: turn Yeelight Bulb on at 70% brightness Condition: time from 18:00 to 23:00.
  • πŸšͺ "Open Door Alert: Trigger: Mi Door Sensor (Door open) > Action: Send a push notification to your phone + siren.
  • ⚑ "Electricity savings: Trigger: Mi Smart Plug (consumption) > 1000W Action: Turn off the socket in 10 minutes (useful for heaters).

To create a script in Mi Home, go to Automation β†’ Create β†’ If... β†’ That... Note: Some devices (like Yeelight) require a separate application to fine-tune colors and effects.

πŸ’‘

The scripts in Mi Home only work with an active Internet connection. For local automation (without the cloud), use Home Assistant or alternative firmware.

6.Integration with Google Home and Apple HomeKit

Xiaomi’s 2021 hubs don’t officially support Google Home or HomeKit, but there are workarounds:

PlatformIntegrationDifficulty
Google HomeThrough Mi Home (Cloud Sync)⭐ (simple)
Apple HomeKitAqara Hub M2 Firmware for HomeKit or Home Assistant⭐⭐⭐ (difficult)
Alice (Yandex)Official integration through Mi Home⭐ (simple)

To connect to Google Home:

  1. Open Mi Home and go to Profile β†’ Settings β†’ Smart Home β†’ Third-party accounts.
  2. Select Google Assistant and log in.
  3. In Google Home, click + β†’ Set up your device β†’ Are there devices already? and select Xiaomi.

HomeKit requires you to flash the Aqara Hub M2 through this repository, which takes 15-20 minutes and requires a Python computer.

⚠️ Note: After firmware on HomeKit, you will lose access to devices via Mi Home.It is recommended to first migrate all automation to Home Assistant or Apple Home.

7. Mi Home: Home Assistant and Zigbee2MQTT

If you don’t like the limitations of Mi Home (such as cloud dependency or lack of Matter), consider alternative platforms:

  • 🏠 Home Assistant – open system with local management. Supports all Xiaomi devices through plugins Xiaomi Miio or Zigbee2MQTT.
  • 🐝 Zigbee2MQTT β€” A software to manage Zigbee devices without the cloud requires an adapter (e.g., a Zigbee device, CC2531 Or Sonoff Zigbee 3.0).
  • 🌐 ioBroker is a German automation platform supported by Xiaomi via the mihome adapter.

To start with Home Assistant:

  1. Install the system on Raspberry Pi, Docker or Windows.
  2. Add Xiaomi Miio integration through Settings β†’ Devices and Services β†’ Add integration.
  3. Enter the device token (you can get it through MiOT Spec).

The advantages of Home Assistant:

  • βœ… Local management (not dependent on Xiaomi servers).
  • βœ… Support for Matter and Integration Google/HomeKit.
  • βœ… Flexible automation (e.g., time, weather, geolocation).

πŸ’‘

If you are using Zigbee2MQTT, disable the Permit Join feature after adding all devices, which will improve network security.

FAQ: Answers to Frequent Questions

Can you use the Xiaomi hub 2021 with devices from 2023-2026?
New Xiaomi devices (such as Mi Temperature and Humidity Sensor 2 or Aqara FP2) can use updated Zigbee protocols that are not supported by older hubs. Check compatibility on zigbee2mqtt.io before buying. If the device is running on Wi-Fi (such as Mi Smart Camera 3), it will connect directly to the router and will not depend on the hub.
How to reset the Xiaomi hub to factory settings?
To reset the Mi Home Gateway 3 or Aqara Hub M2: Turn off the hub power. Press the reset button (usually located on the back panel). Connect the power without releasing the button. Hold the button for 10-15 seconds until the indicator flashes yellow. Once the hub resets, it appears in the Mi Home as a new device.
Do I need to update the hub firmware?
Yes, but with caution, Xiaomi's 2021 hub firmware updates are rare, but they may: πŸ”„ Correct communication errors with devices. πŸ”’ Covering security vulnerabilities. ⚠️ Break compatibility with certain devices (for example, after updating the Aqara Hub) M2 Before version 2.0.7, the 2018 Mi Door Sensor stopped working. Check forum reviews before updating (e.g., check forum reviews, 4PDA) or Telegram chat.
Can you run a Xiaomi smart home without the internet?
Partially, locally, they'll work: πŸ”Œ Smart sockets and lamps (if you control via Wi-Fi). πŸ”„ Automation inside Mi Home, if the hub and the phone are on the same network: ❌ Push notifications. ❌ Management via the Internet (outside the home). ❌ Cloud-based scenarios (such as weather-related scenarios) use Home Assistant or full offline management Zigbee2MQTT.
What Xiaomi 2021 devices are better not to buy in 2026?
Some devices are obsolete morally or technically: ❌ Mi Smart Home Gateway 1 – no support for Zigbee 3.0, often fall off devices. ❌ Mi Smart Socket (first generation) – no power monitoring. ❌ Mi Bedside Lamp - weak brightness (maximum 160 lumens). ❌ Mi Air Purifier 2S β€” It is noisy and less efficient than new models, instead of Aqara or newer Xiaomi devices (e.g. Mi Smart Plug Wi-Fi 2022).