Connecting Xiaomi Hub to Smart Home: From Unpacking to Automation

Xiaomi hubs are central devices that link all the components of a smart home into a single system. Without them, most sensors, switches and other Mi Home or Aqara gadgets will not be able to communicate with the cloud or with each other. However, the connection process often raises questions from choosing the right model to configuring complex automation scenarios.

In this article, we will analyze not only the basic steps to connect the hubs Mi Home Hub, Aqara Hub and their modifications, but also the nuances that the manufacturer is silent. For example, why the hub may not detect devices within a 10 meter radius, how to bypass the restrictions by region, and what to do if the indicator flashes red. Particular attention will be paid to compatibility with third-party devices through the Zigbee 3.0 protocol – this is important for users who want to integrate gadgets from the Internet into the system. IKEA, Philips Hue or Tuya.

If you’re just starting out with a smart home or you’re already having trouble connecting, here’s 90% of the typical questions, and for power users, we’ve prepared a section on alternative firmware and Home Assistant integration.

1. Choosing a Xiaomi hub: which model to buy in 2026

Before buying, it’s important to understand that not all Xiaomi hubs are the same, differing in protocols supported, maximum number of connected devices, and even in design.

  • πŸ”Ή Xiaomi Mi Home Hub (Mijia Hub) is a basic model with support for Zigbee and Wi-Fi. Suitable for small systems up to 30 devices.
  • πŸ”Ή Aqara Hub M2 β€” An improved version with support for Zigbee 3.0, an Ethernet port and a backup battery.Works with Aqara devices and Xiaomi gadgets.
  • πŸ”Ή Aqara Hub E1 β€” Compact hub without Ethernet but with Matter support.Ideal for integration with Apple HomeKit or Google Home.
  • πŸ”Ή Xiaomi Mi Smart Home Gateway 3 - new model (2023) with improved antenna and support for Thread.Important: requires firmware at least 1.7.0 to work with Matter.

For most users, the best choice is Aqara Hub. M2 β€” It's compatible with maximum number of devices and backup power for 8 hours. If you want integration with HomeKit, take the Aqara Hub. E1. Older models like the 2016 Mi Home Hub 1 are best avoided, as they don’t support modern protocols and often give out errors when connecting new sensors.

⚠️ Note: Xiaomi hubs are tied to the region of sale. If you buy a device on AliExpress or Banggood, check with the seller what region it is intended for. Hub from China will not work correctly with Mi Home servers in Russia or Europe without manually changing the region.

Hub modelProtocolsMax. Devices.Standby powerSupport for Matter
Mi Home HubZigbee, Wi-Fi30❌ No.❌ No.
Aqara Hub M2Zigbee 3.0, Ethernet, Wi-Fi128βœ… 8 hours❌ No.
Aqara Hub E1Zigbee 3.0, Wi-Fi64❌ No.βœ… Yes.
Mi Smart Home Gateway 3Zigbee 3.0, Thread, Wi-Fi64βœ… 4 hoursβœ… Yes.
πŸ“Š What Xiaomi Hub Are You Using?
Mi Home Hub
Aqara Hub M2
Aqara Hub E1
Mi Smart Home Gateway 3
The other/I don't know/

2. Unpacking and first inclusion: what should be included

After you buy the hub, check the equipment.

  • πŸ“¦ Hub itself (with indicator on the front panel).
  • πŸ”Œ Power supply (usually) 5V/1A or 5V/2A β€” model).
  • πŸ“ƒ Short instructions in Chinese/English (new models may be used in English) QR-code).
  • πŸ”— Ethernet cable (only in port models, such as Aqara Hub) M2).

If something is missing, contact the seller immediately. It is especially important to check the power supply: some hubs (for example, Mi Home Hub) are sensitive to voltage. Using an unoriginal unit can cause malfunctions or even failure of the device.

Connect the hub to the outlet. The indicator should flash yellow. If the indicator is red, it's a mistake.

  • πŸ”‹ Faulty power supply.
  • 🌍 Hub is tied to another region (you need to reset the settings).
  • πŸ“‘ Wi-Fi problems (the hub cannot connect to the network).

⚠️ Note: If the hub flashes blue, it means it is already linked to another Mi Home account, which requires a factory reset (press the button 10 seconds before the beep).

For models with Ethernet port (Aqara Hub) M2) It is recommended to use a wired connection – this increases stability, especially if you have many devices (50).+). However, for initial settings Wi-Fi is mandatory - the hub first connects to the network by air, and then you can transfer it to the cable.

3. Connecting the hub to the Mi Home app: step-by-step instructions

To set up the hub, you will need the official Mi Home app (available for Android and iOS), download it only from official stores - Google Play or the App Store. versions from third-party sites may contain viruses or outdated firmware.

Connection algorithm:

  1. Open Mi Home and log in (if you don’t have an account, sign up).
  2. Press + β†’ Add the device.
  3. Select the category Hubs and Gateways.
  4. Find your model hub on the list (e.g. Aqara Hub) M2).
  5. Follow the instructions on the screen: the hub should flash yellow, and the phone should be connected to the same Wi-Fi network (only 2.4 GHz!).
  6. Wait until the process is completed (usually takes 1-3 minutes).

