TL;DR
The TS0207 leak sensor (and its similar devices shown below) is NOT RECOMMENDED under EDGE due to technical limitations. I was able to port the driver over to Edge and it will pair, but it will not report properly and will be marked OFFLINE often. Other sensors are better and you get what you pay for.
By default, the device checks in every ~250 minutes with a full battery report. This is not configurable or adjustable.
It does not do long-polling or checkins (the Poll Control cluster is not supported) to see if the hub has data or even to keep the routing table entry active.
It does not allow for any periodic attribute reporting on any cluster, so you can not request more frequent updates to try and keep the device “ONLINE”.
It registers as an IAS device but does not send any supervised Device Status reports in both the idle (dry) and faulted (wet) states. This has the side effect that if the sensor were to trigger while the hub was offline (or just missed the message), it never sends another update until the state changes.
Because of the infrequent transmissions the Smartthings/Edge Zigbee radio will mark the device as OFFLINE somewhere between 90 minutes and 2.5 hours from the last battery update. It will again mark it ONLINE when the next battery update comes in on the ~4 hour increment, but this is annoying.
Some of these problems may be able to be worked around via programming with the so called “Tuya cluster” (cluster 0xEF01) but this is undocumented and likely is only designed to work under a Tuya hub.
All these reasons make it not a great sensor and other choices are much better. I suggest choosing something else. Sensors are cheap, water damage is not.
[ORIGINAL GROOVY DETAILS] 2021: Original Groovy details and driver below:
This is a device handler for the Tuya Leak Sensor and any other white label unit sold under various brand names. Has the single CR2032 battery.
Hi. Thank you for making your code available for all of us to try!
I have tried to use your Device Handler code to get my Zigbee Tuya (Meian/Aubess) SW02 Leak sensor working with Smartthings. Unfortunately it does not work with my device. Do you have advice for me on how to get this working please?
Most of Tuya battery -powered sensors are in ‘deep sleep’ mode all time. so any command sent to them will not be received. These sensors (TS0207 leak sensor included) will wake up and accept commands only in a few seconds time window after the sensor is activated - leak detected, contact closed, motion detected, etc…
I have this sensor using Marianos Moisture Sensor MC and it works perfectly. Ive tested it several times, always registers and it has never fell offline so perhaps you have a faulty unit.
Can you temporarily remove the batteries inside this device?
If you see a red ‘offline’ label on the bottom of the device icon in SmartThings mobile app (may take up to 25 hours), it means that the device’s offline status is detected reliably and you can trust it.
Possible, but I have more than one. The inflexibility of the configuration is the annoying part. And if you trigger it while your hub is rebooting or your driver is restarting, you won’t get notified. It only sends messages when it changes state.