Water tank level alarm: a phone alert with the Shelly 1 Gen4

A tank that overflows because nobody stopped the pump, or a cistern that empties with no warning, are expensive and avoidable failures. With a Shelly 1 Gen4 and a float switch you turn any tank into one that calls your phone when the water reaches the critical point.

The idea is simpler than it sounds: a float switch is nothing more than a switch that opens or closes as the water rises. And the Shelly has an input, SW, whose only job is to read the state of a switch.

What you need

  • A Shelly 1 Gen4 — a relay with a potential-free contact and an SW input. Supply 110-240 V AC or 12 / 24-48 V DC, and it needs a neutral. It draws under 1 W, so it can watch the tank permanently at no meaningful cost.
  • A dry-contact float switch, that is, potential-free. This is the sensor.
  • 2.4 GHz Wi-Fi and the cloud enabled, which is what carries the alert to your phone when you are not at home.

One detail surprises people: in this setup the relay switches nothing. The Shelly is used purely as a reader of its own input. The output stays free in case you later want it to cut the pump as well.

Electrical safety, before anything else

At 110-240 V you are working with dangerous voltage. Switch off at the main breaker before touching anything, respect the terminal torque (0.4 Nm) and the permitted conductor size (0.5-4 mm²). If you are not experienced, have an electrician fit it.

There is an alternative that removes most of the risk: the Shelly 1 Gen4 also accepts 12 V or 24-48 V DC. If the tank is somewhere awkward, or the installation will be touched by someone without electrical training, it is worth planning it at low voltage from the start.

And a consequence of that which is worth understanding: the float switches whatever voltage reaches it. With the Shelly on 230 V, the SW input is referenced to the live conductor, so the float is handling 230 V and must be rated for it. With the Shelly on 12 or 24 V, the float only handles low voltage. That is not a minor point when you come to buy the float.

The wiring

The terminals involved are L (live), N (neutral), SW (the control input, where the float goes) and I/O (the output contact, unused here).

The float is wired so that, on reaching the set level, it closes the circuit and the SW input goes active. Choose a normally open or normally closed float depending on whether you want the alarm to fire as the water rises or as it falls — that decision is made when you buy it, not in the configuration.

Getting the device onto the network

Before configuring anything the Shelly has to join the network. For a single device any method will do. If you are fitting several — common on a pumping installation, where you end up with sensors at more than one point — the SIT-IoT app provisions them as a batch and assigns the static IP in the same pass.

The static IP is not cosmetic here: if the device changes address after a router restart, any integration pointing at that address stops working — and on an alarm system that means the warning stops arriving and nobody notices.

The scene that sends the alert

Two steps, and it is the first one that everybody skips:

  1. Set the SW input to detached mode, or to a button type. Without this, when the float activates, the Shelly will operate its output relay as well as raising the event. On a setup where the output is not wired it makes no difference; on one where it controls the pump, you can end up switching it off at exactly the wrong moment.
  2. Create the scene: the condition is the device’s SW input in the active state, and the action is to send a notification. You choose the wording, and it pays to make it actionable — «Tank at maximum, check the pump» works; «Alarm» does not.

A second scene for the opposite event — input deactivated — covers the low-level warning too. Same float, same device, both ends watched.

Test it by lifting the float by hand before calling the job done, and adjust its height to set the exact level you want the alert at.

The real problem with an alarm: silence

Here is what almost no guide tells you. A level alarm has a peculiar and dangerous failure mode: if the device loses the network it warns you about nothing — and you read that silence as everything being fine.

A sensor that is off the network is worse than no sensor, because it creates unearned confidence. And it can sit like that for months: nobody misses a notification they were not expecting.

So on an alarm installation it is worth being able to check the device is still alive without going to look at it. In the console, last seen answers that at a glance: if the timestamp is ten minutes old, the sensor is on watch; if it is three weeks old, you have had three weeks with no supervision and did not know it.

On a client’s installation that is also the difference between finding out yourself and finding out through an angry phone call.

How far it can be taken

  • Cut the pump as well as warn: wire the pump — or its contactor, if the power calls for one — to the output contact, and have the scene switch the relay off when the input goes active.
  • Alert several people: share the device and each of them gets the notification on their own phone.
  • Leave the ecosystem: the Gen4 supports webhooks and MQTT, so the alert can go to Telegram, to your own server, or to whatever system you already run.

The app and the console work with Gen2, Gen3 and Gen4 devices, so the same procedure holds even where an installation mixes hardware from different years. The app is on Google Play: SIT-IoT Smart Installer Tool.