**Flood detection in Home Assistant**

(link to blog)

TL;DR

Initial test of cheap Tuya water leak sensors (zigbee) – all connected successfully, all detected water under a second.

Their longevity, battery duration and stability in zigbee mesh remains to be seen.

Why

Dishwasher’s aquastop valve died and we had a small flood in the kitchen. Then I ordered not one, but five water leak detection sensors. For other critical rooms, of course.

Sensors

The two types of sensors I ordered (Tuya brand) were recognised in Home Assistant / Z2M as:

  • Red ones: OUI: Telink Semiconductor (Taipei) Co. Ltd., Zigbee Model TS0207 _TZ3000_bfopm9ga
  • White ones: OUI: Telink Semiconductor (Taipei) Co. Ltd., Zigbee Model ZG-222Z HOBEIAN

Both are powered by CR2032 battery. The batteries were included, but one was dead and I had to replace it. Red ones had plastic strip around the battery to prevent emptying. Batteries did not have it, and batteries had an initial state of charge between 5% – 80%.

Other differences?

  • Red ones have sound alarm built-in (although very quiet), white ones don’t have it
  • white ones have sensor also on top, red ones don’t have it

Pairing in Z2M

There were no issues with pairing to the zigbee network. I held the upper button for 5 seconds, enabled ‘Permit join’ in Home Assistant / Zigbee2MQTT add-on and devices were recognised and added to the mesh in a few seconds. I only rename them using my system: Brand function number (room), e. g. Tuya water 01 (kitchen).

After pairing, the following entities were exposed (for both types of sensors):

  • Sensors:
    • moisture
    • tamper (not sure what it means – does it turn on if i dissasemble it? open the battery cover?)
  • Diagnostics:
    • battery state
    • battery %
    • last seen (disabled by default), I enabled it
    • link quality (disabled by default)

After pairing, I had to press the top button once, to enable communication with z2m mesh. Before that, only last seen and link quality entities were shown, others not.

Physical placement

I’ve put sensors:

  • under the dishwasher / kitchen sink
  • under the washing machine
  • under the aquarium cabinet
  • under the roof window – attic (it already leaked twice)
  • boiler room – in the middle of the water boiler and hot water buffer, right under all central heating valves and pumps
  • Organization in HA

    I’ve created a separate dashboard to show all water leakage sensors (using plain ‘entities’ card for each room):

    At the moment I don’t have a better idea how to organise them. I’ve also added them to ‘areas’ which represent rooms.

    When I was at it, I also classified ‘areas’ in appropriate ‘floors’.

    Automations – notifications

    I’ve set up automations that send a notification to family phones, tablet and TV if the flood is detected.

    TODO

    Replace the main water valve with motorized one and create automation that shuts it off in case of water leakage.

    Disclaimer

    This is not a paid post, I do not receive any compensation for it. Links are not affiliated. I just buy IoT randomly, what is currently available and test/use it.

    https://blog.rozman.info/flood-detection-in-home-assistant/ #flood #homeassistant #leak #Tuya #water #Zigbee