Forgot to close the tap, burst the pipe or leak boiler β the consequences of water leakage in the apartment can turn into repairs for hundreds of thousands of rubles. the water leak sensor from Xiaomi solves this problem for pennies: a device the size of a coin quickly detects moisture and sends a notification to the smartphone, and in conjunction with the electric valve even blocks the water automatically. But how does this gadget work? Why does it respond to drops but ignores the humidity? And why some users complain of false positives?
In this article, we will examine how Xiaomiβs water leak sensor works at the circuitry and sensor level, explain how it interacts with the Mi Home or Home Assistant hub, and show you how to install it correctly to avoid errors. And compare the Aqara Water Leak Sensor and MiJia Honeywell models to make sure you choose the best option for your smart home system.
How is the sensor of water leakage Xiaomi: analysis of the design
On the outside, Xiaomi's water leak sensor looks like a compact white tablet with contacts on the underside, but inside it hides a whole system that analyzes not only the presence of water, but also its conductivity.
- π Battery CR2032 β provides autonomous work up to 2-3 years (depending on the frequency of surveys by the hub).
- π‘ ZigBee radio (or Bluetooth) LE in models for Mi Home β transfers data to the gateway or directly to the smartphone.
- π§ Humidity sensor β a pair of contacts on the bottom panel that close when water enters.
- π οΈ Microcontroller β processes sensor signals and manages communication with the hub.
The key thing is that the sensor doesn't respond to the water itself, it responds to the electrical conductivity of the water, and when the fluid hits the contacts, there's a current between the contacts that the chip picks up, which allows the device to ignore the dust or high humidity (like in a bath after a shower), but to reliably fire even with minimal water.
Importantly, cheap analogues often use simple mechanical sensors that can falsely trigger condensation, and Xiaomi and Aqara use digital signal processing to reduce errors.
Principle of operation: how the sensor detects a leak
The algorithm of the water leak sensor can be divided into 4 stages:
- Water detection. Liquid gets to the contacts by closing the circuit. The microcontroller detects the change in resistance.
- Signal analysis: The device checks if it is a false alarm (e.g. from splashes or condensation) and uses a noise filtering algorithm in Aqara models.
- Notification: The sensor sends a signal to the gateway (Xiaomi Gateway, Aqara Hub or Home Assistant) via ZigBee or Bluetooth.
- System response: The hub transmits a push notification to the smartphone and/or activates associated devices (e.g., an electric valve to block water).
The device's reaction time is 1-3 seconds from the moment water hits the contacts, which is critical for preventing flooding: for example, when a flexible liner breaks to the mixer, each second of delay increases the damage.
Interesting fact: Xiaomi sensors can work not only with water, but also with other electrically conductive fluids (for example, with antifreeze in the heating system), but they are not suitable for oils or alcohol-containing solutions because of the low conductivity of the sensor will not detect them.
π‘
If the sensor is triggered for no apparent reason, wipe the contacts with alcohol - sometimes they remain salt deposits from dried water, which create a false signal.
Compatible with smart home systems: Mi Home vs Home Assistant
Xiaomiβs water leak sensors support two main ways to connect:
| Parameter | Mi Home (official LA) | Home Assistant (Castom Firmware) |
|---|---|---|
| Protocol of communication | Bluetooth LE (MiJia) or ZigBee (Aqara) | ZigBee (requires a coordinator, such as Sonoff ZBDongle) |
| Required hub | Xiaomi Gateway or Aqara Hub | Any ZigBee Coordinator (CC2531, ConBee II, etc.) |
| Automation | Limited by the logic of Mi Home | Flexible scenarios using Node-RED or YAML |
| Local work. | No (depends on Xiaomi cloud) | Yes (all data is processed locally) |
The main difference is cloud dependency. In Mi Home, all notifications go through Xiaomi servers, so when you turn off the Internet, you will not receive a leak signal. In Home Assistant, the sensor works locally, but requires additional settings of the ZigBee network.
For maximum reliability, we recommend combining both approaches: using Home Assistant for local automation (for example, blocking water through the Aqara E1 valve), and Mi Home for backup notifications to your smartphone.
How to connect the sensor to Home Assistant without a Xiaomi hub?
Step-by-step: how to install and configure the sensor
The water leak sensor takes no more than 5 minutes to install, but there are a few nuances that affect its reliability.
- Select the installation site. Optimal points: πΏ Under the sink or sink (near the siphon). π½ Behind the toilet (where water is brought to the tank). π₯ Near the boiler or washing machine. π In a niche with risers of cold / hot water.
Prepare the surface.
Install the sensor.
Connect to the hub
- In Mi Home: Open the app β Add the device β select the Water Leak Sensor β press the button on the sensor.
- In Home Assistant: Put the coordinator in pairing mode and hold the button on the sensor for 5 seconds.
- Set up notifications. In Mi Home, create automation: If the sensor detects water β Send a notification to the phone.
Make sure the indicator on the sensor flashes when you press the button |
Check the connection with the hub (in Mi Home, the device should be displayed as "Online")|
Test the trigger by dripping water on the contacts |
Set up a backup notification channel (for example, SMS through IFTTT)-->
β οΈ Warning: Do not install the sensor in areas where splashes are possible without real leakage (for example, near a shower watering area), this will lead to false positives.
False positives: why the sensor is wrong and how to fix it
Even the most reliable sensors sometimes give false signals, and let's look at the typical causes and ways of addressing them:
| Reason. | Signs. | Decision |
|---|---|---|
| Condensation on contacts | It works after a hot shower or drying laundry | Move the sensor away from steam sources or use a condensate-protected model (e.g. Aqara T1) |
| Salt deposits | Sensor operates without water, contacts covered with white coating | Wipe the contacts with a cotton swab soaked in vinegar or alcohol |
| Interference from other devices | The triggers occur at night or when a particular technique is turned on. | Check the ZigBee channel in the hub settings and change it if there is an overlay with Wi-Fi |
| Battery discharged | The sensor periodically shuts down or sends erroneous data. | Replace the CR2032 battery (lifespan 2-3 years) |
If the problem repeats, check the ZigBee signal strength in the Mi Home or Zigbee2MQTT application. A weak signal (below -90 dBm) can cause data transmission errors. In this case, add a ZigBee repeater to the network (for example, Xiaomi Smart Plug or Aqara Range Extender).
π‘
False positives are most often due to external factors (humidity, interference) rather than sensor malfunction.
Xiaomi MiJia vs Aqara Water Leak Sensor
Xiaomi offers two main variants of water leakage sensors: MiJia Honeywell (Bluetooth) and Aqara Water Leak Sensor (ZigBee).
- πΆ Communication Protocol: MiJia: Bluetooth LE β It only works with Xiaomi Gateway or directly with your smartphone (limited range). Aqara: ZigBee - more stable communication, compatibility with Home Assistant and other hubs.
- π Autonomy: MiJia: the battery is enough ~2 years (frequent Bluetooth polls drain it faster) Aqara: up to 3-4 years thanks to energy-efficient ZigBee.
- π‘οΈ False positive protection: MiJia: basic protection, can respond to condensate. Aqara: improved filtering algorithm, works better in wet rooms.
- π° Price: MiJia: ~500-700 rubles. Aqara: ~900-1200 rubles (but there are often discounts in the official store).
β οΈ Note: If you already have a Xiaomi ecosystem on Bluetooth (like door or temperature sensors), MiJia will be a budget solution. For a serious smart home system with automation, you should choose Aqara on ZigBee β it is more reliable and flexible in setting up.
Advanced scenarios: how to automate the reaction to a leak
A simple notification to the phone is the bare minimum, and the real power of the leak sensor is revealed in conjunction with other devices.
- π° Automatic water overlapping: when the sensor is activated, an electric valve (e.g., Aqara) E1) Condition: The leakage sensor. = "Found" β Action: Valve E1 = "Close it".
- π Sound alarms. Connect a smart speaker to the script. - Xiaomi Mi AI Speaker or siren (Aqara Alarm) to alert household members with a loud sound.
- πΉ If the leak occurred while you were away, the camera (Xiaomi Mi Home Security Camera) will take a picture or start recording to record the leak.
- π± Notification to neighbors. You can set up a shipment via Home Assistant. SMS Calling your neighbors (if you trust them with your apartment keys).
Example of code for Home Assistant (automations.yaml file):
Alias: βWater leakage β emergency measuresβ
trigger:
- platform: state
entity_id: binary_sensor.aqara_water_leak_sensor
to: "on"
action:
- service: switch.turn_off
entity_id: switch.aqara_e1_valve #Close the water
- service: notify.mobile_app_iphone
data:
message: "β οΈ Water leak detected! Water blocked."
- service: media_player.volume_set
data:
volume_level: 0.7
target:
entity_id: media_player.xiaomi_speaker
- service: tts.google_translate_say
data:
message: "Attention! Water leak. Check the plumbing immediately."
target:
entity_id: media_player.xiaomi_speakerTo implement such scenarios in Mi Home you will have to use workarounds (for example, IFTTT or Yandex Alice), as standard automation is limited.