TapHome

Aqara Water Leak Sensor

Packet Parser → MQTT
Submitted by
Last updated: 03. 2026

Requires external gateway

tasmota zigbee2tasmota-gateway — product page

Aqara Water Leak Sensor

This device communicates via Zigbee through a Tasmota gateway. Make sure you have the Zigbee2Tasmota Gateway template imported and your device paired before proceeding.

The Aqara Water Leak Sensor (SJCGQ11LM) is a compact, IP67-rated battery-powered Zigbee water leak sensor. It detects the presence of water when the level reaches the 0.5 mm contact pads on the bottom of the device. TapHome communicates with the sensor over MQTT through a Zigbee2Tasmota gateway — the sensor publishes a ZoneStatusChange value in the ZbReceived JSON payload when a water leak is detected or cleared.

The sensor is powered by a CR2032 coin cell battery (approximately 2-year lifespan). The template monitors battery level and voltage via service attributes, warns when battery drops below 30%, and detects device offline states (warning after 12 hours, error after 24 hours).

Configuration

Pairing the sensor
  1. In TapHome, turn on the Permit Join switch in the Zigbee2Tasmota Gateway module
  2. On the sensor, press and hold the button until the blue LED starts blinking, then release
  3. Wait for the Devices Found counter to increment — the sensor’s Device ID (e.g., 0xF121) appears in the gateway service attributes
  4. Import this device template using the Device ID from pairing

If pairing does not start, try holding the water logo on the bottom of the sensor for approximately 10 seconds until three blue LED blinks occur, then release.

Import parameters
ParameterDescriptionExample
MQTT Broker IP AddressIP of your MQTT broker192.168.1.10
MQTT Broker PortBroker port (default 1883)1883
Gateway nameTasmota MQTT topic (Configuration → MQTT → Topic)tasmota_XXXXX
Device IDZigbee short address from pairing0xF121

Device capabilities

Water leak detection

The template provides a single Flood Sensor device mapped as PacketParserReedContact (type 1031) with the FloodSensor capability. The device parses the ZoneStatusChange field from ZbReceived.{DeviceID} in the MQTT SENSOR message:

  • ZoneStatusChange = 1Alarm (water detected)
  • ZoneStatusChange = 0OK (dry)

The sensor wakes up and transmits its state when water reaches the 0.5 mm contact pads on the underside of the device, and again when the water is removed and the pads dry.

Unlike door/window sensors that use the Contact field, the water leak sensor uses ZoneStatusChange — a Zigbee IAS Zone status field. This is the standard mechanism for alarm-type sensors in the Zigbee protocol.

Battery monitoring

The module tracks battery health through two service attributes:

  • Battery Percentage — estimated CR2032 charge level; a low battery warning triggers when the level drops below 30%
  • Battery Voltage — raw CR2032 cell voltage in volts

Battery data is parsed from BatteryPercentage and BatteryVoltage fields in the ZbReceived payload.

Offline detection

The template monitors device availability using the LastSeenEpoch timestamp from ZbInfo polling (every 1 hour):

  • Warning — device has not been seen for more than 12 hours
  • Error — device has not been seen for more than 24 hours

This helps detect situations where the sensor has lost Zigbee connectivity or the battery is fully depleted.

Diagnostic service attributes

The module exposes additional Zigbee metadata retrieved via ZbInfo polling:

AttributeDescription
IEEEAddrUnique 64-bit hardware identifier
ModelIdZigbee model ID (lumi.sensor_wleak.aq1)
ManufacturerManufacturer string reported by the device
EndpointsActive Zigbee endpoints
ConfigDevice Zigbee configuration
Link QualitySignal strength scaled from 0–100%
Additional capabilities

The Aqara SJCGQ11LM also reports internal device temperature via Zigbee. Per-message link quality (LQI) is available in each SENSOR payload but is currently only exposed at module level via hourly ZbInfo polling. These capabilities can be added in a future template update.

Troubleshooting

