Aqara Water Leak Sensor T1 (SJCGQ12LM) never reports water_leak: IAS enrollment skipped by the lumi..* interview quirk
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.7k
- Forks
- 2k
- Avg merge
- 18h 55m
- Merged PRs (30d)
- 35
Description
What happened?
The Aqara Water Leak Sensor T1 (SJCGQ12LM / lumi.flood.agl02) never reports a leak. It pairs, interviews as SUCCESSFUL, is supported: true, exposes water_leak, and last_seen updates on a button press — but water_leak stays false forever. Shorting the two probes produces no Zigbee frame at all.
Over 24h of debug logs the device only ever sent one kind of message:
[2026-08-09 15:10:04] debug: z2m: Received Zigbee message from 'Water sensor', type 'attributeReport',
cluster 'genBasic', data '{"modelId":"lumi.flood.agl02"}' from endpoint 1 with groupID 0
Zero ssIasZone / zoneStatus / commandStatusChangeNotification frames, ever. battery and voltage also stay null.
Root cause
Reading the IAS Zone attributes directly (the read queues and fires on the next button press, since this is a sleepy end device) shows the device is not enrolled:
z2m: Received Zigbee message from 'Water sensor', type 'readResponse', cluster 'ssIasZone',
data '{"iasCieAddr":"0x0000000000000000","zoneState":0,"zoneStatus":33,"zoneType":42}'
zoneType: 42(0x2A) — correct water sensor zone typezoneStatus: 33— bit 0 (Alarm1) is set: the sensor hardware detects the shorted probes just finezoneState: 0— NOT_ENROLLED,iasCieAddrall zeros
An unenrolled IAS zone is not allowed to send commandStatusChangeNotification, so the alarm never leaves the device.
zigbee-herdsman does enroll IAS devices during the interview (Device.interview(), "Enroll IAS device" block), but lumi devices match the lumi..* modelID quirk:
Interview procedure failed but got modelID matching 'lumi..*', assuming interview succeeded
That shortcut marks a failed interview as successful and returns before the enrollment step runs. Harmless for most lumi devices (they use the manufacturer-specific 0xFF01 attribute), but lumi.flood.agl02 is a genuine IAS Zone device and stays unenrolled permanently. Re-pairing hits the same quirk again, so it does not help.
Workaround
Enroll manually over MQTT. Both commands queue for ~1 hour and flush on the next transmission, so press the sensor button once afterwards:
zigbee2mqtt/<FRIENDLY_NAME>/set
{"write":{"cluster":"ssIasZone","payload":{"iasCieAddr":"0x<COORDINATOR_IEEE>"}}}
{"command":{"cluster":"ssIasZone","command":"enrollRsp","payload":{"enrollrspcode":0,"zoneid":23}}}
Immediately after this the sensor started reporting normally:
z2m: Received Zigbee message from 'Water sensor', type 'commandStatusChangeNotification',
cluster 'ssIasZone', data '{"delay":0,"extendedstatus":0,"zoneID":23,"zonestatus":33}'
z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Water sensor', payload '{... "water_leak":true}'
water_leak then tracked the probes across three open/short cycles with no button press needed (zonestatus 33 → true, 32 → false). Note the enrollment lives in the sensor's NVRAM, so it has to be redone after a factory reset or re-pairing.
Proposed fix
Koenkk/zigbee-herdsman-converters#12870 — enroll in configure() for SJCGQ12LM, mirroring the existing NYCE NCZ-3011-HA fix added in #32480 for the same class of problem.
Other lumi definitions using fz.ias_*_alarm_* (e.g. SJCGQ13LM / lumi.flood.acn001) are probably affected the same way, but I could only verify the T1.
What did you expect to happen?
water_leak changes to true when the probes get wet / are shorted.
How to reproduce it (minimal and precise)
- Pair an Aqara Water Leak Sensor T1 (
lumi.flood.agl02). - Short the two probes.
- Observe that no
ssIasZoneframe is received andwater_leaknever changes. - Read
ssIasZonezoneState/iasCieAddrand observe0/ all zeros.
Zigbee2MQTT version
2.13.0 (Docker, koenkk/zigbee2mqtt:2.13.0)
Adapter firmware version
ZStack3x0
Adapter
zstack (/dev/ttyUSB0), channel 11
Device
Aqara Water Leak Sensor T1, SJCGQ12LM / lumi.flood.agl02, dateCode 20230825, appVersion 32, hwVersion 1, batteryVoltage 31 (3.1 V)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the SJCGQ12LM converter's configure() entry point and compare it with the NYCE NCZ-3011-HA enrollment fix from #32480. Verify the behavior with the listed Aqara reproduction: after pairing and shorting the probes, the device should emit ssIasZone status changes and update water_leak without another button press.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100