Xiaomi's wireless buttons are some of the most versatile devices in the smart home ecosystem. They look like compact 1-3-key remotes, but they can actually control dozens of scenarios, from turning on the lights to running a robot vacuum cleaner. But many users are faced with the question: how exactly does this button work without wires? What protocols does it use? And why does it sometimes refuse to follow commands?
In this article, we will take a closer look at how Xiaomiโs wireless buttons (including the Aqara and MiJia models), their technical features, and give step-by-step instructions on how to connect and configure, and focus on hidden features that are not mentioned in official manuals โ such as how to make the button work without a hub or integrate it with Google Home via workarounds.
1. Technical specifications: what is inside the wireless button Xiaomi
Externally, Xiaomi buttons look simple, but their โstuffingโ includes several key components:
- ๐ถ Wireless module: most models (e.g. Xiaomi MiJia Wireless Switch or Aqara Mini Switch) run on the Zigbee protocol (standard) IEEE 802.15.4 is a low-energy protocol with a range of up to 10-20 meters indoors, which requires a hub (gateway) to communicate with the cloud.
- ๐ Power supply: Depending on the model, it can be a removable battery CR2032 (1โ2 year life) or built-in battery with charging USB-C (For example, in Aqara Opple. 6-Button Switch).
- ๐ Microcontroller: handles the presses and sends the hub signals. Budget models use a chip EFR32MG from Silicon Labs, in premium โ proprietary solutions Xiaomi.
- ๐ก๏ธ Protection against false positives: a vibration sensor or accelerometer that distinguishes deliberate pressing from accidental button drop.
It is important to understand that Zigbee buttons do not work directly with Wi-Fi. They need an intermediary โ a hub (for example, Xiaomi Mi Home Gateway, Aqara Hub or Home Assistant with Zigbee-dongle), except for models with Bluetooth Mesh support (for example, Xiaomi Mijia Bluetooth Wireless Switch), which can connect directly to a smartphone, but their functionality is limited.
2.The principle of operation: how the button transmits signals
The algorithm of the Xiaomi wireless button can be broken down into 4 stages:
- Press logging: When you physically press a button, the contact group is triggered, and the microcontroller records the event. Multi-button models (such as the Aqara Opple) determine which key was pressed.
- Data packet generation: The controller packs information into a Zigbee (or Bluetooth) packet, including a unique button identifier (MAC-address), event type (single/double press, hold) and battery status.
- Signal transmission: the packet is sent to the nearest hub via radio. The Xiaomi ecosystem uses 2.4 GHz (channels 11-26), which can interfere with a large number of Wi-Fi devices.
- Command processing: the hub receives the signal, decodes it, and performs a related action (turns on the light, sends a notification, etc.) If the hub is turned off, the button will not work even if the battery is charged.
Zigbeeโs feature is support for mesh networking, which means that the button signal can be transmitted through other Zigbee devices (such as sensors or lamps), increasing the range, but for this, all devices must be connected to the same hub.
Why does the button sometimes not work?
3. Compatibility with smart homes: what can be connected
Xiaomiโs wireless buttons support integration with multiple ecosystems, but there are nuances:
| Ecosystem | Supported button models | Need a hub? | Limitations |
|---|---|---|---|
| Mi Home | All models (Aqara, MiJia, Opple) | Yes (Mi Home Gateway or Aqara Hub) | It operates only in regions with official support (China, Europe, Russia). |
| Aqara Home | Aqara buttons (Mini Switch, Opple) | Yes (Aqara Hub) | More stable than Mi Home, but fewer supported devices. |
| Home Assistant | All models with Zigbee | Yes (Zigbee-dongle, for example Sonoff or the likes of the squirrel). CC2531) | Requires manual adjustment YAML-Configs for complex scenarios. |
| Google Home / Alexa | Only through the detours (IFTTT, Home Assistant) | Yes. | Limited functionality (for example, you can not configure double pressing). |
To connect to Google Home or Amazon Alexa, you will need to use intermediate services such as IFTTT Or a Home Assistant. You can create an applet in a computer. IFTTT, And it's a light bulb that, when you press a button, it's going to request that you turn on the Yeelight smart lamp, but it's going to last 1 to 3 seconds.
๐ก
If you use Home Assistant, add zha to your config: or zigbee2mqtt: This allows you to assign different actions to single, double press and hold.
4. Step-by-step instructions: how to connect the button to the Mi Home
Connecting a button to the Mi Home app takes no more than 5 minutes, but there are critical moments that are often missed:
Make sure the hub (gateway) is on and connected to Wi-Fi|Check the battery charge in the button (if removable)|Place the button at a distance of no more than 1 meter from the hub at the time of setting up|Close all third-party apps that may use Bluetooth-->
Step 1. Open the Mi Home app, go to Devices section โ Add the device and select the "Switches" category. In the list, find your button model (e.g., Aqara Wireless Mini Switch).
Step 2. Press and hold the button on the device for 5 seconds until the indicator flashes blue (for models with an indication). If there is no indicator, just hold the button until the beep (beep).
Step 3: Wait for the app to find the device and confirm the add-on. Give the button a name (e.g., "Door button") and select a room.
Step 4: Configure the actions for the button. From the device menu, select Automation โ Add a script. You can assign it here:
- ๐ Single press - turn on the light.
- ๐๐ Double press - start the robot vacuum cleaner.
- ๐๐๐ Triple pressing โ activate the No-Home modeยป.
- ๐ (hold) - turn on the nightlight for 30 seconds.
๐ก
If the button is not a hub, try resetting it to factory settings: hold the button for 10-15 seconds until the indicator blinks quickly (3 times).
5 Extended scenarios: what can be automated
The standard button functions, lights on/off, are just the tip of the iceberg, and smart scenarios can help you implement complex chains of action:
- ๐ช Simulating presence: pressing a button at the door turns on the light in random mode (via Home Assistant), creating the effect that someone is at home.
- ๐ต Music scripts: Double tap launches playlist on Xiaomi Mi Speaker or Google Nest.
- ๐ Energy saving: Holding the button turns off all non-critical devices (lamp, TV, sockets) on schedule.
- ๐ฑ Notifications: Click sends a message to Telegram or SMS (through IFTTT) with the text โHelp is needed!ยป.
An example of a difficult scenario for Home Assistant:
automation:
Alias: "Bedside button - Goodnight mode"
trigger:
platform: device
device_id: [ID_your buttons
domain: zha
type: remote_button_short_press
subtype: turn_on
action:
- service: light.turn_off
target:
entity_id: light.all_lights
- service: media_player.turn_off
target:
entity_id: media_player.tv
- service: climate.set_temperature
target:
entity_id: climate.bedroom
data:
temperature: 22Such scenarios will require:
- Install Home Assistant on the Raspberry Pi or NAS.
- Connect Zigbee-dongle (e.g. Sonoff Zigbee 3.0)
- Integration with Mi Home through HACS (Home Assistant Community Store).
๐ก
Use Node-RED to visually create complex scenarios, which makes it easier to work with conditions (e.g., โif you press between 22:00 and 6:00, turn on the nightlight at 50% brightnessโ).
Frequent problems and their solutions
Even the devices that are tested have failures.-5 Xiaomi wireless button problems and how to fix them:
โ ๏ธ Attention: If the button is no longer responsive to the presses, but the indicator flashes, check the contact density of the battery. Often the problem lies in oxidized contacts - wipe them with alcohol.
| Problem. | Possible cause | Decision |
|---|---|---|
| The button doesn't connect to the hub | The hub is overloaded (more than 30 devices) | Turn off some of the devices and try again. |
| Delayed response (more than 2 seconds) | Zigbee's weak signal | Add a repeater (like Xiaomiโs smart lamp) |
| The button works on its own. | Interference from other 2.4 GHz devices | Change the Zigbee channel in the hub settings |
| Double/Triple Presses are not working | Pressing too slowly | The interval between the pressings should be โค 0.5 sec. |
| Hub doesn't see button after reset | The button is still tied to the old hub. | Reset the hub to factory settings |
If the button does not respond to the press, try:
- Replace the battery (even if it is new, marriage is possible).
- Check the integrity of the body โ sometimes cracks disrupt the contacts.
- Connect the button to another hub (e.g., Aqara Hub, if the Mi Home Gateway was previously used).
โ ๏ธ Note: Xiaomi buttons with Bluetooth Mesh protocol (such as Mijia Bluetooth Wireless Switch) can conflict with other Bluetooth devices (earphones, fitness bracelets.
7. Alternative uses
Xiaomiโs wireless buttons can be adapted to non-standard tasks that go beyond the smart home:
- ๐ฎ Game controller: With the help of Home Assistant and Hass.Agent plugin, the button can be attached to keys on the PC (for example, to run a game or macro).
- ๐ธ Photo/video remote: pressing a button can start shooting on a smartphone via Tasker + AutoInput.
- ๐ Control: If the car has Android Auto installed, the button can be programmed to start the navigator or open the trunk (via the car). IFTTT + Google Assistant).
- ๐ In-store alert: place a button on the shelf โ clicking will signal that the product is running out (integration with Google Sheets).
Such scenarios will require:
- Smartphone with Android 8.0+ iOS 13+.
- Automation applications: Tasker, Shortcuts (iOS), n8n.
- Cloud services: IFTTT, Zapier, Google Scripts.
Example of setting up a button to start Spotify:
- Create an applet in IFTTT with the Xiaomi Button Press trigger.
- As an action, select Spotify. โ Play a Playlist.
- Specify the playlist and playback device (e.g. Google Nest Mini).