I’m working on the irrigation system and want to make it dependent on the rain forecast and precipitation for the last 24 hours.
To calculate the decision whether to start watering or not I use OpenWeatherBinding, however, I don’t know how to interpret the current and forecasted rain. I use persistence to store the value of the current rain every 15 minutes.
First of all, I don’t understand the unit of measurement of the precipitation the OpenWeather provides. What does it mean exactly that it is 2 mm of rain? Does it mean that there will be 2 mm of rain in 1 hour?
Here is a particular example. Below is the graph that represents the stored values of current rain for the last 24h. You can easily see a huge peak around 18-19. This was a really huge rain.
When I sum the rain from the last 24 hours with the code below, I get the result of 680 mm of rain (I’m not sure if this is calculated in the right way).
When I get average rain fro the last 24h, I get the result of 2.58 mm of rain and considering that there was a huge rain and flood this value looks quite small to me.
The other thing is the forecasted rain which I can get from OpenWeather by adding forecasted precipitation for the 3, 6, 9, 12, 15, 18, 21, and 24 hours to the group and get the average or the sum.
Group:Number:AVG GroupForecastedRain24 Group:Number:SUM GroupForecastedRain24
I can’t correlate the values of the forecast with the last 24 hours.
Could you help me understand the values from the OpenWeather binding and how to calculate the sum / average for the last 24 h and for the forecast for the next 24 h?