Blog

Updates, news and behind the scenes of VineyardElf

Blog

Our sprinklers watered the lawn during a downpour - the culprit was a clogged rain gauge

For three weeks in July our irrigation watered the lawn almost every night - even when 18 mm of rain fell. The weather station said it was dry. How a clogged rain gauge and free Open-Meteo taught us not to trust a single sensor.

Our sprinklers watered the lawn during a downpour - the culprit was a clogged rain gauge

A post from our „side project" series. Our core is the VineyardElf platform, but the best lessons about sensors and data come exactly when something breaks in our own vineyard.

In the vineyard we have a simple irrigation setup: an OpenSprinkler controller and a Google Apps Script. Outside the frost season it plays a boring role, once a day before dawn it waters the lawn. It has one safeguard: if it is raining, skip the watering.

„But it rained, and it watered anyway"

That was our first hunch. For three weeks in July the sprinklers fired almost every night, even though it poured properly a few times. So we looked at the data from our Ecowitt station, and a surprise was waiting. According to the rain gauge, over the entire three weeks only 1.8 mm of rain fell. If it is dry, the system is right to water.

Except it was raining. To be sure, we compared the rain gauge against an independent source, the free weather API Open-Meteo (no key, a model for the vineyard's coordinates).

Our rain gauge (Ecowitt)
1.8 mm
total rainfall Jul 9-31
Open-Meteo (model)
72.9 mm
total rainfall Jul 9-31

A fortyfold difference. On a night when Open-Meteo showed 17.9 mm of rain, our gauge registered a fraction of a millimetre, and the sprinklers dutifully poured another half a tonne of water onto the lawn. We collected the biggest mismatches in a table.

Day Rain by Open-Meteo Rain by Ecowitt Lawn watered
Jul 23 17.9 mm ~0 mm 497 L
Jul 18 10.5 mm 0.2 mm 515 L
Jul 13 8.9 mm ~0 mm 687 L
Jul 10 8.4 mm 0.4 mm 752 L
Jul 19 6.2 mm 0.1 mm 503 L

Why the rain gauge went „blind"

A tipping-bucket rain gauge works simply. Water runs down a funnel into a tilting spoon, and each tip is one „click", that is 0.1 mm. All it takes is for a leaf, pollen, a cobweb or an insect to block the funnel, and the water never reaches the mechanism. The station then „sees" drought in the middle of a downpour. Ours most likely ended up exactly like that.

The fix: a second opinion instead of a single sensor

We added two things to the watering-skip logic.

  • Open-Meteo as an independent source. If it rained yesterday or today's forecast is wet, the system skips the watering. It works even when the rain gauge is clogged.
  • An „event" field instead of a daily counter. The daily counter resets at midnight, while watering starts at 2:45, so evening rain vanished from the tally. The „event" field counts the whole current rainfall episode, regardless of midnight.

Takeaway

A single sensor is a single point of failure, and a nasty one, because it lies quietly instead of failing loudly. A free weather model in the role of a second opinion costs nothing, and it catches exactly the situations where the hardware lets you down. And yes, we really do need to clean that funnel.

The system's code is open on GitHub: opensprinkler-frost-protection.