OpenSprinkler / OpenSprinkler-Weather

OpenSprinkler weather service used to calculate watering scale for the OpenSprinkler Unified Firmware.
https://opensprinkler.com
63 stars 38 forks source link

Document on update frequency #134

Closed ehsjoar closed 3 weeks ago

ehsjoar commented 2 years ago

I have installed docker version of “opensprinkler-weather” / local weather service.

I can send data there from my local weather station. One question I have and haven’t been able to find is how often that should happen for OpenSprinkler to be happy. My weather station sends data like 4 times a minute, but I think OpenSprinkler just checks every couple of hours. So how often should I send new data to the local weather service?

I have tried to update every 5 minutes. This causes some side effects. The issue I am getting is that when I send along rain date for 24 hours and 1 hour every 5 minutes the weather-service is somehow adding it up incorrectly. I get 3.84 inches in the Opensprinkler GUI (System Status) when in real life I just had 0.685 inches over the last 24 hours.

How frequently should the weather-service be updated? Yes, I have tried to ask this in forums.

rayshobby commented 3 weeks ago

The firmware assumes the watering percentage remains the same across the day. For example, in the Zimmerman algorithm, it uses the average temperature, humidity, and total precipitation of the previous day, so it doesn't change no matter what time you poll it today. Therefore technically it just needs weather data once per day.

The firmware polls weather service every 6 hours: https://github.com/OpenSprinkler/OpenSprinkler-Firmware/blob/master/main.cpp#L72 this is mainly for robustness, in case some weather service calls fail.