OpenSprinkler Forums OpenSprinkler Unified Firmware Custome Water Restrictions Reply To: Custome Water Restrictions



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: