TedEbear Posted June 26, 2014 Posted June 26, 2014 Using an ISY994i controller how do I make an event happen every 3rd day?
PurdueGuy Posted June 26, 2014 Posted June 26, 2014 I would use an integer variable. Set it to 0, and increment it by 1 every day at a given time (say 1 AM), and set the init value to the new value. Then at whatever time you want something to happen, have another program that checks the current time AND if the variable is set to 3 or more. The if clause would take whatever action you want, and then set the variable (and init value) back to 0. Then, given an example of something happening at 7 AM, the timeline would be: Day1 - @1 AM - variable increments to 1 Day1 - @7 AM - variable is less then 3, program doesn't run Day2 - @1 AM - variable increments to 2 Day2 - @7 AM - variable is less then 3, program doesn't run Day3 - @1 AM - variable increments to 3 Day3 - @7 AM - variable is 3, program runs, resets to 0 Day4 - @1 AM - variable increments to 1 Day4 - @7 AM - variable is less then 3, program doesn't run Day5 - @1 AM - variable increments to 2 Day5 - @7 AM - variable is less then 3, program doesn't run Day6 - @1 AM - variable increments to 3 Day6 - @7 AM - variable is 3, program runs, resets to 0
MWareman Posted June 26, 2014 Posted June 26, 2014 Make sure that whenever you increment the variable (or set it to 0), you also increment or set the Init value - so the sequence survives reboots....
apostolakisl Posted June 27, 2014 Posted June 27, 2014 You can install this set of programs, which includes an every 3rd day program, plus all the other date functions you might ever want. http://wiki.universal-devices.com/index ... _Variables
Recommended Posts