How to set up a Xiaomi hub: a step-by-step guide to a smart home

Creating a full-fledged smart home ecosystem begins with choosing a central control device, and for many users this device becomes a gateway from Xiaomi. Competent configuration of the hub allows you to combine dozens of disparate sensors, light bulbs and sockets into a single network controlled from a smartphone. The initial activation process may seem confusing to a beginner, but consistent execution of instructions ensures the stable operation of the entire system in the future.

In this guide, we will take you through all the steps of connecting, from unpacking to creating complex automations that will make your home truly smart. You will learn how to avoid the typical mistakes when choosing a server region and why Zigbee is the preferred protocol for building a reliable network of sensors. Understanding the gateway is essential to eliminating blind spots and ensuring instant response of devices.

Before you start the software part, you need to properly prepare the physical location for your controller. The optimal distance between the hub and the controlled devices should not exceed 10 meters in a room with concrete walls. This is a technical limitation of the communication protocol, ignoring which will lead to loss of signal and unstable operation of the sensors of motion or water leakage. Place the gateway as close as possible to the center of the apartment or in the area where the largest number of peripherals are concentrated.

Preparation of equipment and selection of installation site

The first step will be to check the trim and choose the right power source for your gateway.Most modern models, such as the Mijia Smart Home Gateway 3 or the Aqara Hub M2, require a connection to a 220V outlet, whereas some portable versions can run on USB.Make sure you use the original cable and power supply, as a lack of voltage often leads to cyclical reboots of the device.

It is important to consider temperature and interference in the installation site. It is not recommended to place the hub in close proximity to microwave ovens, powerful Wi-Fi routers or metal structures that can shield the signal. The Zigbee 3.0 protocol used in new devices has good penetrating power, but physical obstacles still affect the quality of communication.

  • πŸ“ Choose a central location in the apartment for maximum coverage.
  • πŸ”Œ Use only the original power cables from the kit.
  • πŸ“‘ Avoid proximity to sources of strong electromagnetic fields.
  • 🌑️ Provide ventilation if the hub is installed in a closed niche.

Once you have selected a location, connect the device to the power supply. The indicator on the case should light up or flash, signaling readiness for pairing. If the indicator does not respond, check the integrity of the socket and cable. At this stage, software adjustment is not required, it is only important to make sure that the hardware part is healthy.

⚠️ Warning: Do not install the gateway in areas with high humidity if the model does not have adequate protection IP. Bathrooms and kitchens require the use of specialized waterproof versions of equipment.

Modern hubs often serve as night lights or have a built-in speaker, so their aesthetic placement also plays a role. However, functionality should always come first: access to the reset button should be saved in case you need to flash or change network settings.

πŸ“Š What is the communication protocol of your devices?
Zigbee 3.0
Bluetooth Mesh
Wi-Fi straight
Infrared

Installation of the Mi Home application and account registration

To manage the ecosystem, you will need the official Mi Home (or Xiaomi Home) mobile app, which you should download exclusively from official Google Play or App Stores, avoiding third-party resources where modified and insecure versions of the software can be distributed. Once installed, launch the application and create a new account or log in to an existing one.

The critical point is to choose a server region when registering or logging in. If your devices are designed for the Chinese market (CN version), the region should be installed in China. For global versions (EU, Global), choose your country or neighboring states that support the smart home. The mismatch between the region in the application and the device's firmware will make it impossible to pair them.

The path to change region: Profile (bottom right) β†’ Settings (cogs) β†’ Device management β†’ Region

Once you select a region, the app will request permissions to use geolocation, Bluetooth, and LAN, which are required to correctly locate devices when you first set up. Without GPS and Bluetooth enabled, the hub detection process may be delayed or not started at all.

  • πŸ“² Download the app only from official stores.
  • 🌍 Determine the region of the device before logging in to the account.
  • πŸ“ Allow access to geolocation to search for equipment.
  • πŸ”” Enable notifications to receive security events.

Regional restrictions are one of the most common user problems: If you bought a device tied to a Chinese server and created an account in Russia, the hub simply won’t appear on the list of available ones for add, in which cases you sometimes need to create a second account with the corresponding region.

⚠️ Warning: Changing the region in an already configured application may hide previously added devices. All scenarios and automations tied to the old region will no longer appear in the interface.

πŸ’‘

If the app doesn’t find the device, try temporarily switching your smartphone to a mobile network (3G/4G), adding a hub, and then returning Wi-Fi.

The process of adding a gateway to the system

The process of adding a hub to the Mi Home app is standardized, but requires care at every step. Open the app by making sure the smartphone is connected to a 2.4GHz Wi-Fi network. Xiaomi hubs typically don't support 5GHz networks for initial setup, so make sure your router broadcasts the signal in 802.11 b/g/n standard.

Press the + button in the upper right corner of the app's home screen. The system will automatically start scanning. If the hub is in pairing mode (usually activated immediately after power is turned on, as indicated by a flashing indicator), it should appear in the list of Local Devices or New Device Found.

Hub modelStatus indicatorAction for dischargeProtocol
Gateway 3Orange flashingHold 5 seconds.Zigbee 3.0
Aqara Hub M1Blue flashingHold 10 seconds.Zigbee
Gateway 2Yellow flashingPaperclip in the holeZigbee
Aqara Hub M2Orange/BlueHold 5 seconds.Zigbee/Wi-Fi