Sensor not reporting flood state
  1. Verify the sensor is paired with the Zigbee2Tasmota gateway — check ZbStatus in the Tasmota console
  2. Confirm the Device ID in the template matches the short address from pairing (e.g., 0xF121)
  3. Place the sensor on a wet surface to trigger a state change — the device should publish a ZoneStatusChange value within seconds
  4. Use an MQTT client (e.g., MQTT Explorer) to subscribe to tele/{GWname}/SENSOR and verify the sensor publishes ZbReceived messages with a ZoneStatusChange field
Offline warning despite working sensor
  1. The offline detection relies on ZbInfo polling (hourly). If the sensor has not sent any message within 12 hours, a warning appears
  2. Battery-powered Zigbee devices sleep between events — this is normal behavior. The warning typically clears after the next leak event or ZbInfo poll
  3. If the warning persists beyond 24 hours, check the battery (CR2032) and re-pair the device if necessary
False alarms or no detection
  1. Ensure the contact pads on the bottom of the sensor are clean and not obstructed by dirt or residue
  2. The sensor requires at least 0.5 mm of water to trigger detection — small droplets or condensation may not be enough
  3. The IP67 rating means the sensor body is waterproof, but the detection pads must be in direct contact with the water surface

The Aqara SJCGQ11LM uses a CR2032 coin cell battery. Battery life is typically 2+ years under normal use. Placement in consistently humid environments (e.g., under a boiler or near a washing machine drain) can reduce battery life due to more frequent wake-ups.

How to install in TapHome

Prerequisites

  • Zigbee gateway with Tasmota firmware (e.g., Sonoff ZBBridge, eWeLink ZB-GW03)
  • MQTT broker running on your local network (TapHome built-in broker or external)
  • TapHome CCU on the same network

TapHome has a built-in MQTT broker — enable it in SettingsHardwareMQTT Broker. No additional software is needed.

Step 1 — Set Up the Tasmota Zigbee Gateway

  1. Flash Tasmota firmware on a supported Zigbee coordinator (e.g., Sonoff ZBBridge, eWeLink ZB-GW03)
  2. Connect the gateway to your Wi-Fi network via the Tasmota web UI
  3. Navigate to ConfigurationConfigure MQTT and set:
    • Host: your MQTT broker IP (e.g., 192.168.1.10)
    • Port: 1883
    • Topic: note down the topic name (e.g., tasmota_XXXXX) — you will need it during template import

For detailed instructions, see the Tasmota Zigbee documentation.

Step 2 — Import the Gateway Template in TapHome

  1. Download the gateway template from the Zigbee2Tasmota Gateway compatibility page
  2. In TapHome, go to SettingsHardwarePacket ParserImport
  3. Import the template with these parameters:
    • MQTT Broker IP Address: your broker IP (e.g., 192.168.1.10)
    • MQTT Broker Port: 1883
    • Gateway name: the Tasmota MQTT topic from Step 1 (e.g., tasmota_XXXXX)

After import, you will see two devices: Permit Join (switch) and Devices Found (counter).

Step 3 — Pair a Zigbee Device

  1. In TapHome, turn on the Permit Join switch — this opens a 60-second pairing window
  2. On the Zigbee device, start the pairing procedure (typically hold the reset button for 5 seconds until the LED blinks)
  3. Watch the Devices Found counter — it increments when a new device joins
  4. Check the Service Attributes of the gateway to see the new device’s ID (e.g., 0x1234), manufacturer, and model
  5. The pairing mode deactivates automatically after the timeout

Step 4 — Import the Device Template

  1. Download the device-specific template from the corresponding compatibility page
  2. Import the template with these parameters:
    • MQTT Broker IP Address: same as the gateway
    • MQTT Broker Port: 1883
    • Gateway name: same Tasmota MQTT topic as above
    • Device ID: the short address from pairing (e.g., 0x1234)

Available devices