If the hub is not located, try:

Reboot the hub (remove/insert the power supply unit)|Make sure Wi-Fi is running at 2.4 GHz|Re-launch the Mi Home app|Check if the firewall is blocking or VPN connection|Reset the hub to factory settings (10sec button)-->

Once the hub is successfully connected, it will appear on the main list of devices, and now you can start adding sensors and other gadgets, but first we recommend updating the hub firmware to the latest version, which will fix possible bugs and add support for new devices.

Firmware update:

  1. Open the hub card in Mi Home.
  2. Go to Settings β†’ Update firmware.
  3. If a new version is available, click Update and wait until it is completed (don’t turn off the power!).

πŸ’‘

If the hub has stopped seeing some of the devices after the upgrade, try reconnecting them manually. Sometimes the firmware resets the connection with the sensors, but does not remove them from the list.

4. Adding devices to the hub: sensors, switches, lamps

Now that the hub is connected, you can add other devices to it, and the process is universal for most Xiaomi and Aqara gadgets, but there are nuances depending on the type of device.

Common algorithm:

  1. Turn on the device (insert batteries, connect to power).
  2. In the Mi Home app, click + β†’ Add the device.
  3. Select a category (such as Sensors or Lighting).
  4. Find your model in the list and follow the instructions.

Some devices require special actions to transfer to the pairing mode:

  • πŸ”˜ Button switches (e.g. Aqara Wireless Mini Switch): Press and hold the 5-second button until the indicator flashes.
  • 🌑️ Temperature/humidity sensors (e.g. Mi Temperature & Humidity Sensor): Remove and re-insert the battery.
  • πŸ’‘ Smart lamps (e.g. Yeelight): turn the lamp on/off 3 times in a row.
  • πŸšͺ Door opening sensors (e.g. Aqara) Door/Window Sensor: Disconnect and reconnect the magnet to the main unit.

If the device is not added, check:

  • πŸ“Ά Distance to the hub (no more than 10 meters in line of sight, without obstacles).
  • πŸ”‹ Battery charge (if the device is battery-powered).
  • πŸ”„ Compatibility of the device with your Hub model (see table below).
Type of deviceCompatible with Mi Home HubCompatible with Aqara Hub M2Notes
Door opening sensorsβœ… Yes.βœ… Yes.Aqara models work better with Aqara Hub
Smart socketsβœ… Yes (Wi-Fi)βœ… Yes (Zigbee)Xiaomi outlets connect directly to Wi-Fi, without a hub
Yeelight lamps❌ No (requires Wi-Fi)❌ No.Connected through the Yeelight app
Aqara motion sensors❌ No.βœ… Yes.Aqara or Mi Smart Home Gateway 3

