[EDGE] Tuya Leak Sensor TS0207 ** NOT RECOMMENDED **

[EDGE UDPATE] 2022-08-23

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.

Signatures of these not recommended devices:

deviceLabel: Tuya TS0207 Water Leak Sensor
manufacturer: _TYZB01_sqmd19i1
model: TS0207

deviceLabel: Blitzwolf Leak Sensor
manufacturer: _TYZB01_o63ssaah
model: TS0207

Technical details of why they suck:

  • 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.

image

My testing was only with the TS0207, so some feedback if others have similar devices would be great.

Features:

  • Works with Smart Home Monitor as a leak sensor
  • SmartThings doesn’t mark it OFFLINE as the default handler does
  • Battery results are taken from the device for both voltage and percentage.
  • No parameters (none necessary, the device can’t accept any.)
3 Likes

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?

  • application: 41
  • endpointId: 01
  • manufacturer: _TZ3000_kyb656no
  • model: TS0207
  • zigbeeNodeType: SLEEPY_END_DEVICE

Thanks again!
Riaan

your a legend . Thank you

1 Like

Hi, does your code fit this sensor as well?
I set it up, it works very well. The problem is that after 6 to 7 hours it becomes offline

See update in first post. These devices are NOT RECOMMENDED under EDGE.

Not even for attributes of the Basic cluster (0x0000) ?

This is how I use it to keep devices online:

1 Like

This works mostly for mains/DC powered devices.

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…

1 Like

I don’t recall exactly, but I seem to remember trying all common attributes. Trying to get reporting on anything would always return an error.

Regardless there are way better devices on the market so why mess with something substandard especially with a leak sensor?

1 Like

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.

1 Like

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.

1 Like

Hi @Trakker2 @troy_owens

With the edge drivers and the default IASZone reports setting which is 300 sec, it should detect offline in about 20 minutes or so.

Although if hub take into account the battery reports that are 6 hours then it could take more than 25 hours

2 Likes

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.

This device ignores any reporting schedule, including IASZone status.