OpenSprinkler › Forums › OpenSprinkler Unified Firmware › weather algorithm
- This topic has 3 replies, 2 voices, and was last updated 9 years, 10 months ago by Robert.
-
AuthorPosts
-
March 7, 2015 at 4:50 pm #35866
RobertParticipantHi, The weather algorithm (Zimmerman) seems to have a few major issues.
First, it’s mean temperature appears to be getting the MINIMUM temperature. See attached screenshot.
That day it hit over 82F. And with the algorithm it decided all week to water almost zero (see current watering of 15%). I am in southern california, 82F isn’t a typo 🙂
The second problem compounds the first one. Because the temperature below 70F (each degree) decreases the watering % by 4%, this means that we are getting 80% reduction in watering time just because we have a low at night of 50F even though a high of 80F.
I have the latest unified code up and running but can’t seem to find where to modify the algorithm for weather calculation/%. If someone can point me where to change it (or is it now in the javascripts?).
I highly recommend that the weight of the temperature (i.e. 4% per F, or 2% per F, etc) should be user programmed (or at a less aggressive weight). Personally I’ve used a system for years that used 1% per F and it worked pretty well. Either the average temperature or the max temperature should be used for this calculation. Hopefully the humidity weight can also be varied.
FYI just got a flow sensor working on the OS. I’ll find the right place to post that for discussion/sharing.
Attachments:
March 7, 2015 at 8:01 pm #35878
RayKeymasterThe exact Zimmerman algorithm is documented here:
https://opensprinkler.freshdesk.com/solution/categories/5000022938/folders/5000099525/articles/5000017312-using-weather-adjustments
It uses the average humidity and mean temperature. The average humidity is calculated from min/max humidity (both reported by WUnderground), and the mean temperature is directly reported by WUnderground. Although the highest temperature may be 82 F, the mean temperature over the day, in your case, was only 53 F. From your screen shot, the 15% result is correct. It’s calculated by 100% + (30% – (15%+79%)/2) – (70 – 53) * 4% = 15%The weather adjustment code is written in Python and is hosted on our server. If you want to customize the formula, you can host the Python script on your own server, and change the ‘WEATHER_SCRIPT_HOST’ macro define in file defines.h accordingly. The code assumes that the script is at:
WEATHER_SCRIPT_HOST/weather1.py
The reason it’s done this way is that the microcontroller is not powerful enough to parse XML data from WUnderground, so it’s necessary to relay the data to a cloud server, which does the calculation and returns the % watering parameter back to OS.We are actually trying to implement ET-based algorithm, which is a more standard way to calculate water time. Hopefuly this will make the weather calculation more accurate.
March 7, 2015 at 8:32 pm #35880
RobertParticipantI agree that the Zimmerman algorithm as documented is working as documented (from the data it displays). However, Wunderground calls out my min temp of around 54F and the App is calling out my MEAN (i.e. average) temperature to be 54. I believe either Wunderground or the script is getting/giving the wrong temperature value(grabbing min instead of mean). Realize my high for the day is 83F. Mean temperature can’t be 54 (ok at least not in my city )
I hope you see the problem with having almost zero watering on an 80+F weather day. I hope it gets revised, otherwise i doubt anyone will use that feature without regrets.
Two of the main reasons I was interested in the OS design (ok 3) is 1. open source, 2. flow rate measurement/customization and 3. weather adjustments
For now I’m adjusting watering % manually so my plants don’t die 🙂
If that gets figured out then this blows away my previous ‘smart’ irrigation controller.
March 7, 2015 at 8:37 pm #35881
RobertParticipantWould you consider a HILLMAN algorithm as an option people can choose too? 🙂
You don’t have to call it HILLMAN you can call it XYZ or whatever.
If the MEAN temp gets figured out then I’d just like 1 degree change = 1 percent change, and 1 % humidity equals 1% watering change.
where the temperature used is the MAX, for the day and not the min or MEAN.
I don’t have a server to run the script on. -
AuthorPosts
- You must be logged in to reply to this topic.
OpenSprinkler › Forums › OpenSprinkler Unified Firmware › weather algorithm