OpenSprinkler › Forums › OpenSprinkler Unified Firmware › Weather Service Calls – How often?
- This topic has 7 replies, 4 voices, and was last updated 3 years, 8 months ago by franzstein.
-
AuthorPosts
-
April 29, 2021 at 5:20 am #69946
franzsteinParticipantHow often will the weather service called by OpenSprinkler? With firmware 2.1.9(7) I see sometimes water level updates that are more than 5 hours old.
Are there any general thoughts on how often weather service calls are needed for accurate water level updates or rain detections?
Is there a way to call the weather service more often in case of having the weather service installed on a local server? It would be nice to get some more details here.
Thanks and regards
Franz
April 29, 2021 at 9:58 am #69950
RayKeymasterThe firmware by default makes a call every 4 hours I believe. But the weather script caches the call result so across a day you will get the same watering percentage no matter how often you make the weather call. The main reason for this is that we want a consistent watering percentage across a day — if the number changes every time the call is made this can become confusing. Another reason for the caching is to reduce the number of weather queries — keep in mind that we pay for all the weather queries, users don’t pay any subscription fee etc. For us, weather quires are not free and can be quite expensive if we don’t control the number of calls.
If you’ve installed it on your own server, and do not have the caching, then the number will change more often.
April 29, 2021 at 5:52 pm #69954
DaveCParticipantI don’t use weather services so I have no need for weather calls, unless there is info from the call that is used for something else. Since calls cost you, perhaps you could give users like me a way to turn them off or if weather services aren’t being used turn off or slow down the calls automatically.
April 29, 2021 at 7:52 pm #69956
RayKeymasterThe call only incurs cost if you have selected an adjustment method that is not Manual. If you chose ‘manual’ then the weather script only returns things like time zone, sunset/sunrise time, and does not trigger a weather query. So no worries.
April 30, 2021 at 4:26 am #69963
franzsteinParticipantHi Ray,
How I interpret the weather service script caching of the watering percentage will only be performed for Dark Sky. Maybe I’m wrong, but there is no consistent watering percentage across a day for the other weather providers, especially in case of a local PWS.
Can you please give me a hint where I can found the weather service call in Opensprinkler firmware 2.1.9(7) and how I can change it to be executed more often in case of interfacing a local installation of the weather service?
Thanks and regards
Franz
May 21, 2021 at 2:44 pm #70185
franzsteinParticipantI’ve found some time to look at the OpenSprinkler firmware in more detail.
Opensprinkler firmware 2.1.9(7) periodically polls the weather service every 6 hours. The corresponding code can be found on GitHub in OpenSprinkler/OpneSprinkler-Firmware /main.cpp, line 59:
#define CHECK_WEATHER_TIMEOUT 21613L // Weather check interval (in seconds)
Looking up older firmware releases shows that the weather service check interval was increased from 1 hour to 2 hours with firmware release 2.19(4) and thereafter from 2 to 6 hours with firmware release 2.19(5).
Reason for this increased weather check interval is to reduce jamming the weather service as this will produce additional costs in regards to using costly weather providers. However, there are some problems if the sprinkler activity is planned to start at sunrise time or earlier than 6am in the morning:
• Common weather changes, like early morning rainfalls remain probably be unrecognized by OpenSprinkler and lead to wasted water.
• In regards to using weather adjustment methods like Zimmerman, the calculated water level polled by OpenSprinkler may be outdated or not based on yesterday’s
weather data.To avoid these problems I used a programmable power timer to restart OpenSprinkler every Sunday at 0:45am. This leads to a weather service update for the whole week at about 6:45am in the morning well before my 7 am sprinkler watering.
Another possibility might be to shorten the service check interval to 1 hour again. This might be done by updating OpenSprinkler with a private compilation of the OpenSprinkler firmware. As already mentioned the OpenSprinkler team has to pay for all weather queries. For this reason a local weather service installation accessing a personal weather station will be mandatory to avoid any expenses for the OpenSprinkler team.
I’m currently using this updated OpenSprinkler together with a local Netatmo PWS and a Raspberry Pi weather service installation. This allows me to go back to sunrise garden watering again. However, there might be other ideas to avoid the disadvantages described above. Maybe introducing a more controlled weather service polling right before any scheduled watering program will do the job?
Regards
Franz
May 23, 2021 at 3:43 am #70200
modeParticipantIf i am using wunderground with my own api key opensprinkler does not have to pay, right?
I do not want to cause costs for them, since i am using this software in my own hardware and did not purchase anything from them
May 23, 2021 at 5:33 am #70201
franzsteinParticipantIt is my understanding that the OpenSprinkler team only pays for weather queries to DarkSky right now. There might be additional costs for hosting the weather service itself at Amazon Elastic Beanstalk (AWS EB). However, this should be better confirmed by Ray to be on the safe side!
-
AuthorPosts
- You must be logged in to reply to this topic.
OpenSprinkler › Forums › OpenSprinkler Unified Firmware › Weather Service Calls – How often?