Skip to content

Plugin irrigation safety

Martin Pihrt edited this page Oct 13, 2026 · 1 revision

Irrigation Safety

Monitors irrigation flow, pressure and tank level, learns station flow ranges and can stop outputs and disable the scheduler when a confirmed fault occurs.

At a glance

Item Value
Version 1.0.0
Category Irrigation and water management
Author Martin Pihrt
License GPL-3.0
OSPy 3.0.354 or newer
Python 3.8 or newer
Permissions email, system
Hardware No dedicated hardware requirement declared
Dependencies Water Meter (required), Pressure Monitor (optional), Water Tank Monitor (optional), Current Loop Tanks Monitor (optional), E-mail Notifications (optional), E-mail Notifications SSL (optional)
Python/OS packages None
Interfaces provider ospy.provider.v1, Mobile API v1
Source Open the plug-in directory

What it is for

Monitors irrigation flow, pressure and tank level, learns station flow ranges and can stop outputs and disable the scheduler when a confirmed fault occurs.

How it works and how to configure it

Irrigation Safety is a dedicated protection layer for OSPy. It combines live OSPy output state with cached ospy.provider.v1 data and never performs an extra hardware read.

Version 1.0.0 provides:

  • Off, Monitor only and Active protection modes. Monitor only is the safe commissioning mode.
  • A separate flow profile for every enabled non-master OSPy station, including startup delay and fault-confirmation time.
  • Combined expected ranges when several fully configured stations run at once.
  • Detection of no, low or high flow during irrigation and flow while no irrigation station is active.
  • Optional pressure and tank-level protection, including unavailable or stale measurement incidents.
  • One-shot automatic learning from Water Meter. Learning accepts samples only after startup delay and while exactly one selected station is active. A robust P10/P90 range expanded by a configurable margin is saved when enough samples have been collected.
  • Guarded shutdown that clears current runs and outputs, switches off the separate master relay and optionally disables the scheduler.
  • Persistent incident locking. A locked incident is enforced continuously and can be acknowledged only after its condition is no longer active. The scheduler is never re-enabled automatically.
  • A bounded temporary bypass that suppresses control actions while monitoring, incident history and notifications continue.
  • E-mail delivery through either official e-mail plug-in and immediate mobile push through OSPy's asynchronous push dispatcher. Notification work is kept outside the safety evaluation worker.
  • A responsive page styled after Thermostat and Automation Rules, using OSPy buttons and slider switches. Current values, active stations, learning progress, incidents and history update every two seconds without refreshing the page.
  • Health, mobile-card and read-only ospy.provider.v1 contributions.

Safety workflow

  1. Install and enable Water Meter.
  2. Select Monitor only.
  3. Enable a station profile and either enter verified flow limits or start automatic learning, then run that station by itself.
  4. Test every configured station and notification channel.
  5. Select Active protection only after the displayed limits and startup delays have been verified on the actual irrigation hardware.

If a confirmed fault occurs in Active protection, output shutdown is executed before e-mail or push delivery. A notification outage therefore cannot delay valve or pump shutdown.

In-app help and settings notes

The following notes are generated from the help page shipped with this plug-in. Field names are also explained directly in the OSPy settings page.

Irrigation Safety help

Purpose

Irrigation Safety combines the current OSPy station state with cached Water Meter, Pressure Monitor and tank-monitor values. It never polls I2C or GPIO hardware itself.

Use Monitor only first. This records and reports incidents without changing outputs. After every station profile has been checked, Active protection can stop all outputs, disable the scheduler and keep the incident locked until an administrator acknowledges it.

Station flow profiles

Each enabled non-master OSPy station has its own expected minimum and maximum flow. When several configured stations run together, their limits are added. A station without an enabled profile prevents range enforcement for that combination instead of guessing a limit.

Startup delay begins whenever the active station combination changes. A flow fault must then remain present for the configured confirmation time before an incident is opened.

Automatic learning

Start learning for one station and run that station by itself. Samples are accepted only after startup delay, only from a current Water Meter reading and only while exactly that station is active.

After the requested number of samples, the plug-in calculates the median and robust tenth-to-ninetieth-percentile range. It expands that range by the configured percentage or minimum margin, whichever is larger, saves the new limits and stops learning automatically.

Additional protection

  • Flow without an active irrigation station can indicate a leaking valve or pipe.

  • Pressure protection checks that the pressure input is present while the master output is active.

  • Tank protection can use fill percentage or water level from either supported tank monitor.

  • Missing or stale data is treated as a separate safety fault while irrigation is active.

Incidents and actions

A confirmed incident is written to bounded history before notifications are sent. In Active protection, output shutdown and scheduler disabling happen before e-mail or push delivery.

A locked incident continuously prevents irrigation outputs from remaining active. It can be acknowledged only after every associated fault condition has returned to normal. Acknowledgement never enables the scheduler again.

Temporary bypass suppresses control actions for a bounded time but keeps monitoring, history and notifications active. It expires automatically.

Notifications and live page

E-mail uses the running E-mail Notifications SSL or E-mail Notifications plug-in. Mobile push uses OSPy Mobile API push delivery and its Automation notification category. Delivery runs outside the safety evaluation worker.

The overview reloads current measurements, stations, learning progress, incidents and history in the background. The page does not need to be refreshed.

Support

Check OSPy → Diagnostics first and remove passwords, tokens, private addresses and other secrets before sharing logs. Report reproducible plug-in problems in the OSPy-plugins issue tracker.

Back to the plug-in catalog

Clone this wiki locally