Aqara Water Leak Sensor Module
Service Attributes
IEEEAddrZigbee IEEE address — unique 64-bit hardware identifier of the sensor
ModelIdZigbee model identifier reported by the device (lumi.sensor_wleak.aq1)
ManufacturerManufacturer string reported by the device via Zigbee
EndpointsActive Zigbee endpoints on the device
ConfigDevice Zigbee configuration string
Link QualityZigbee signal strength — 0% (no signal) to 100% (best)
Battery VoltageCR2032 coin cell voltage in volts
Battery PercentageEstimated battery level — warning triggered below 30%
Custom Variables
GWname (string)Tasmota MQTT topic name of the Zigbee gateway (found in Configuration → MQTT → Topic)
ID (string) = 0xF121Zigbee short address of the Aqara Water Leak Sensor (assigned during pairing)
After pairing the sensor via Permit Join, find the device short address in the gateway's Devices Found service attribute or via Tasmota console command ZbStatus

Aqara - Water Leak Sensor

Read (module)
MQTTPUBLISH("cmnd/" + GWname+ "/ZbInfo", ID)
Listener
if INDEXOF(RECEIVEDMSG.Topic, "SENSOR") > 0
	var ZbReceived := PARSEJSON(RECEIVEDMSG.Payload, "ZbReceived." + ID, true);
    var bat := PARSEJSON(ZbReceived, "BatteryPercentage", true);
    if(!ISNULL(bat), BatteryPercentage := bat);
    var volt := PARSEJSON(ZbReceived, "BatteryVoltage", true);
    if(!ISNULL(volt), BatteryVoltage := volt);
    
    var deviceInfo := PARSEJSON(RECEIVEDMSG.Payload, "ZbInfo." + ID, true);
    if !ISNULL(deviceInfo)
    	LastSeenEpoch := PARSEJSON(deviceInfo, "LastSeenEpoch");
        COMPLETESERVICEATTRIBUTE("IEEEAddr", PARSEJSON(deviceInfo, "IEEEAddr"));
        COMPLETESERVICEATTRIBUTE("ModelId", PARSEJSON(deviceInfo, "ModelId"));
        COMPLETESERVICEATTRIBUTE("Manufacturer", PARSEJSON(deviceInfo, "Manufacturer"));
        COMPLETESERVICEATTRIBUTE("Endpoints", PARSEJSON(deviceInfo, "Endpoints"));
        #COMPLETESERVICEATTRIBUTE("Config", PARSEJSON(deviceInfo, "Config"));
        COMPLETESERVICEATTRIBUTE("Link Quality", ROUND(LINEAR(PARSEJSON(deviceInfo, "LinkQuality"), 0,0, 254, 100)) + "%");
    end
end

if BatteryPercentage < 30
	ADDWARNING("Low battery (<30%)");
end

if !ISNAN(LastSeenEpoch)
	DATETIME now := NOW();
	var secondsSeen := now.UNIXTIME - LastSeenEpoch;
	if secondsSeen > 12 * 60 * 60
		if secondsSeen > 24 * 60 * 60
			ADDERROR("Device is offline > 24H");
		else
			ADDWARNING("Device is offline > 12H");        
		end
	end
end
Service Attributes
IEEEAddr
MQTTPUBLISH("cmnd/" + GWname+ "/ZbInfo", ID)
ModelId
Manufacturer
Endpoints
Config
Link Quality
Battery Voltage
BatteryVoltage + " V"
Battery Percentage
BatteryPercentage + "%"
Flood Sensor Reed Contact Read-only

Water leak detection via Zigbee IAS Zone — reads the ZoneStatusChange field from the Zigbee sensor message. IP67 rated, 0.5mm detection threshold.

boolean

Flood Sensor

Listener
if INDEXOF(RECEIVEDMSG.Topic, "SENSOR") > 0
    var val := PARSEJSON(RECEIVEDMSG.Payload, "ZbReceived." + ID + ".ZoneStatusChange", true);
    if(!ISNULL(val), Rc := val);
end
Connection: Packet Parser → MQTT
Possible improvements (2)
  • Device Temperature — Blakadder lists device temperature reporting as a supported feature of SJCGQ11LM. The TapHome template does not parse this field.
  • Link Quality (device-level) — LinkQuality is available per SENSOR message but only exposed as a module-level service attribute via ZbInfo polling.

Sources