I have almost created a similar system on thingSpeak. I have a vineyard that is watered by Open Sprinkler. I currently have it completed but cannot get the command to update the watering percentage to work.
I use the calculation Irrigation (mm) = Evapotranspiration since last irrigation x Crop factor – rain.
The user then needs to simply refine the crop factor to their specific circumstance. There is information on readily available on how to do this by, observing the plants, digging hole to see how far the water and the roots go, or use soil moisture monitoring at various depths. Published crop factors vary massively for the same crop and vary over the time of the year according to the growth of the plant, so tuning this factor gives heaps of customisability. e.g. 0.25 early in the season, 0.4 to 0.7 for vines in peak growing time – so any attempt to fine tune the irrigation process needs to include some tuning by the irrigator to there specific circumstance.
There is a lot of material on irrigating using crop factor on this site if its of interest to anyone:- https://www.agric.wa.gov.au/water-management/evaporation-based-irrigation-scheduling
Providing a “base load” or feature where a fixed amount of water is provided is probably worth while as a protection against underwatering – I have some Pots where i do this on a separate timer and for shallow rooted plants it might be worthwhile.
What “language” is the script written in ?