Repository navigation
Plugin weather based water level
Calculates hourly OSPy water-level adjustment from weather balance, Zimmerman or evapotranspiration methods.
| Item | Value |
|---|---|
| Version | 1.1.2 |
| Category | Irrigation and water management |
| Author | Rimco, Martin Pihrt |
| License | GPL-3.0 |
| OSPy |
3.0.211 or newer |
| Python |
3.8 or newer |
| Permissions |
network, system
|
| Hardware | No dedicated hardware requirement declared |
| Dependencies | None |
| Python/OS packages | None |
| Interfaces | Mobile API v1 |
| Source | Open the plug-in directory |
Calculates hourly OSPy water-level adjustment from weather balance, Zimmerman or evapotranspiration methods.
Tested with Python 3.8+.
The plug-in calculates an OSPy water-level adjustment every hour. Version 1.1.0 offers three selectable calculation methods while retaining the original multi-day method as the default for existing installations.
This is the original plug-in calculation. It combines the selected history, today and forecast days. The configured reference water at 100% (default 4 mm/day) is adjusted by mean temperature, wind and relative humidity, then total rainfall is subtracted.
OSPy weather humidity uses the normalized range 0..1. Version 1.1.0 correctly converts it to 0..100% before applying the humidity factor.
The Zimmerman calculation uses yesterday's mean temperature and humidity plus rainfall from yesterday and today:
temperature factor = (mean °C - reference °C) × 7.2
humidity factor = reference RH% - mean RH%
rain factor = (yesterday rain + today rain) × -7.874
adjustment = 100 + temperature factor + humidity factor + rain factor
The defaults correspond to the classic 70 °F / 30% reference: 21.1 °C and 30% relative humidity. The reference values can be adapted to the local climate. The calculation period is fixed, so the multi-day history and forecast controls are hidden.
This method reads weather.get_eto() from OSPy for 1–7 completed historical days. OSPy uses provider-supplied ETo where available and otherwise calculates FAO-56 reference evapotranspiration from weather observations.
ETc = ETo × crop coefficient
effective rain = (historical rain + today rain) × effective-rain percentage
net need = max(0, sum(ETc) - effective rain)
gross need = net need / irrigation efficiency
adjustment = gross need / (reference mm/day × valid days) × 100
The crop coefficient describes the vegetation, irrigation efficiency accounts for delivery losses, and effective rainfall accounts for rain not retained in the root zone. Forecast days are not used.
- The minimum and maximum percentage limits apply to every method.
- Freeze protection is independent of the calculation method.
- The footer can show the active method and current adjustment.
- The details page shows method-specific inputs, factors and results.
- Changing the method removes the previous method's adjustment immediately and triggers recalculation.
- If the selected method has never produced a usable result, missing data gives a neutral 100% contribution.
- A temporary data failure after a successful calculation retains only the last successful result from the same method and marks it as stale.
The plug-in declares network and system permissions, uses the shared OSPy worker lifecycle, removes its callback, footer and adjustment during shutdown, and reports its latest calculation through the Diagnostics health interface.
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.
The plug-in calculates one water-level adjustment and OSPy applies it to scheduled program durations. Choose the calculation method that matches the available weather data and your irrigation model.
This is the original plug-in method and remains the default for existing installations. It combines the configured history, today and forecast, then adjusts the daily reference water by mean temperature, wind and relative humidity before subtracting rainfall.
OSPy stores relative humidity as a value from zero to one. Version 1.1.0 correctly converts it to percent before this method applies the humidity factor.
This method uses yesterday mean temperature and relative humidity together with rainfall from yesterday and today. The result starts at 100 percent. Each degree Celsius above the reference adds 7.2 percentage points, each humidity point above the reference subtracts one point, and each millimeter of rain subtracts about 7.87 points.
The default references are 21.1 degrees Celsius and 30 percent relative humidity. They can be adapted to the local climate.
This method reads OSPy reference evapotranspiration for completed historical days. OSPy uses provider ETo when available and otherwise calculates the FAO-56 value from weather observations.
Crop evapotranspiration equals ETo multiplied by the crop coefficient. Effective historical and current-day rainfall is subtracted, irrigation efficiency converts the net requirement to a gross requirement, and the result is compared with the configured daily water at 100 percent.
Use a crop coefficient appropriate for the irrigated plants. Irrigation efficiency accounts for water that does not reach the root zone; effective rainfall accounts for rain that is not retained by the soil.
The common minimum and maximum percentages are applied to every method. Freeze protection is independent of the selected calculation method.
After changing the method, the previous method result is removed immediately. If the selected method has no usable data, the first result is neutral at 100 percent. After a successful result, a temporary data failure retains only the last successful result from that same method and marks it as stale.
The calculation details page shows the inputs, factors and final result for the selected method.
Author Rimco (Thank you).
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.
Start
Reference
Catalog sections