I control my irrigation system with Schedules that trigger Action Groups. Those Action Groups turn on outputs of my old EZIO8T, wired to irrigation valves. Because my old EZIO8T is not 100% reliable, I use Python to loop through turning one of the individual outputs on, and then testing to see if it's really on, continuing to loop until Indigo verifies that the output is really on. Same for turning outputs off.
When I start an irrigation cycle, I set up all the valves to go on one after the other, an hour apart, using delayed actions. When I need to cancel all of those delayed actions, I rely on an AppleScript to rifle through the entire list of Schedules, filtered by delayed actions, and then further filtered by those delayed actions that will execute an Action Group that will turn on an EZIO8T output. Like this:
- Code: Select all
using terms from application "IndigoServer"
repeat with timeDateAction in (time date actions whose name contains "delayed_action")
try
repeat with tActionStep in action steps of timeDateAction
if action type of tActionStep is executeGroup then
if group name of tActionStep contains "Irrigation 1 On" then delete timeDateAction
if group name of tActionStep contains "Irrigation 2 On" then delete timeDateAction
if group name of tActionStep contains "Irrigation 3 On" then delete timeDateAction
if group name of tActionStep contains "Irrigation 4 On" then delete timeDateAction
if group name of tActionStep contains "Irrigation 5 On" then delete timeDateAction
if group name of tActionStep contains "Irrigation 6 On" then delete timeDateAction
if group name of tActionStep contains "Check That Irrigation Is OFF" then delete timeDateAction
end if
end repeat
end try
end repeat
end using terms from
So, because you guys haven't yet allowed access to Action group steps, as in:
Property Type Writable Description
actions list of Action Yes a list of Action objects (action steps in AS) that are executed for this trigger Not yet implemented
I can't figure out how to filter the delayed actions schedules to delete the ones I need to. I can't just blast all delayed actions, because I might have some running for some other purpose. I use delayed actions a lot. And your tools for deleting select delayed actions, for some reason, don't allow deleting delayed actions of type Action Groups. (Which is somewhat ironic!) Why is that?? I can get at Triggers, Devices and Schedules, but not Action Groups.
I've worked around this in other instances, by using Triggers that initiate delayed actions, so I can later delete those, but that's pretty funky, and I don't think I want to use that MO in this case, if I even could.
All of this means I can't upgrade past 7.3 without a solution. So...
Why doesn't Remove Delayed Actions include an option for Action Groups? And will it ever?
For that matter, why not an option for Scenes, too? I have a use for that as well.
And how can I use Python to filter out a Delayed Action that executes an Action Groups as one of its steps?
Or can anyone offer an alternative for cancelling my irrigation schedules?