OpenSprinkler › Forums › OpenSprinkler Unified Firmware › How to do time-of-year
Tagged: cron API
- This topic has 3 replies, 3 voices, and was last updated 7 years ago by
Ray.
-
AuthorPosts
-
February 6, 2019 at 8:46 pm #53960
kdeulerParticipantHi. Is there a way to configure OSPI to adjust general watering based on time-of-year?
For example say i want to have the system automatically change the water percentage to 80% Nov 1, then 60% Dec 1, then the opposite in late winter.
Thanks.
February 7, 2019 at 5:24 pm #53964
AnonymousInactiveNot currently, you would have to take up Ray’s suggestion reproduced here.
An alternative option is to run a script that periodically sends command to OpenSprinkler to update its watering percentage parameter. This is probably an easier route as there is no need to change the weather script url. Instead you will use a script that calculates the watering percentage the way you want, and send it to OpenSprinkler through one of the HTTP GET command (check OpenSprinkler API document for the corresponding command and parameters).
I’m waiting until the weather adjustment is sorted out, the weather providers keep crippling the API’s to their data services.
If anyone can point to instructions on how to “run a script that periodically sends command to OpenSprinkler” I’d be grateful.
There’s probably a neat solution using https://ifttt.com/ and a calendar.
UPDATE:
A neat example of how to set up IFTTT Maker channel to change opensprinkler settings.
https://opensprinkler.com/ifttt-with-opensprinkler-and-opengarage/
May 3, 2019 at 3:02 pm #60118
kdeulerParticipant@ian Belated thanks for your comments. Did you ever get an answer to your question “If anyone can point to instructions on how to “run a script that periodically sends command to OpenSprinkler” I’d be grateful.” in your reply to me above?
I see and understand the syntax HTTP GET command for changing the percentage. My question is, how do you actually send this command to the firmware to affect a change. I’d like to park such a command in a cron job(s) to send a percentage update at various times of year. But, what is the sytax in the cron job OUTSIDE of the command itself. EG, it seems like a URL is needed, maybe aport. Perhaps there needs to be a command to set a temp userid.
Thanks.
-Kurt
May 16, 2019 at 5:15 am #60420
RayKeymasterMany programming languages, particularly scripting ones (Python, Javascript etc., or even using curl or wget in Linux shell script), support sending HTTP commands.
-
AuthorPosts
- You must be logged in to reply to this topic.
OpenSprinkler › Forums › OpenSprinkler Unified Firmware › How to do time-of-year