Skip to content
Stand with Ukraine flag

Water Leak Detected Alarm

  • Alarm Rule
  • 0 installs
  • v1.0.0
  • Aug 11, 2026
  • MIT license
  • v4.3+

Detect water leaks the moment a leak sensor trips and raise a critical alarm, for burst pipes, appliance leaks, and flooded server rooms and basements.

Type
  • Alarm
Category
  • Safety
Use Cases
  • Smart Building
  • Smart Home
  • Smart Retail

Who it’s for

Facility and property managers, data-center and IT operations teams, and smart-home owners. Use it when a leak sensor’s on/off output should raise an immediate alarm before water damage spreads: “is a pipe or appliance leaking right now?”, “did a water heater, washing machine, or HVAC condensate line flood the utility room?”, “is there water on the floor of the server room, basement, or storage unit?”

What it does

Reads the device’s leak telemetry and raises a Critical alarm the moment the sensor reports a leak. The alarm auto-clears once the sensor reports dry again and stays dry for a short debounce window, so a brief splash that dries up on its own does not leave a stuck alarm.

Water Leak Detected Alarm diagram

How to set up

The clear window has a default value, so the rule works as soon as it is installed. Install on a device or asset profile so the alarm covers every entity of that type at once and automatically picks up any new entity added later. Single-device or single-asset installs are also supported. With propagation on, a leak on one sensor surfaces on its related room, floor, or building asset.

How to customize

  • To monitor a different boolean state - change the Time series key on the state argument to match your sensor’s key (e.g. leakwater_leak or leakage_status).
  • To use a different clear-window attribute name - change the Attribute key on the leakClearMinutes argument to match what your devices or assets already use (e.g. leakClearMinutesdryDebounceMinutes).
  • To change how long the sensor must read dry before the alarm clears - change the Default value on the leakClearMinutes argument.
  • To tune the clear window at runtime without editing the rule - set the value on the entity as a regular server-side attribute. It can be edited directly from a dashboard using Update Multiple Attributes input widget:
    • Per device or asset - set the attribute (e.g. leakClearMinutes) on the device or asset itself. The per-entity value overrides the Default value.
    • Per customer (in deployments that use customers) - change Entity type on the leakClearMinutes argument to Current owner, then set the attribute on the customer. Every device that customer owns picks up that value.
    • Tenant-wide - change Entity type to Current tenant, then set the attribute on the tenant. The value applies across every device.
  • To clear the alarm the instant the sensor reports dry - change the Clear condition type from Duration to Simple. The leakClearMinutes argument is no longer referenced and can be removed.
  • To make the alarm manual-clear-only - remove the Clear condition. The alarm then stays active until an operator clears it, even after the sensor reports dry.
  • To control where the alarm shows up - toggle the propagation flags under Advanced settings.

Share Your Alarm Rule with the Community

Built a reliable alarm rule? Export it as a JSON from ThingsBoard and publish it to the IoT Hub. Share it with thousands of ThingsBoard developers and help the community react to incidents faster.