How to connect a smart switch Xiaomi: full instructions with schemes and life hacks

Xiaomi smart switches are one of the most popular elements of the smart home system, which allows you to control lighting from your smartphone, voice or schedule. But their installation often raises questions: how to connect wires correctly, configure work with Mi Home or Home Assistant, avoid installation errors?

We'll look at not only basic models like the Xiaomi Mi Smart Wall Switch, but also more advanced versions that support Zigbee or Wi-Fi, and we'll also look at common problems that users face, such as why the switch might not respond to commands once connected, or how to bypass regional restrictions in the Mi Home app. If you've never worked with wiring, don't worry: we'll give you step-by-step diagrams with photos and explanations for beginners.

What Xiaomi Smart Switch Models Are and How They Differ

Xiaomi has several lines of smart switches that differ in connection type, design and functionality.

  • 🔌 Mi Smart Wall Switch (Wi-Fi) – basic models with a connection via a home router. Support management via Mi Home, Google Assistant and Alexa. Examples: Xiaomi Mi Smart Wall Switch (No Neutral) for homes without zero wire.
  • 📡 Aqara Smart Wall Switch (Zigbee) - run through the Aqara Hub, more stable and energy efficient. D1, Aqara H1 (matter-supported).
  • ⚡ Xiaomi Smart Wall Switch Pro – premium versions with touch control, backlighting and advanced automation scenarios.

The main difference is the type of communication: Wi-Fi models are easier to set up, but depend on the stability of the router, and Zigbee devices require the purchase of a hub, but work without the Internet and do not load the network. It is also important to pay attention to the presence of zero wire in your wiring: some models (for example, Mi Smart Wall Switch No Neutral) are designed for homes with old electricity, where the zero wire is not connected to the switch.

ModelType of communicationNeed a hub?Support for voice supportFeatures
Xiaomi Mi Smart Wall Switch (Wi-Fi)Wi-Fi 2.4 GHzNo.Google, Alexa, AliceSimple installation, budget price
Aqara D1 (Zigbee)Zigbee 3.0Yes (Aqara Hub)Google, Alexa, HomeKitWorking without the Internet, low energy consumption
Xiaomi Smart Wall Switch ProWi-Fi + BluetoothNo.All popular assistantsTouch control, lighting, Matter support

When choosing, also consider the maximum load: most household switches are enough 10A (2200 W), but for powerful chandeliers or heaters, you may need a model on 16A.

📊 What type of smart switch you plan to install?
Wi-Fi (no hub)
Zigbee (with Aqara hub)
I don't know, I need help with my choice.
Another brand has already been installed.

What you will need to install: tools and preparation

Before you start, make sure you have everything you need.

  • 🔧 Screwdriver-indicator (to check the voltage).
  • ⚡ Screwdriver cross/flat (depending on the mounts of the switch).
  • 📏 Multimeter (optional, to check the circuit).
  • 🔌 Crunch terminals or tape (if the wires are short).
  • 📱 Smartphone with Mi Home or Aqara app.

Also prepare a connection scheme (you can find it in the instructions for the switch or download from the official Xiaomi website). If you are not sure about your electrical skills, it is better to invite an electrician - errors in connection can lead to a short circuit or failure of the device.

Turn off the power on the shield.

Check the absence of voltage indicator

Take a picture of the current connection scheme

Prepare tools and a new switch

Install the Mi app Home/Aqara-->

⚠️ Note: If your house has aluminum wiring and the switch has copper contacts, use special terminals to connect different metals. Direct twisting of aluminum and copper leads to oxidation and overheating!

Before dismantling the old switch, take a picture of how the wires are connected, which will help avoid confusion when installing a new one.

  • 🟢 Black/white - access to the lamp (L1).

Step-by-step: how to connect Xiaomi smart switch to the electric network

Consider a universal connectivity scheme, using the Xiaomi Mi Smart Wall Switch (Wi-Fi). If you have a model with Zigbee, set up the Aqara Hub first (instruction below).

Step 1: Turn off the electricity and remove the old switch

Turn the lever on the power panel to the "Off" position and check for no voltage with the indicator screwdriver. Remove the keys from the old switch (plug them with a screwdriver on the side) and unscrew the fasteners. Gently pull the mechanism out of the rosette without damaging the wire.

Step 2: Connecting the wires to a new switch

On the back of Xiaomi's smart switch, there's a contact marking. Standard diagram:

  • L is phase (entry).
  • L1 — phase (exit to the lamp).
  • N = zero (if required by the model).

Connect the wires according to the scheme:

  1. Clean the ends of the wires by 5-7 mm.
  2. Insert phase wire (L) into the corresponding connector (usually marked in red).
  3. Connect the lamp exit (L1) — This is the wire that went to the old lamp.
  4. If the model requires zero wire (N), plug it in (usually blue).

Important: In homes with old wiring, zero wire may not be in the switch box, in which case, choose models marked “No Neutral” (for example, Xiaomi Mi Smart Wall Switch No Neutral).

What to do if there is no zero wire?
If your model requires zero and it is not in the box, there are two options: 1. Lay a zero wire from the junction box (requires wall slabs). 2. Buy a switch marked "No Neutral" - it works without zero, but may have functional limitations (for example, will not display the current state of the lamp in the application).

Step 3: Install the switch in the subparticle

Carefully sink the wires into the rosette so they don't interfere, and secure the mechanism with screws. Make sure the body is not skewed. Then install a decorative frame and keys (if they are removable).

Step 4: Turning on the electricity and checking

Return the power to the switch and check the switch manually (press the key). If the lamp lights up, you can proceed to the setting in the application. If not, turn off the electricity immediately and check that the wires are correctly connected.

💡

Always test the mechanical operation of the switch before the settings in the application. If the lamp does not respond to pressing, then there is a fault in the connection scheme, not in the software.

Setting up a smart switch in the Mi Home app

Once you've successfully connected to the network, you have to set up the device in the Xiaomi ecosystem.

  1. Open the Mi Home app and log in.
  2. Press «+» → «Add the device».
  3. Select the category "Smart Home» → «Switches».
  4. Follow the on-screen instructions: the app will prompt you to connect to the switch’s Wi-Fi network (if the Wi-Fi model) or to the hub (if Zigbee).

For Wi-Fi models:

  • 📶 Connect to the switch network (the name will be in format) Xiaomi_XXXX).
  • Return to Mi Home and select your 2.4GHz home network (Xiaomi smart devices don’t work with 5GHz!).
  • Wait for the configuration to be completed - the switch will appear in the list of devices.

For Zigbee models (such as Aqara):

  • 🔄 Make sure the Aqara Hub is connected to the network and added to the Mi Home.
  • Press the button on the hub to transfer to pairing mode.
  • In the app, select “Add via Hub” and follow the instructions.

⚠️ Warning: If the switch is not in the application, try resetting it to factory settings. To do this, hold the button on the device for 10-15 seconds until the indicator flashes.

After the device has been added:

  • 🏠 Designate a room (such as a “living room” or a “bedroom»).
  • ⚙️ Set up automation (for example, turn off lights by timer).
  • 🗣️ Connect a voice assistant (Alice, Google Assistant, or Alexa).

💡

If the switch appears in the app as "offline," check if the router's firewall is blocking it. MAC-device address on the exclusion list.

Integration with voice assistants and other systems

One of the biggest advantages of Xiaomi's smart switches is that it can control voice, and let's look at how to connect it to popular assistants.

Connection to Yandex Alice

For this:

  1. Open the Yandex application and go to Devices» → «Add the device».
  2. Select “Xiaomi” and log in through your Mi Home account.
  3. Allow access to the devices and wait for synchronization.

Now you can say, "Alice, turn on the light in the living room."

Connecting to Google Assistant

On the Google Home app:

  1. Click + → Set up the device → Have there already been devices?
  2. Select Xiaomi Mi Home and sign in to your account.
  3. Select the devices for synchronization.

Integration with Home Assistant

