For the curious: you do not need any of this to water a garden.
Everything here comes from a real house.
The valves
Five battery valves on hose bibs, one for each run of line. The model is the Sonoff SWV-NH, a Zigbee valve, about $36 each when we ordered them. Each has a turbine flow meter and the valve itself. That is all it can sense.
Flow, in cubic metres an hour
Reported by the meter in the valve. Home Assistant keeps it as hourly averages, which is what gallons are worked out from.
Open or closed
The position the valve was told to take, and a press of the button on the valve itself.
A battery that always says 100
Every valve we have reports exactly 100.0 percent, so that number tells you nothing. Treat the battery as unknown.
No moisture probe, whatever the names say
Each valve brings entities called “water leak” and “water supply”. There is nothing in the valve that senses water outside the pipe. Both are one status, read from the same attribute, and the valve’s only inputs are the flow meter and the commanded position. So “leakage” can only mean flow while the valve is shut, and “shortage” can only mean no flow while it is open.
That has a consequence worth knowing before you rely on one.
A valve cannot see a leak while it is open.
Flow is expected then, so there is nothing for the comparison to fire on. A burst line downstream of a correctly open valve at 2 a.m. looks the same as a normal soak. Catching that needs the flow compared with what a normal soak for that valve draws.
The schedule is a calendar
Each valve has its own calendar in Home Assistant. A run is an event on it: the valve opens when the event starts and closes when it ends, so the event’s length is the run’s length. A weekly soak is a repeating event and a one-off is a single event.
Nobody edits the calendars by hand. You tell your assistant: “skip this Wednesday,” “water the shed an hour tonight,” “move Thursday’s soak to 10 p.m.,” and it sets, moves or deletes the event.
As set up in October 2026, each valve gets one long soak a week, one valve a night, Monday to Friday, starting at 11 p.m. and running 7 hours. Because it is a calendar, it changes whenever you ask. Treat this as the starting point and not the rule.
What keeps it safe
A watchdog
Any valve that has been on longer than its maximum run, 7.5 hours here, is closed and you are told. It does not matter whether a schedule, a button or a mistake opened it.
One valve at a time
A watcher reads the next seven days of every calendar and pushes if two runs would overlap. It never moves or deletes anything.
A gate
One switch pauses every scheduled start. It starts off, so nothing waters until you turn it on. It does not stop the watchdog.
Two details from building it: a recurring run is written as a local time with no offset, so it stays at 11 p.m. when the clocks change; and deleting a run that is under way closes the valve about thirty seconds later.
A valve that says closed but did not close
The one leak check that works is a valve that should be shut and has flow. Each valve has a watch: if its flow stays above a small threshold for ten minutes while its switch reads off, you get a push.
- Not scheduled and no press on the valve is one fact: the switch reads off. A scheduled run and a press at the valve both turn it on.
- The threshold, 0.02 cubic metres an hour (20 litres), is a starting value, not a measured one. When we wrote it, no valve had opened yet and nobody had seen the meter read anything but zero. It reports in steps of 0.1, so in practice the test is “any flow the meter reports at all.”
- The settle time absorbs drain-down. A line can keep registering flow for minutes after a soak ends. If a real soak raises a false alarm, lengthen the settle time and do not raise the threshold.
- A press at the valve that the valve fails to report would read as flow with the switch off, and alert. That is a false alarm in the cheap direction.
Gallons per valve per week
Gallons come from the flow meter’s hourly average: 1 cubic metre is 264.17 US gallons. Summed by week, each valve gets a number, and each number is compared with that valve’s own four-week average. Until four weeks exist, the comparison says it is still building history and how many weeks it needs.
In one September week the five valves used between 716 and 2,027 gallons. The spread is what each valve waters, not a fault.
Every Monday morning, after the week’s last soak, a check reads the week for each valve. It flags a valve when:
- it is more than 30 percent over its own trailing average (it needs at least two earlier weeks to judge by), or
- it recorded more than 5 gallons that no run explains.
One push for the whole check, naming every flagged valve, and quiet otherwise. The 30 percent is a setting.
If you are choosing valves
What we would look for, from what these taught us:
- A flow meter in the valve. It is what lets you compare a run with the valve’s own normal, and what lets you see a valve that did not close.
- A report of its own position. “Commanded on” is not the same as water flowing.
- More than one way back onto the mesh. A valve with a single parent can fall off the network when that parent dies. This is the story.
- Do not count on the battery number.
Ask your assistant
How many gallons did the shed line use each week this summer, and how does that compare with the weeks it rained?
Your assistant answers from the gallons and the rain that were recorded, and tells you how many weeks it compared.
Next: rain delay, which pauses all of this when real rain falls.