Pay special attention to devices from third-party manufacturers (for example, IKEA Tradfri or Philips Hue. They can be connected to the Xiaomi hub, but only through special plugins or alternative firmware (we will talk about this in the section about Home Assistant).

5. Automation setup: scenarios and triggers

The main advantage of the hub is the ability to create automatic scripts, such as turning on lights when moving, sending notifications when opening a door or running a robot vacuum cleaner on a schedule.

To create a script:

  1. In Mi Home, go to Automation β†’ Create a script.
  2. Select Trigger (the condition that triggers the script). For example, Motion Sensor is triggered.
  3. Select Action (what is to happen) for example, Turn on a smart lamp.
  4. Save the script and test it out.

Examples of useful scenarios:

  • πŸŒ… Simulated presence: accidentally turning on lights at different times when you are not home.
  • 🚰 Leak protection: Automatic tap overlap (if there is a smart valve) when the water sensor is triggered.
  • πŸ”₯ Fire safety: turning on the siren and sending SMS when the smoke detector is activated.
  • 🌑️ Climate control: Turn on the heater if the temperature has dropped below 20Β°C.

Important nuance: Some scenarios require cloud processing, which can slow their operation (delay to the cloud). 2-3 Use local scripts to execute instantly (available only for devices connected to a single hub).

⚠️ Note: If the scenario involves devices from different manufacturers (such as the Aqara sensor and the Philips Hue lamp), they may not work synchronously due to different communication protocols.

For advanced users: Mi Home has a hidden feature called Advanced Scripts that allows you to use logical operators (OR NOT) to enable it:

  1. Go to Profile β†’ Settings β†’ Region.
  2. Choose China (Mainland China).
  3. Restart the application - a new section Smart with advanced settings will appear.
How to return the Russian language after the change of the region?
To bring back the Russian interface, change the region to Russia or Europe again, and the expanded scenarios will remain.

6 Problems and Errors: What to Do When the Hub is Not Working

Even when set up properly, the hub can be unstable, and here are the most common problems and solutions.

Problem.Possible causeDecision
Hub does not connect to Wi-FiWrong password, 5 GHz instead of 2.4 GHz, firewall lockCheck the router settings, turn off VPN, drop the hub
The indicator flashes red.Firmware error, incompatible region, malfunctionUpdate your firmware, change region in Mi Home, contact support
Devices are periodically switched offZigbee signal, interference from other devicesMove the hub closer to the center of the house, reduce the number of Wi-Fi networks by 2.4 GHz
Hub doesn't respond to teamsSystem overload (too many devices)Remove unnecessary devices, reboot the hub

If the hub stopped seeing part of the devices after updating the firmware, try:

  1. Remove the problem devices from Mi Home.
  2. Reboot the hub (remove the power supply for 30 seconds).
  3. Add the devices again.

To diagnose a Zigbee network, you can use the Zigbee Mapper app (available for Home Assistant), which shows the topology of the network and helps identify devices that cause interference.

πŸ’‘

If the hub does not connect to your account after resetting, try linking it through another region (for example, China), and then return the original one.

7.Alternative firmware and integration with Home Assistant

Xiaomi’s official hub software has limitations: no support for some devices, slow cloud scenarios, region-specific binding, and alternative firmware such as:

  • πŸ”§ Zigbee2MQTT β€” It allows you to connect a hub to Home Assistant or OpenHAB, bypassing the Xiaomi cloud.
  • πŸ”„ Aqara EU Firmware – firmware for Aqara Hub, adding support for additional devices.
  • 🌐 Mi Home Hack – Modified software to unlock hidden features.

To install an alternative firmware will require:

  1. Split the hub and connect to it on UART (power-user!).
  2. Use utilities like esptool to download new firmware.
  3. Set up integration with Home Assistant via Zigbee or MQTT.

Advantages of this approach:

  • ⚑ Instant scripting (without cloud delays).
  • πŸ”“ Support for devices from other manufacturers (IKEA, Philips Hue, Tuya).
  • πŸ“Š Advanced Analytics and Event Logging.

However, there are risks:

  • ⚠️ Loss of guarantee.
  • ⚠️ Possible "brick" of the device in case of firmware error.
  • ⚠️ Lack of official support.

If you're not ready for firmware experiments, but want to expand the hub's capabilities, consider integrating through Home Assistant without hacking.

  1. Install Home Assistant on a Raspberry Pi or other server.
  2. Add Xiaomi Mi Home integration through HACS.
  3. Sign in with the token from Mi Home.

This will allow you to manage Xiaomi devices locally, without depending on the cloud, and create complex automation using Node-RED.

8.Hub Optimization: Tips for Stability

To ensure that the hub works without failure, follow these recommendations:

  • πŸ“‘ Place a hub in the center of the house, away from metal objects and household appliances (microwaves, refrigerators).
  • πŸ”„ Regularly (once in) 1-2 month) reboot the hub, removing the power supply on 30 seconds.
  • πŸ“΅ Don't connect more than 50 devices to one hub - it can cause lags. If you need more, use multiple hubs.
  • πŸ”Œ For backup power hubs (Aqara Hub) M2) Check the battery status every six months.
  • 🌐 Use static. IP-address for the hub in the router settings to avoid connection issues.

If you have many battery-powered devices (sensors, switches), schedule their replacement.

Type of deviceBattery lifeRecommendations
Door opening sensors1-2 yearsUse Panasonic Evolta batteries to keep the battery longer
Motion sensors6-12 monthsPlace in places with minimal activity to reduce your consumption
Button switches2-3 yearsTurn off the button lighting if it is available.

To monitor the state of the battery, it is convenient to use dashboards in Home Assistant or the Mi Home application (Devices section). β†’ If the battery voltage drops below 2.8V, the device may start to work incorrectly.

Another tip: if you use smart bulbs, set them so that they do not consume energy when turned off. To do this, in Mi Home, turn off the option to Save State after the power is turned off (located in the settings of each lamp).

FAQ: Answers to Frequent Questions
1. Can I connect the Xiaomi hub to Google Home or Apple HomeKit? Yes, but with reservations. E1 Mi Smart Home Gateway 3 Support Matter, which allows integration with Google Home and HomeKit. Older models will require Home Assistant as a bridge. 2. Why can't the hub see devices that used to work? Most often, it happens after a firmware update. Try to delete and re-add devices. Also check if the region in Mi Home has changed - some devices are tied to a specific region. 3. How to reset the hub to factory settings? Press the button on the hub on the 10-15 You will hear the beep (or the indicator will start flashing quickly) and then the hub will be ready for a new setup. 4. Can you use a Xiaomi hub without the internet? Yes, but with limitations. Local scripts (between devices of the same hub) will work, but management through the application and cloud functions (notifications, voice assistants) will not. For full autonomy, you need Home Assistant. 5. How many devices can you connect to one hub? Official limit: Mi Home Hub: Up to 30 devices. Aqara Hub. M2: Mi Smart Home Gateway 3: up to 64 devices, and in practice, if you exceed 50 devices, you may experience delays.