johnmsch Posted October 26, 2009 Posted October 26, 2009 New ISY-99i user here, and I have a very basic question about programming. For one of the lights I have, I setup two programs. One will turn the light on one hour before sunset, and another will turn it off one hour after sunrise. In going back through the User Guide, I found this sample program: If From Sunset + 20 minutes To 10:00:00PM (same day) Then Set Scene 'FrontDoor' On Else Set Scene 'FrontDoor' Off While this is a lot neater than having two separate programs, doesn't this method constantly send On or Off signals to that switch? Or does this program only run twice per day, once at Sunset + 20 minutes, and again at 10:00pm? Thanks
MikeB Posted October 26, 2009 Posted October 26, 2009 Hi John - It runs twice per day. At Sunet + 20 minutes the THEN portion is run, and at 10:00pm the ELSE portion is run.
johnmsch Posted October 26, 2009 Author Posted October 26, 2009 Thanks Mike. Just to be sure I have this right, I took a program that turns a light on 2 hours before sunset, and merged it with one that turns that light off 2 hours after sunrise. Here's what I have now: If From Sunset - 2 hours To Sunrise + 2 hours (next day) Then Send X10 'J9/On (3)' Else Send X10 'J9/Off (11)' So, if I understand correctly, the "Then" clause will run at Sunset - 2 hours, and the "Else" clause will run 2 hours after sunrise the next day? I'd hate to look at the log and see that every few seconds the ISY is sending the same command (on or off), over and over again to the J9 X10!
johnmsch Posted October 26, 2009 Author Posted October 26, 2009 Thanks for the info. I do appreciate it.
Illusion Posted October 26, 2009 Posted October 26, 2009 You can also do some elegant program saving steps with something as simple as a control switch like: If Control 'Bedroom ControLinc.1' is switched On And Control 'Bedroom ControLinc.1' is not switched Off Then Send X10 'E1/On (3)' Else Send X10 'E1/Off (11)' As a new user it took a while for me to get used the the fact that the ISY is event based. This is why it does not keep sending commands. It runs the then when the conditions become true and the else when the conditions become false. This is important to remember when building new programs because this efficiency does have some unexpected consequences for the uninitiated. For example, in your program, if you were to turn off the J9 manually when it was on because the program had turned it on, the light would stay off till the next event changed the condition of this program. IE: J9 would not get turned on by the ISY until the next night, when the conditions once again became true.
Recommended Posts