Xiaomiβs smart switches (the Aqara and Mijia series) allow you to control lighting from your smartphone, voice or automatically β but installing them often raises questions. Unlike classic switches, it requires not only the right wire connection, but also the settings in the Mi Home ecosystem or third-party platforms like Home Assistant. Errors at any stage can lead to idle buttons, flashing lamps or even short circuits.
This article includes step-by-step connectivity for single- and two-key models (including the Aqara H1, Mijia Smart Wall Switch), a breakdown of typical issues (such as why the switch is not identified in the application), and ways to integrate with other smart home devices. Particular attention will be paid to compatibility with dimmable lamps and the features of working through a neutral wire - these are key points that the manufacturer often misses in the instructions.
What Xiaomi switches are and how they differ
Xiaomiβs line of smart switches includes models with different capabilities and types of connection, the main differences are in the number of keys, support for neutral wire and communication protocols.
The most popular models:
- πΉ Aqara Smart Wall Switch H1 (Single/Dual Rocker - supports Zigbee 3.0, Neutral wire, compatible with HomeKit via Aqara hub M2.
- πΉ Mijia Smart Wall Switch (Wi-Fi) β runs on 2.4GHz Wi-Fi, does not need a hub, but depends on network stability.
- πΉ Aqara D1 β Budget version without neutral wire (suitable for older homes), but with limited functionality.
- πΉ Xiaomi Mi Smart Wall Switch (Zero Firewire) β for systems without neutral, uses phase as a power source.
The key to choosing is the presence of a neutral wire in the switchboard. If it is not (typical for Soviet-built houses), only models marked No Neutral (for example, Aqara D1) will work. Also note the maximum load: most Xiaomi switches are designed for 10A/2200W, but powerful lights (for example, searchlights) may require additional relays.
Preparation for installation: safety tools and equipment
Before installation, be sure to turn off the power on the panel β even if you are an experienced electrician. Xiaomi smart switches are sensitive to voltage surges, and an improper connection can disable both the device itself and the connected lamp.
You'll need:
- π§ Indicator screwdriver (to check the absence of voltage).
- π§ Flat/cross screwdriver (depending on the switch model).
- π§ Bokoreka or stripper (to clean wires).
- π§ Tester or multimeter (optional, to check the circuit).
- π§ Insulation or terminal pads (if the wires are short or oxidized).
β οΈ Note: If your home has aluminum wiring, use terminal pads WAGO β They prevent contact oxidation. Directly twisting aluminum with copper (which is used in Xiaomi switches) leads to overheating and fire.
Also prepare:
- π± Smartphone with Mi Home app installed (for Aqara β Aqara Home).
- πΆ Stable Wi-Fi connection 2.4 GHz (for Wi-Fi models) or hub Xiaomi/Aqara (for Zigbee).
- π Backup power source (e.g. Power Bank) β in case you have to reset the switch settings.
Check for neutral wires (if required)
Turn off the power on the shield.
Prepare tools (screwdrivers, bokrez, tester)
Install the Mi Home/Aqara Home app
Take a picture of the current connection scheme (in case of rollbacks)-->
Connection schemes: single key vs two-key switch
The connection scheme depends on the number of keys and the presence of a neutral wire. Below are the typical options for the Xiaomi Aqara and Mijia models.
Single-key switch (with neutral)
The simplest scheme, suitable for most modern homes.
- Phase (L) β terminal L on the switch.
- Neutral (N) β terminal N.
- Exit to the lamp (L1) β terminal L1.
- Earth (PE) β if present, to the terminal β.
Two-key switch (with neutral)
Similar to the single-key, but with two output terminals (L1 and L2).
- π Both lamps (or groups of lamps) must be connected to different lamps. L1/L2.
- π The load power on each key should not exceed 10A.
Non-neutral switch (e.g. Aqara D1)
In this case, the power is taken from the phase through the built-in capacitor.
- Phase (L) β terminal L.
- Exit to the lamp (L1) β terminal L1.
- Neutral (N) β does not connect (but should be isolated!).
| Switch model | Neutral? | Max, load. | Protocol | Compatibility with HomeKit |
|---|---|---|---|---|
| Aqara H1 (Single Rocker) | Yes. | 10A/2200W | Zigbee 3.0 | Yeah (through hub) |
| Mijia Smart Wall Switch (Wi-Fi) | Yes. | 10A/2200W | Wi-Fi 2.4 GHz | No. |
| Aqara D1 (No Neutral) | No. | 5A/1100W | Zigbee 3.0 | Yeah (through hub) |
| Xiaomi Mi Smart Wall Switch (Zero Firewire) | No. | 8A/1760W | Wi-Fi 2.4 GHz | No. |
β οΈ Note: If you connect dimmable lamps (e.g. Yeelight), use a light switch that supports brightness control (e.g. Aqara) H1 Normal relay switches may cause flickering or breakage LED-lamp.
Step-by-step instructions for installation and configuration
The installation consists of two stages: physical connection and software configuration. Let's look at both in detail.
Step 1: Installation of the switch
- Turn off the electricity on the shield and check the lack of voltage with the indicator screwdriver.
- Remove the old switch by disconnecting the wires, remember or photograph which wire went where (especially if there is no color marking).
- Connect the wires to the new switch according to the circuit (see section above). Use terminal pads for reliability.
- Fix the switch in the rosette, making sure that the wires are not clamped and do not touch metal parts.
- Turn on the electricity and check if the indicator on the switch (if any) has caught fire.
Step 2: Set up in Mi Home/Aqara Home
- Open the Mi Home app (or Aqara Home for Zigbee devices) and click Add Device (+).
- Select the switch category and a specific model (e.g. Aqara Wall Switch H1).
- Follow the instructions on the screen: π For Wi-Fi models: connect to the switch temporary network (type name) Xiaomi_XXXX) and go back to the app. π‘ For Zigbee models: Make sure the hub (Aqara Hub) is on and in pairing mode.
Press and hold the button on the switch until the beep (or flash of the indicator) is sounded.
Wait until the setup is complete. Assign a name (e.g., the Light Kitchen) and a room to the switch.
What if the switch is not detected in the application?
Integration with a smart home: Home Assistant, Google Assistant, Siri
Xiaomi switches can be controlled not only through Mi Home, but also through other platforms.
1. Connect to Home Assistant
For integration with Home Assistant:
- Install the Xiaomi Miio component (for Wi-Fi models) or ZHA/Zigbee2MQTT (for Zigbee).
- Add the device to the configuration.yaml: switch: - platform file: xiaomi_miio name: "Xiaomi Wall Switch" host: 192.168.1.100 # IP-token-switch: "YOUR_TOKEN" # Get it through Mi Home Token Extractor
- Reboot Home Assistant and check for the appearance of the entity switch.xiaomi_wall_switch.
β οΈ Note: If you use fluorescent lamps (e.g. T8), they may not catch fire due to low initiation current, in which case you will need a starter module or a replacement for the light. LED-analogue.
For compatibility testing:
- Connect the lamp directly to the network (without a switch) and check its operation.
- Set the switch and observe the behavior of the lamp for 5-10 minutes.
- If the lamp flashes, try adding a 0.1 ΞΌF/400V capacitor in parallel to the load.