How Xiaomiโ€™s Wireless Button Works: Principle of Action, Customization and Application in a Smart Home

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.

๐Ÿ“Š What Xiaomi button do you use?
Aqara Mini Switch
MiJia Wireless Switch
Opple 6-Button
Another model
I haven't bought it yet.

2.The principle of operation: how the button transmits signals

The algorithm of the Xiaomi wireless button can be broken down into 4 stages:

  1. 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.
  2. 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.
  3. 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.
  4. 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?
There are several reasons: - Hub is out of range (maximum 10-15 meters in a room with obstacles). - Interference at 2.4 GHz from Wi-Fi routers or microwaves. - Battery is discharged (even if the indicator in the application shows 20%, contact may be broken). - The button is not tied to the hub (for example, after resetting settings).

3. Compatibility with smart homes: what can be connected

Xiaomiโ€™s wireless buttons support integration with multiple ecosystems, but there are nuances:

EcosystemSupported button modelsNeed a hub?Limitations
Mi HomeAll models (Aqara, MiJia, Opple)Yes (Mi Home Gateway or Aqara Hub)It operates only in regions with official support (China, Europe, Russia).
Aqara HomeAqara buttons (Mini Switch, Opple)Yes (Aqara Hub)More stable than Mi Home, but fewer supported devices.
Home AssistantAll models with ZigbeeYes (Zigbee-dongle, for example Sonoff or the likes of the squirrel). CC2531)Requires manual adjustment YAML-Configs for complex scenarios.
Google Home / AlexaOnly 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: 22

Such scenarios will require:

  1. Install Home Assistant on the Raspberry Pi or NAS.
  2. Connect Zigbee-dongle (e.g. Sonoff Zigbee 3.0)
  3. 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 causeDecision
The button doesn't connect to the hubThe 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 signalAdd a repeater (like Xiaomiโ€™s smart lamp)
The button works on its own.Interference from other 2.4 GHz devicesChange the Zigbee channel in the hub settings
Double/Triple Presses are not workingPressing too slowlyThe interval between the pressings should be โ‰ค 0.5 sec.
Hub doesn't see button after resetThe button is still tied to the old hub.Reset the hub to factory settings

If the button does not respond to the press, try:

  1. Replace the battery (even if it is new, marriage is possible).
  2. Check the integrity of the body โ€“ sometimes cracks disrupt the contacts.
  3. 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:

  1. Create an applet in IFTTT with the Xiaomi Button Press trigger.
  2. As an action, select Spotify. โ†’ Play a Playlist.
  3. Specify the playlist and playback device (e.g. Google Nest Mini).

FAQ: Answers to Frequent Questions

Can I use the Xiaomi button without a hub?
Officially, no, because the buttons are Zigbee protocol, which requires a gateway, but there are workarounds: For Bluetooth models (such as the Mijia Bluetooth Wireless Switch), you can connect directly to your smartphone, but the functionality will be limited. + Zigbee-dongle (for example, CC2531) You can do without the original Xiaomi hub. Without the hub, the button will not be able to control other devices (lamps, sockets), but can send notifications to the phone.
How to increase the range of the button?
Zigbee signal range can be improved in several ways: Add signal repeaters โ€” any Zigbee devices connected to the network (such as Xiaomi smart lamps or motion sensors). Place the hub higher (on the closet or wall) โ€” this reduces furniture interference. Use directional antennas for Zigbee (sold separately); Change the Zigbee channel in the hub settings (the 11th is used by default, which is often overloaded); Maximum range in ideal conditions is up to 100 meters, but in a concrete-walled apartment the real radius rarely exceeds 10-15 meters.
Why does the button discharge so quickly?
Battery life (CR2032) Depends on the intensity of use: ๐Ÿ”‹ Normal consumption: 1-2 years with 10-20 presses per day. โšก Accelerated discharge occurs if: The button is in the jamming zone (constantly trying to reconnect to the hub); a cheap low-capacity battery is used; the button is set to hold (constant signaling drains the battery in a few months). Use Panasonic or Duracell batteries and check the signal level in the Mi Home app (Device Status sectionยป).
Can I reassign the button actions after updating the firmware?
Yes, but there are nuances: In Mi Home, after updating the hub or button firmware, user scripts are sometimes reset. They need to be reconfigured. In Home Assistant, the action-based buttons are retained, but you may need to restart the system. If the button stops working after updating, try: Remove and add it to the app again. Reset the hub to factory settings (last resort).
What is the most reliable Xiaomi button for a smart home?
The choice depends on the tasks: ๐Ÿ† For basic scenarios: Aqara Mini Switch is compact, cheap, reliable. ๐ŸŽ›๏ธ For complex automation: Aqara Opple 6-Button Switch โ€” 6 Programmable buttons, support for retention and double presses. ๐Ÿ”‹ For battery life: Xiaomi MiJia Bluetooth Wireless Switch โ€“ does not require a hub (but limited functionality). ๐Ÿ’ฐ Premium: Aqara Cube is a cube-like button that responds to twists and shaking. For most users, the best choice is the Aqara Mini Switch (nearby the top of the table). 1000โ€“1500 โ‚ฝ). It's compatible with all hubs. Xiaomi/Aqara It has a minimalist design.