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.
What you need
| Part | Purpose | Notes |
|---|---|---|
| ESP32 development board | Handles Wi-Fi and sends the alert request | Cheap, capable, and much more useful than it has any right to be. |
| Water sensor or probe input | Detects the leak condition | Can piggyback on the same sensing setup as the local alarm or run in parallel. |
| Buzzer or relay-driven local alarm | Immediate local warning | Still required unless you enjoy unnecessary risk. |
| 5V USB power supply | Powers the ESP32 | Stable power beats dead batteries for always-on monitoring. |
| Webhook endpoint and SMS service | Sends the text message | Twilio 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 elseWiring 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
- Watch the sensor input.
- When leak is detected, trigger the local alarm at once.
- Join the Wi-Fi network.
- Send a request to your webhook or Flask endpoint.
- Have that endpoint call the SMS provider.
- 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.
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.