- Posted on
Wed Aug 02, 2017 12:42 pm
-
dscottbuch
offline
-
- Posts: 90
- Joined: Jan 19, 2004
I have sprinklers that have been run, over the years, by both Rain8 and EZRain devices, both of which work great. Because I want/need to adjust the schedule frequently I have the day/duration schedules for each sprinkler in a separate database for which I've written a user friendly front end. This database supports both daily (i.e. every nth day) and 'by the day' (i.e. Mon, Wed, Fri) schedules for each sprinkler. The tie-back to Indigo is the name of the device (i.e. PopFrontLawnWest). It also supports multiple schedules so you can have a Morning and Evening schedule.
In Indigo the permanent 'schedule event' just tells the script which day and schedule to run at a given time. I have a Schedule event for Mornings at 5AM and Evenings at 6PM so it would call the script with RunSprinklers("Wednesday", "Mornings"). This also has the advantage of being able to turn off sprinklers just by disabling 1 or a couple of Schedules. (I could use a variable also to do this)
The script get the zone/duration data from the database and sets up the detailed schedule events with the zone/duration information, starting each event at a delay time appropriate to the previous durations. It can handle individual addresses for each sprinkler or an Indigo Sprinkler device (it was written before Indigo had Sprinkler devices and published as "sprinkler schedule attachment_I2.scpt". Every schedule action it creates is autoDelete so everything is cleaned up at the end.
So, to continue to have ease of use and flexibility of maintaining the sprinkler schedules in a separate database I believe I need the ability to create schedule events, which is present in AppleScript by not in the Python IOM.
Scott