Introduction: why you need a leak sensor and how it saves from floods
Imagine you're away for a weekend, and a pipe bursts at home, and you come back and you find flooded neighbors below, damaged repairs and a damage bill for hundreds of thousands of rubles. Xiaomi's water leak sensor is a compact device that could prevent a disaster by sending you an alarm on your smartphone in the first seconds after the water comes in. But how exactly does it do that?
Unlike traditional mechanical valves, Xiaomiβs smart sensors (Aqara, MiJia or Yeelight series) rely on electronic sensors and wireless communication. They donβt block water on their own (you need a separate valve), but they alert the owner instantly about the problem. In this article, we will discuss the unique feature of Xiaomi sensors β a dual leak detection mechanism (direct contact + capacitive sensor), which reduces the number of false positives to 0.1%.
We'll analyze:
- π The physical principle of the sensor (why it reacts even to steam, not just to liquid).
- π‘ Zigbee vs Bluetooth and their impact on alert speed.
- βοΈ Hidden settings in Mi Home, which the manufacturer does not advertise.
- β οΈ Typical installation errors that cause the sensor to fail at a critical moment.
The sensor device: what is inside and how it works
The case of Xiaomiβs leak sensor (such as the Aqara Water Leak Sensor or MiJia Honeywell) looks simple: a plastic box the size of a credit card, but inside, there are complex electronics:
- π Battery CR2032 β Provides up to 2 years of battery life (with the right settings).
- πΆ antenna Zigbee/Bluetooth β It depends on the model (e.g. Aqara uses Zigbee). 3.0, Yeelight - Bluetooth Mesh).
- π§ Dual sensor: πΉ Contact plates on the underside of the housing (respond to direct conduction of water). πΉ Capacitive sensor (detects a change in the dielectric permeability of air when moisture appears).
- π οΈ Microcontroller β processes sensor signals and sends data to the hub.
The key difference from cheap ones is that Xiaomiβs sensors use a noise filtering algorithm, for example, if dust or condensation hit the sensor, the device will not send a false alert, but will first check the signal stability within 3-5 seconds, which reduces the number of false positives by 90% compared to sensors without such logic.
Interesting fact: In Aqara models, the touch board is coated with a special hydrophobic compound that prevents contact corrosion, which allows the device to work even after direct water intake - just dry it for 2-3 hours.
β οΈ Warning: If Xiaomi sensors are no longer responsive to water, check the integrity of the contact plates. Over time, they may oxidize (especially in high-humidity bathrooms.
Water detection principle: why the sensor is triggered by steam
Many users are surprised when Xiaomi sensors fire not only on puddles, but also on condensation or even steam (for example, in the bathroom after a hot shower).
Let's take a closer look at this.
- π¦ Direct contact: When water closes the two plates on the underside of the sensor, an electric current is generated, which is the most reliable way, but it requires that the water physically touch the sensor.
- π«οΈ Capacitive sensor: measures the change in the dielectric permeability of the medium. Water has a high dielectric permeability (about 80), whereas in air it is close to 1. Even small drops of steam or condensate near the sensor change this indicator, which is what the microcontroller detects.
| Type of operation | Conditions | precision | False positives |
|---|---|---|---|
| Direct contact | Water closes the plates | 100% | 0% |
| Capacity sensor | Humidity >85% or steam within a radius of 1-2 cm | 95% | 5% (condensate, high humidity) |
| Combined | Both sensors confirm leakage. | 99.9% | 0.1% |
The Aqara and MiJia models use a combined logic: if the capacitive sensor is triggered but the contact plates are dry, the sensor waits 10 seconds and checks again. Only when the alarm is repeated, it sends an alert, which reduces false alarms, but can delay the response to slow leaks (for example, a dripping pipe).
π‘
If the sensor is triggered by steam in the bathroom, set it away from sources of moisture (for example, under the sink, not on the floor next to the shower cabin). or set the alert delay in the Mi Home app (section Automation β Conditions β Delay).
How the sensor transmits the signal: Zigbee vs Bluetooth
The speed of the leak notification depends on the communication protocol that the sensor uses. Xiaomi has two types of connections:
- π‘ Zigbee (Aqara models): πΉ It works via a hub (such as Aqara Hub or Mi Gateway). πΉ Delayed notification: 1-2 seconds. πΉ Communication range: up to 30 meters (within the apartment). πΉ Supports mesh network (sensors relay each other's signal).
- π΅ Bluetooth (Yeelight or MiJia Bluetooth models): πΉ Connects directly to your smartphone or Mi Bluetooth Gateway. πΉ Delayed notification: 3-10 seconds (depending on distance). πΉ Communication range: up to 10 meters (no obstacles). πΉ Doesn't support mesh.
Critical: If you use a Bluetooth sensor and your smartphone is out of range (like youβre at work), the alert will only come when your phone reconnects to the sensor, in which case youβd better choose a Zigbee model with a hub that monitors the state of the sensors around the clock.
β οΈ Warning: If you have multiple Aqara sensors on Zigbee, place them in each otherβs coverage area (maximum 10-15 meters between neighboring devices) to create a mesh network and increase reliability.
What if the sensor does not connect to the hub?
Connection and configuration: step-by-step instructions
Installation of the leak sensor Xiaomi takes no more than 5 minutes, but there are nuances that affect its operation.
Install the CR2032 battery (polarity indicated on the case)
Activate the pairing mode (hold the 5 sec button)
Place the sensor in the risk area (under the sink, next to the washing machine)
Connect to the hub or smartphone via Mi Home
Set up automation (alerts, valves, sirens)
-->
Take the example of Aqara Water Leak Sensor:
- Open the sensor cover and insert the CR2032 battery (usually included).
- Press and hold the button on the body until the indicator starts flashing blue (pairing mode).
- In the Mi Home app, go to Profile β Add Device β Smart Home β Water Leak Sensor.
- Select a hub (if you use Zigbee) or connect directly to your smartphone (for Bluetooth models).
- Wait for the confirmation of the connection (the indicator on the sensor will light up in green).
Once connected, make sure to set up automation, for example, you can create a rule:
If the leak sensor is triggered β
Then turn on the Aqara + siren
Send push notification to smartphone +
Close the electric valve (if installed).To do this, go to Mi Home Automation β Create β Condition β Leak sensor.
Optimal installation locations:
- πΏ Under the sink in the kitchen and in the bathroom.
- π§Ί Near the washing or dishwasher.
- π§ Near the water heater or boiler.
- π½ Behind the toilet (if there is a risk of leaking a tank).
Avoid areas with constant high humidity (such as near a shower cabin without doors).
False positives: why the sensor is lying and how to fix it
Even Xiaomiβs most reliable sensors sometimes go off for no apparent reason, and consider typical scenarios and solutions.
| Problem. | Reason. | Decision |
|---|---|---|
| It's working on condensate. | High humidity in the room | Move the sensor away from steam sources or adjust the delay to Mi Home |
| Not responding to water. | Oxidation of contacts or a saturated battery | Clean the plates with alcohol or replace the battery |
| Always flashing red. | Loss of communication with the hub | Restart the hub and check the distance between devices |
| It works at night for no reason. | Electromagnetic interference from other devices | Set the sensor away from the router or microwave |
If the sensor is triggered by dust or dirt, wipe the contact plates with a cotton swab dipped in alcohol. In Aqara models, you can also calibrate the sensor:
- Turn the sensor up with the contacts.
- Press and hold the 10 seconds button until the indicator starts flashing yellow.
- Place the sensor on a dry surface and wait until the indicator goes out (calibration is complete).
π‘
If the sensor is activated more than 3 times a week for no apparent reason, test it in test mode: place it in a dry place and observe the behavior. If false alarms continue, the device is malfunctioning and requires replacement.
Integration with Home Assistant and other systems
Xiaomi leak sensors can be connected not only to Mi Home, but also to other smart home platforms, such as Home Assistant, Apple HomeKit or Google Home.
- π Home Assistant: πΉ Install the Xiaomi Miio component or Zigbee2MQTT (for Zigbee sensors). πΉ Add the sensor to the configuration file: sensor: - platform: mqtt name: "Bathroom leak sensor" state_topic: "zigbee2mqtt/0x12345678" value_template: "{{ value_json.water_leak }}"
- π Apple HomeKit: πΉ Use the Aqara Hub with firmware that supports HomeKit. πΉ Scan it. QR-code from the hub in the Apple Home app.
Google Home integration will require middleware, such as Home Assistant or IFTTT. Important: Zigbee sensors donβt connect directly to Google Home β just through the hub.
Example of automation in Home Assistant for a leak sensor:
automation:
- alias: "Leakage in the bathroom"
trigger:
platform: state
entity_id: binary_sensor.water_leak_bathroom
to: "on"
action:
- service: notify.notify
data:
message: "Discovered leak in the bathroom! Check immediately!"
- service: switch.turn_on
entity_id: switch.siren