How to reset the Xiaomi gateway to factory settings: 3 proven ways

Xiaomiโ€™s smart gateways (including the Mi Smart Home Gateway, Aqara Hub, and Mi Gateway 3) are the central devices in the Mi Home ecosystem that connect sensors, lamps, and other gadgets into a single network. But what if the gateway gets glitched, doesnโ€™t connect to Wi-Fi, or needs to be reassigned to a new account? Factory reset is the universal solution to most software problems. But the procedure has nuances, from losing attached devices to the risk of โ€œbrickingโ€ if you do something wrong.

In this article, there are three official reset methods (via the app, the Reset button and the Reset button). ADB), Comparison of their effectiveness for different models of gateways, as well as answers to frequent questions about recovery after resetting. If you are faced with the error โ€œDevice is not respondingโ€ or the Xiaomi gateway has ceased to appear in the Mi Home โ€“ the instructions below will help to bring it back to life without contacting the service center.

โš ๏ธ Important: Reset removes all gateway settings, including devices attached to it (motion sensors, sockets, lamps, etc.) After the procedure, they will have to be reconnected โ€“ prepare a list of devices in advance or take screenshots of their settings.

1.When does Xiaomi's gateway need to be reset?

Factory resets are a last resort, but sometimes you can't do without them. Here are the typical situations where the procedure is justified:

  • ๐Ÿ”„ Gateway does not connect to Wi-Fi after changing router or password network, despite repeated attempts to reconnect.
  • ๐Ÿšซ The device does not respond in the Mi Home app (Offline status for more than a day, reboot does not help).
  • ๐Ÿ”’ The gateway is linked to an old account that is lost (for example, when selling a device).
  • ๐ŸŒ Lags and hovers: the gateway brakes, does not respond to commands or constantly reboots.
  • ๐Ÿ”„ Firmware errors after a failed update (for example, getting stuck on the Xiaomi logo when enabled).

Before you start resetting, try alternative solutions:

  1. Reset the gateway (turn off power for 30 seconds).
  2. Update the Mi Home app to the latest version.
  3. Check the stability of the Internet connection (the gateway is sensitive to network breaks).
  4. Remove and re-add the gateway in the application (without a complete reset).

If nothing worked, read on. We'll look at three methods of resetting, from the simplest to the most radical.

๐Ÿ“Š What is Xiaomi's gateway?
Mi Smart Home Gateway (round)
Mi Gateway 3 (square)
Aqara Hub
Other
I don't know.

2. Method 1: Reset via Reset button (fastest method)

The physical Reset button is on all Xiaomi gateway models, which works even if the device is not connected to the application or freezes. 3, Aqara Hub M1S/M2 others.

Step-by-step:

  1. Turn off the gateway from power (remove the plug from the socket).
  2. Find the Reset button on the back of the device (usually a small hole with the inscription). RESET or an arrow icon).
  3. Take a paper clip or toothpick to press the button.
  4. Connect the gateway to power by holding the Reset button.
  5. Hold the button for 10-15 seconds until the indicator starts flashing yellow (in some models, a quick blink in blue).
  6. Release the button โ€“ the gateway will reset and restart (the process takes up a lot of time). ~2 minutes).

โš ๏ธ Note: Mi Gateway 3 and Aqara Hub M2 The Reset button can be paired with the pairing button. If the indicator flashes white after holding, you activated the anchor mode, not the reset. Repeat the procedure by holding the button longer (up to 20 seconds).

How do you know if the reset has been successful?

  • The gateway indicator flashes orange (configuration mode).
  • In the Mi Home app, the gateway appears as a new device to add.
  • All previously connected sensors and lamps become inaccessible (they need to be re-tied).

โ˜‘๏ธ Preparation for reset via Reset

Done: 0 / 5

Method 2: Reset via the Mi Home app (without physical access)

If the Xiaomi gateway is still connected to the Mi Home app, but requires reassignment or cleaning of settings, you can perform a software reset, which is less reliable than the hardware, but saves the history of the devices in the account (they do not have to be manually deleted).

Instructions:

  1. Open the Mi Home app and go to the Devices tab.
  2. Find your gateway in the list and tap it.
  3. In the upper right corner, press three dots (โ‹ฎ) and select the device settings.
  4. Scroll down and find Remove device or Reset settings (name depends on the version of the application).
  5. Confirm the action - the gateway will begin the reset process (taken) ~1 minute).
  6. After restarting, add the gateway again via Add the device โ†’ Gateway.