If the automatic search didn't work, manually select the device from the directory. Find the Gateway category and select your model. The app will suggest confirming that the indicator is flashing and asking you to enter the password from the Wi-Fi network. Enter the password carefully, observing the register of characters.

When you connect, the indicator on the hub can change color, signaling various stages: waiting for configuration, connecting to the router, registering on the server. Wait until the indicator lights up in a smooth green or blue color, which means successful completion of the procedure.

β˜‘οΈ Checklist of connection

Done: 0 / 5

Setting up Zigbee network and updating the firmware

Once a gateway is successfully added, the system will prompt a software update, a critical step that cannot be ignored, and new firmware versions will fix security vulnerabilities, improve the stability of the Zigbee network connection, and add support for new device types.

The upgrade process can take from 2 to 10 minutes depending on the speed of the Internet, at which time the hub can restart, and its indicator can blink slowly. It is strongly recommended not to turn off the power of the gateway at this point, as this can lead to the "bricking" of the device, which will be extremely difficult to restore.

⚠️ Warning: During a firmware update, don't switch between apps on your smartphone or lock the screen if the process requires constant status confirmation.

Once updated, you should check the settings of the Zigbee channel. In some gateway models, manual channel change is available, which is useful in apartment buildings, where the air is filled with signals from neighboring routers and smart devices. Switching to a less busy channel can significantly increase the responsiveness of sensors.

What to do if the update is suspended?
If the update process lasts more than 20 minutes and the indicator is on smooth color unchanged, try briefly to turn off the power (for 2-3 seconds) and turn on again. The device can go into recovery mode. If this does not help, you will need to reset to factory settings and re-bind.

The gateway settings also enable Child Mode or Night Mode, which limit the volume of notifications or change the color of the glow at a certain time, which make the device more comfortable to use in the home.

Connecting peripheral devices and sensors

The hub's main function is to combine the peripherals. To add a new device (temperature sensor, button, socket), go to the hub card in the app and press "Add device" or "+." Put the sensor in pairing mode, usually done by a quick five-fold push of a button or prolonged retention.

The successful addition is confirmed by the sound signal on the hub itself and the appearance of a new device in the list, after which the device can be assigned a name, room and icon, and it is recommended to use clear names, such as "Sensor in the corridor" instead of "Aqara Sensor 001" to simplify the creation of scripts.

When you add a large number of devices (more than 20-30), the network may take time to rewire routes. Devices with constant power (smart sockets, relays) act as repeaters, strengthening the Zigbee network.

  • πŸ”‹ Add devices one at a time to avoid addressing conflicts.
  • 🏠 Assign clear names and rooms to your devices immediately.
  • πŸ“‘ Use smart sockets as signal repeaters in far corners.
  • βš™οΈ Check the signal level (RSSI) after installing the sensor in a permanent place.

If the sensor is added at a great distance from the hub, bring it closer to the gateway for pairing, and then move to the regular place. After moving, the device will independently find the optimal route for transmitting data through neighboring repeaters.

πŸ’‘

Self-powered devices (sockets, switches) amplify the Zigbee signal, acting as repeaters, so their strategic placement improves coverage of the entire network.

Creating Automations and Scenarios

The peak of the smart home is revealed when you create automation scenarios. Go to the Smart Home tab and create new automation. The logic of building is simple: "If (condition) β†’ That (action)." For example: "If the leak sensor detects water β†’ Turn on the siren on the hub and send a notification."

Scenarios can be local (without the Internet) or cloud-based (with servers required); local scenarios can be faster and more reliable because they don't depend on external communication channels; and try to build critical security chains (security, leakage) based on local rules.

An example of a complicated scenario, "I left":


1. The wireless button is pressed.




2. Turn off all the lights in the apartment.




3. Close the smart curtains.




Activate the motion sensor protection mode.




5. Send a notification "Security mode activated".

You can set time limits in scenario settings, for example, the door opening notification should not come at night if you sleep at home, but should work when security mode is on, and using the "And" and "OR" conditions allows you to create flexible algorithms for behavior at home.

How do you create a delayed script?
In some versions of the app, direct delay (timer) is only available in advanced settings. Alternatively, create a scenario: "If the sensor is triggered β†’ Enable virtual timer for 5 minutes." Then create a second scenario: "If the timer has expired β†’ Perform an action." This allows you to simulate the delay in execution of the command.
Why doesn't automation work?
Frequent causes: the device (offline), the server region changed, the device is asleep and hasn't sent status yet, or the hub's script limit is exceeded.

Frequently Asked Questions (FAQ)

Can you run a Xiaomi hub without the internet?
Local control is possible if you have a Home Assistant server or use LAN control, which is not supported by all models, and standard scenarios, whether geolocation or voice control, require access to the cloud.
How many devices can be connected to a single hub?
Theoretically, Zigbee supports up to 128 devices on a single network, but it is recommended to keep 30-40 active devices per gateway stable, especially if they frequently send statuses.
Does the hub work with other brands’ devices?
Yes, the hub supports Zigbee 3.0, so it is compatible with Aqara, IKEA Tradfri, Philips Hue and others if they use the same protocol. However, full functionality and scripting are only guaranteed with the Xiaomi/Aqara ecosystem.
What does blinking in yellow/blue mean?
The color indication depends on the model. Usually yellow means pairing mode or network error, blue means normal operation or Bluetooth connection.