January 20, 2016 at 5:34 am #41358
Is there a way to add custom water restrictions?
I am in South Africa and the city of Cape Town has implemented Stage 2 water restrictions.
Watering (with drinking water from municipal supply) of gardens, flower beds, sports fields, parks, lawns and other open spaces allowed only on Tuesdays, Thursdays and Saturdays for a maximum of one hour per premises either before 09:00 or after 16:00. (This includes watering with buckets or automated sprinkler systems.)
No watering will be permitted within 24 hours of rainfall that provides adequate saturation.January 24, 2016 at 11:46 pm #41390
That will probably require you to host the weather script on your own server, and that way you can customize the script. The latest firmware allows you to change weather script location:
hence you don’t need to reflash the firmware.January 27, 2016 at 5:42 am #41412
I am no software guru, but if you can point me to some examples of what i need to do and how the script work, i can see if i can get it to work on my local server.February 3, 2016 at 8:55 am #41455
Don’t do what I did and delete all your old programs to cater for this 😉
Simply create a new program and call it “CoCT Stage 2”. Then set it to start at sunrise or even at 7am (Tuesday, Thursday and Saturday). Then divide the allotted hour between all your stations and disable any old programs you had setup. This way switching back around April will be a breeze. (I altered my existing programs, realising too late that it was not required and I had quite a number of programs running independently to give me the flexibility I needed.)
The only thing that I have not enabled is to automatically disable the program when it rained (adequately) the day before. (I think we’re fairly safe until middle March though.) If we do happen to get adequate rain it is easy enough to manually disable the program or OpenSprinkler itself the first thing in the morning or the night before and enable it again when you get back from work.
I know there is a way to use weather predictions, but I have not had the energy to look into how to incorporate predictions. I use YR.no and find them the most accurate of all, but even they make adjustments a few hours before the current time. I’m lucky enough that they have a prediction for my neighbourhood but it still does not mean that if they predict 3mm that I will get all of it at my property. So to get this to work accurately, we’ll probably have to amend the code to use predictions in conjunction to a rain sensor and/or on-site rain meter for the lucky ones.February 16, 2016 at 11:45 pm #41530
It’s kind of hard to explain how the weather script works. Here is the simplified version. First, the firmware sends a weather call in this function:
as you can see, it takes the weather script location (which you can modify from the /su page), attaches a bunch of parameters (notably the location, and the WUnderground API key), and issues an HTTP GET command. The script is assumed to be a python script (but you can use other scripting languages as well). Upon returning, this is the callback function that handles the return data:
If you write your own custom script, it just needs to return data in the format that the above function can parse. For example this is what the current script returns:
- You must be logged in to reply to this topic.