โš ๏ธ Note: Some Xiaomi gateway firmware may not have the Reset option. In this case, the app will only suggest Delete the device โ€” it is not equivalent to resetting. Delete from the account does not clear the gateway memory, and when added again, it can restore the old settings. Use the Reset button for complete reset (Method 1).

Advantages of the method:

  • โœ… Does not require physical access to the gateway (can be done remotely).
  • โœ… Stores the history of devices in the Mi Home account.

Disadvantages:

  • โŒ Does not work if the gateway is offline or got stuck.
  • โŒ Older firmware may not have a reset option.

๐Ÿ’ก

If the gateway does not appear in the list of new devices after resetting through the application, try restarting the router. IP-Addresses interfere with the correct connection.

Method 3: Reset via ADB (for advanced users)

The method is Android Debug Bridge (ADB) Suitable for Android Things-based gateways (like Mi Gateway 3) or if standard methods didn't work, USB-cable and basic command line knowledge.

What you need:

  • ๐Ÿ–ฅ๏ธ Computer with Windows/macOS/Linux.
  • ๐Ÿ”Œ USB-cable (Type-C or Micro-USB, depending on the gateway model).
  • ๐Ÿ“ฅ Utility. ADB Tools (download from Android site).
  • ๐Ÿ”ง On-line mode ADB Debugging on the gateway (if the device is still responding to commands).

Step-by-step:

  1. Connect the gateway to the PC through USB.
  2. Open the command prompt (cmd on Windows or Terminal on the macOS/Linux) and go to the adb folder:
  3. Check the connection of the device by the command:
  4. Run the reset command:
  5. Wait for the process to be completed (the gateway will reboot).

โš ๏ธ Attention: On the gateways Xiaomi with firmware Mi Home OS (Like the Mi Gateway. 3) team wipe_data In this case, use an alternative command:

adb shell am broadcast -a android.intent.action.MASTER_CLEAR

When you need it. ADB-discharge?

