jboone9731 Posted May 23, 2013 Posted May 23, 2013 My wife works an odd schedule. 7 days on, 2 off, 8 on, 4 off, repeat. I'd like to have the ISY preform one set of actions when she's off, and another set when she is at work. Just mainly lighting, irrigation and a few outlets. Nothing to fancy. I just haven't been able to figure out a way to match this schedule. Can anyone give me a few pointers on where I should start, or if this is even possible? I've heard of some automation software being able to sync with a Google calendar, but I love the ISY and don't want to shell out for more software if I can avoid it.
oberkc Posted May 23, 2013 Posted May 23, 2013 I believe that the ISY- software does have a few limitations regarding scheduling. While it CAN do any day, or combination of days, per seven-day week, it cannot do a given day each month or a given day each year, or a given week/month each year. Your problem, however, may be reasonably doable with variables. If I were tackling this problem, I would define a variable (integer type, I think), and assign values based upon which day of your 21-day (7+2+8+4) cycle it is. Value 1-7, 10-17 is a work day...8, 9, 18-21 is an off day. Once defined, you could then create a program with logic something like: if time is whatever you want for a work day actions and integer variable is 1-7 or 10-17 then take workday action add 1 to the integer variable else if time is whatever you want for a nonworkday action and integer variable is 8, 9, 18, 19, 20, or 21 then take nonworkday action add 1 to the integer variable else if time is middle of the night when nothing else is happening and integer variable iis > 21 then set integer variable to 1 I don't have exact syntax memorized for all these steps, so I propose only the logical construct. I am confident, however, that these logical steps can be accomplished with ISY programming. Hopefully, this concept can give you some ideas how to start. If you have trouble with converting this logic to ISY-speak, post back.
jboone9731 Posted May 23, 2013 Author Posted May 23, 2013 You gave me a great starting point. I have yet to use variables for anything. I'm just beginning to learn the ISY. Thank you very much for your advice.
Xathros Posted May 23, 2013 Posted May 23, 2013 I would move the incrementing of the integer mvar to a program that runs once per day just after midnight and have it call a second program that says if mvar >= 22 then mvar=1. This way you can have more than one event per day based on this data. -Xathros
Recommended Posts