For advanced users:

  1. Install the Xiaomi Miio component via HACS or manually.
  2. Add configuration.yaml: miio: devices: - host: IP_token address: YOUR_TOKEN
  3. Get token with Mi Home Token Extractor.

Once set up, the switch will be available in the Home Assistant interface to create complex automations.

AssistantNeed a hub?Supported teamsLimitations
Yandex AliceNo.On/off, brightness (if supported)Not all models are compatible.
Google AssistantNo.On/off, scriptsRequires a binding account Mi
Amazon AlexaNo.On/off, device groupsIt only works with Wi-Fi models.
Home AssistantNo (but you need a token)Full control. + automationA complex setup for beginners

Common Mistakes and How to Avoid Them

Even with the right connection, users often face problems.

  • 🔌 The switch does not switch on manually – check the correct connection of phase (L) and the output to the lamp (L1). Maybe the wires are messed up.
  • 📱 The device is not in Mi Home – make sure the router is running at 2.4GHz (Xiaomi smart devices do not support 5GHz.
  • 🔄 The switch works, but the status in the application is not updated, which is typical of models without zero wire (No Neutral.
  • ⚡ Short circuit when switched on -- turn off the power immediately -- most likely, the bare wires are touching each other or the body.

⚠️ Warning: If the switch warms after installation, it is a sign of improper connection or exceeding the maximum load!

Unique feature of Xiaomi switches: some models (for example, Aqara) D1) Supports double-press mode to activate additional scripts, which is configured in the Mi Home app under Automation".

If the device is unstable (unconnected from the network, does not respond to commands), try:

  1. Reboot the router.
  2. Update the switch firmware through Mi Home.
  3. Changing the installation location may be a weak Wi-Fi signal.

5 Rules That Will Save Your Home and Switch

Electricity requires safety, and here are the keys:

  1. Always turn off the power on the shield before work begins. Don't rely on a light switch - it only breaks phase, and zero stays energized!
  2. Don't use the twists to connect the wires. Just the plugs or the soldering.
  3. Check the maximum load of the switch. For example, if the device is designed for 10A (2200 W), do not connect a load to it more than this value.
  4. Do not install smart switches in wet rooms (bathroom, bath) without protection from moisture (IP44 higher).
  5. Use only original hub chargers (if required) and cheap power supplies can cause overheating.

If you're not sure about your skills, you'd better invite a certified electrician. Errors in connection can lead not only to break the switch, but also to a fire.

💡

Before buying, check whether your model supports Matter, a new smart home standard that provides compatibility with devices from different brands (Apple HomeKit, Google Home, Amazon Alexa).

FAQ: Frequent questions about Xiaomi smart switches

Can you connect Xiaomi smart switch without a neutral wire?
Yes, but only special models marked "No Neutral" (e.g. Xiaomi Mi Smart Wall Switch No Neutral) that use leakage current to power electronics, but have limitations: they do not display the current state of the lamp in the application and can work unstablely with the device. LED-low-power.
Why does Xiaomi’s smart switch flash after installation?
This may be due to: Incorrect connection of phase and zero. use of incompatible lamps (for example, dimmables). LED With low-quality drivers, too low load (less than 5 watts) and try plugging in a regular incandescent lamp for the test.
How to reset Xiaomi smart switch to factory settings?
Hold the button on the switch for 10-15 seconds until the indicator flashes quickly (usually red or orange).
Can you control Xiaomi’s smart switch without the internet?
Yes, but with reservations: Wi-Fi models will only work on the local network (for example, through the Mi Home application on the same network with the phone), but will lose access to cloud services (voice control, remote access). Zigbee models (for example, Aqara) work completely autonomously through the hub, even without the Internet.
Which lamps are compatible with Xiaomi smart switches?
They work best: 💡 Filament lamps (any power). 🔆 LED-Lamps with high quality drivers (e.g. Philips, Osram). 🚫 Cheap is not recommended. LED-flicker lamps and dimmable lamps without brightness control. If the lamp flashes or doesn't turn on, try plugging it directly (without the switch) - the problem may be in the lamp itself.