SituationIs ADB a good fit?The alternative
Gateway got stuck on the Xiaomi logoโœ… Yes.Reset button (Method 1)
No physical access to the deviceโŒ No.Reset via Mi Home (Method 2)
Firmware error after updateโœ… Yes, if ADB included)Fastboot flashing through Fastboot
Gateway not defined in Mi HomeโŒ No.Reset button + switch-on
What to do if ADB blinds?
1. Check if debugging mode is enabled on the gateway (in the developer settings). 2. Try another one. USB-cable (preferably original). 3. Install the drivers. ADB for your OS (for example, [Google USB Driver](https://developer.android.com/studio/run/win-usb) Windows). 4. Reboot the gateway and PC, then reconnect.

5. Gateway recovery after discharge: step-by-step guide

After resetting, the Xiaomi gateway returns to its "out of the box" state. To get it back to work, follow the following steps:

  1. Add the gateway to Mi Home: Open the Mi Home app โ†’ Add the device โ†’ Choose the Gateway. Follow the instructions on the screen (you need to connect to the temporary Wi-Fi network of the gateway). Choose China (China) - this is important for the correct operation of the sensors!

Update the firmware:

After adding, check for updates in the gateway settings (About the device) โ†’ Update the software. Install the latest version to avoid bugs.

Connect the devices again:

All sensors, lamps and outlets that were tied to the gateway are now displayed as new.Add them via Add device, holding the pairing button on each gadget.

๐Ÿ’ก

To speed up the process, take a photo. QR-You can add gadgets to the Mi Home through scanning. QR hand-shoot.

Set up automation:

All scenarios and rules (for example, if the motion sensor is working, turn on the lights) will have to be created again in the Automation section.

โš ๏ธ Note: If the Aqara Hub gateway doesn't connect to Mi Home after reset, try using the Aqara Home app (the official software for Aqara devices). Some gateway models work better with native software than with Mi Home.

Checklist for checking the efficiency:

โ˜‘๏ธ Checking of the lock after discharge

Done: 0 / 5

6. Frequent errors and their solutions

Even after a successful reset, users face problems, and here are the most common mistakes and ways to fix them:

Mistake.Reason.Decision
Gateway not added to Mi HomeConflict with the routerTurn off 5 GHz Wi-Fi, leave only 2.4 GHz
The indicator flashes red.Error of connecting to Xiaomi serversCheck the internet, reboot the gateway
Devices do not connect to the gatewayReset did not clear the list of conjugated gadgetsReset again (hold the Reset for 20 seconds)
Gateway is constantly rebooting.Damaged firmware.Go through it. ADB or Fastboot

Specific model errors:

  • Mi Gateway 3: After reset, you may need to link to your Mi Account via QR-If QR not scanned โ€“ use manual login/password entry.
  • Aqara Hub M2: When resetting through a button, the settings of the Zigbee network are sometimes reset, in which case all Zigbee devices (sensors, lamps) need to be reconnected.
  • Mi Smart Home Gateway (round): After reset, the LED backlight may not turn on. The solution is to update the firmware to the latest version.

๐Ÿ’ก

If the gateway is unstable after the reset (reboots itself, doesn't hold the connection), it's probably the firmware problem. Try rolling it back to the previous version via the back-end. ADB or go to the service.

7. Alternative methods: when nothing helps

If none of these methods work, radical measures remain, and should only be used in extreme cases, as they require technical skills or risk building the device.

Method 1: Fastboot Flashing

Suitable for Android Things gateways (like Mi Gateway 3)

  • ๐Ÿ“ฅ Official firmware for your model (see forums) 4PDA or Xiaomi.eu).
  • ๐Ÿ–ฅ๏ธ Fastboot utility and drivers for your OS.
  • ๐Ÿ”ง Screwdriver for disassembling the gateway (on some models you need to close contacts to switch to Fastboot mode).

โš ๏ธ Warning: Incorrect firmware can make the gateway inoperable. If you're not sure, you better contact the service.

Method 2: Reset via Telnet console

Some Xiaomi gateways (such as the Aqara Hub) support access over Telnet.

  1. Connect to the lock on IP-Address via Telnet (port 23).
  2. Enter the login/password (often by default) root/admin or).
  3. Follow the command:

Method 3: Contacting a service center

If the gateway fails to respond to reset, fails to turn on, or produces critical errors (such as a Bootloop), self-repairing can exacerbate the problem.

  • Contact the official Xiaomi service (if the device is warranty).
  • Or find a proven service for repairing smart equipment (check reviews on 2GIS or Yandex.Maps).
How to find out IP-gateway address for Telnet connection?
1. Connect the gateway to the router via Ethernet or Wi-Fi. 2. Go to the router's admin panel (usually 192.168.1.1 or 192.168.0.1). 3. DHCP Clients or Connected Devices find the gateway by name (e.g. lumi-gateway). 4. Copy it IP-address for connection via Telnet.

FAQ: Answers to Frequent Questions

Can you reset the Xiaomi gateway without losing your tethered devices?
No. Factory resets will remove all the associated sensors, lights and sockets, and you'll have to reconnect them, and the only way to keep the anchors is to back up Mi Home (not available for all gateway models).
The gateway is off, but it's not connecting to Wi-Fi.
The problem most often involves router settings. Check: Is customer isolation turned off (AP Isolation) on the router. Is the 2.4 GHz network working (Xiaomi gateways do not support 5 GHz). MAC-If nothing helps, try connecting the gateway to another router (e.g., from a mobile phone in access point mode).
How to reset the Aqara Hub gateway if the Reset button doesnโ€™t work?
On Aqara gateways, the Reset button sometimes sticks due to dust. Try: Gently blow the button hole with compressed air. Use a thinner object (like a needle) to press. Hold the button for 30 seconds (some models require long retention). If the button is physically broken, only flashing through the button remains. ADB service-centre.
Once reset, the gateway requires a link to the previous owner's account.
This means that the gateway is still tied to someone else's Mi Account. Solutions: Ask the previous owner to delete the gateway from your Mi Home account. If you can't contact, reset through the service. ADB The following is adb shell am broadcast -a com.xiaomi.smarthome.action.DISCONNECT_ACCOUNT For Aqara gateways, use the Aqara Home app โ€“ there you can sometimes reset the tether without it. ADB.
How long does it take to dump the lock?
Time depends on method: Reset button: 1โ€“2 minutes (plus reset time) Reset via Mi Home: 30โ€“60 seconds. ADB/Fastboot: 5โ€“10 After resetting, adding a gateway to the application and connecting devices may take from 15 minutes to an hour (depending on the number of sensors).