Schedules in Python?

Posted on
Wed Aug 02, 2017 11:09 am
dscottbuch offline
Posts: 90
Joined: Jan 19, 2004

Schedules in Python?

Is there a schedule for adding schedule access and manipulation in Python? I'm trying to update my sprinkler AppleScript to Python but there doesn't seem to be the equivalent to 'make new time date action' in Python. I asked this question a couple of years ago but I though I'd raise it again, especially with the UTD program in place.

Regards,
Scott

Posted on
Wed Aug 02, 2017 12:14 pm
jay (support) offline
Site Admin
User avatar
Posts: 18199
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Schedules in Python?

No ETA yet - we've had so few requests for it that other things have been a higher priority. In order for us to make determinations about priorities, can you share with us a description of your use case? Add as much detail as possible.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Wed Aug 02, 2017 12:42 pm
dscottbuch offline
Posts: 90
Joined: Jan 19, 2004

Re: Schedules in Python?

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

Posted on
Wed Aug 02, 2017 1:40 pm
jay (support) offline
Site Admin
User avatar
Posts: 18199
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Schedules in Python?

Well, that's pretty complex. We'll take it into consideration when planning future features.

For a residential sprinkler system, yours seems extremely complex. I wonder if there isn't a way to simplify with a fixed number of sprinkler schedules (perhaps using the multiplier functionality) that could be used. You could then create several Indigo schedules with conditions that would examine some variables to determine if the specific schedule should run.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Wed Aug 02, 2017 2:13 pm
dscottbuch offline
Posts: 90
Joined: Jan 19, 2004

Re: Schedules in Python?

In my old house I had 20 stations with fruit trees, vegetables, ornamentals, grass etc. and in Southern California they way their needs change with the year is not simple, especially when you have to meet water restrictions and still keep things growing. At the new home It's not quite as bad but the system, in practice, is not complex to use. The UI is easy to understand and edit things. Its very very quick to completely change the watering. While I'd love to switch to Python I guess I'll have to stick with AppleScript for now.

Posted on
Tue Dec 04, 2018 4:01 pm
dscottbuch offline
Posts: 90
Joined: Jan 19, 2004

Re: Schedules in Python?

Any more thoughts on this?

Thanks,

Posted on
Tue Dec 04, 2018 4:34 pm
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: Schedules in Python?

Definitely on the list and its priority is getting higher, but no ETA.

Image

Posted on
Tue Dec 04, 2018 4:35 pm
dscottbuch offline
Posts: 90
Joined: Jan 19, 2004

Re: Schedules in Python?

Do you know if it will make it before AppleScript is removed?

Posted on
Tue Dec 04, 2018 4:36 pm
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: Schedules in Python?

That is the plan.

Image

Posted on
Tue Dec 04, 2018 4:37 pm
dscottbuch offline
Posts: 90
Joined: Jan 19, 2004

Re: Schedules in Python?

Great! Thanks!

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest