Upgrade It

The “Because We Can” Upgrade: Wi-Fi Leak Sensor with Text Alerts

You already have a working leak alarm. Good. Now we are taking that sensible little warning device and adding Wi-Fi, remote alerts, and text messages because apparently water detection was not ambitious enough. This is the overbuilt version, and for once overbuilt is actually useful.

What this upgrade adds

The local alarm still does the real work. This upgrade adds a second layer: when water is detected, an ESP32 connects to your Wi-Fi and sends a request to a webhook or small server endpoint, which then triggers an SMS message. So instead of only hearing the alarm if you are home, you also get a text when you are not. Civilization limps forward.

Keep the local buzzer. Do not replace it with “just the text alert.” Internet service, routers, APIs, and your own code all fail more often than water does you the courtesy of waiting.

What you need

PartPurposeNotes
ESP32 development boardHandles Wi-Fi and sends the alert requestCheap, capable, and much more useful than it has any right to be.
Water sensor or probe inputDetects the leak conditionCan piggyback on the same sensing setup as the local alarm or run in parallel.
Buzzer or relay-driven local alarmImmediate local warningStill required unless you enjoy unnecessary risk.
5V USB power supplyPowers the ESP32Stable power beats dead batteries for always-on monitoring.
Webhook endpoint and SMS serviceSends the text messageTwilio is the obvious route, but any reliable SMS API will do.

How the chain works

Water detected
      │
      ▼
Local alarm sounds immediately
      │
      ▼
ESP32 joins Wi-Fi
      │
      ▼
HTTP request to webhook or server
      │
      ▼
SMS API sends text
      │
      ▼
Your phone buzzes while you are somewhere else

Wiring overview

Nothing exotic here. The sensor feeds a GPIO input. The buzzer uses another GPIO, transistor, or relay depending on how much current the alarm needs. The ESP32 stays dry and mounted above any likely water path, because electronics placed directly in the leak area are an excellent way to build a self-disabling safety system.

Software logic

  1. Watch the sensor input.
  2. When leak is detected, trigger the local alarm at once.
  3. Join the Wi-Fi network.
  4. Send a request to your webhook or Flask endpoint.
  5. Have that endpoint call the SMS provider.
  6. Throttle repeats so one puddle does not text you every six seconds like a needy toddler.

Webhook options

You can do this the lazy way or the satisfying way.

Quick setup

Use a service that receives a webhook and forwards it into an SMS workflow. Fast, simple, less fun.

Self-hosted setup

Use a small Flask endpoint on your own server, then call the SMS API from there. Since you already have a self-hosted stack, this route fits nicely and gives you more control over logging, retry behavior, and rate limiting.

Example alert text

Water leak detected at home.
Check the water heater area immediately.

Failure modes to think about before they think about you

  • Wi-Fi down: local alarm still works, remote alert does not.
  • Power outage: no ESP32 unless backed up, maybe no local alarm depending on design.
  • Webhook down: sensor trips, buzzer sounds, no text gets sent.
  • SMS provider issue: request succeeds locally but no message arrives.
This is not a substitute for fixing plumbing problems, inspecting your water heater, or shutting off water when something actually fails. It is an early-warning layer, not a magical force field against leaks.

Who this is for

This upgrade makes sense if your water heater is out of the way, you travel, or you just want the smug satisfaction of getting a warning text before a small leak turns into a flooring project. It is absolutely overkill for some people. It is also exactly the right kind of overkill for others.