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.
| Model | Type of communication | Need a hub? | Support for voice support | Features |
|---|---|---|---|---|
| Xiaomi Mi Smart Wall Switch (Wi-Fi) | Wi-Fi 2.4 GHz | No. | Google, Alexa, Alice | Simple installation, budget price |
| Aqara D1 (Zigbee) | Zigbee 3.0 | Yes (Aqara Hub) | Google, Alexa, HomeKit | Working without the Internet, low energy consumption |
| Xiaomi Smart Wall Switch Pro | Wi-Fi + Bluetooth | No. | All popular assistants | Touch 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 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:
- Clean the ends of the wires by 5-7 mm.
- Insert phase wire (L) into the corresponding connector (usually marked in red).
- Connect the lamp exit (L1) — This is the wire that went to the old lamp.
- 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?
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.
- Open the Mi Home app and log in.
- Press «+» → «Add the device».
- Select the category "Smart Home» → «Switches».
- 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:
- Open the Yandex application and go to Devices» → «Add the device».
- Select “Xiaomi” and log in through your Mi Home account.
- 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:
- Click + → Set up the device → Have there already been devices?
- Select Xiaomi Mi Home and sign in to your account.
- Select the devices for synchronization.
Integration with Home Assistant
For advanced users:
- Install the Xiaomi Miio component via HACS or manually.
- Add configuration.yaml: miio: devices: - host: IP_token address: YOUR_TOKEN
- Get token with Mi Home Token Extractor.
Once set up, the switch will be available in the Home Assistant interface to create complex automations.
| Assistant | Need a hub? | Supported teams | Limitations |
|---|---|---|---|
| Yandex Alice | No. | On/off, brightness (if supported) | Not all models are compatible. |
| Google Assistant | No. | On/off, scripts | Requires a binding account Mi |
| Amazon Alexa | No. | On/off, device groups | It only works with Wi-Fi models. |
| Home Assistant | No (but you need a token) | Full control. + automation | A 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:
- Reboot the router.
- Update the switch firmware through Mi Home.
- 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:
- 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!
- Don't use the twists to connect the wires. Just the plugs or the soldering.
- 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.
- Do not install smart switches in wet rooms (bathroom, bath) without protection from moisture (IP44 higher).
- 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).