jmed999 Posted December 10, 2012 Posted December 10, 2012 I just manually updated the ISY to the latest version and noticed one of my thermostats had adjusted to an economy mode due to the program below. How can I change this program such that it doesn't do this every time I update the software? The program is supposed to adjust the thermostat when my cleaning lady disarms the Elk M1G and again when she arms the system as she leaves. If On Thu From 8:00:00AM To 4:00:00PM (same day) And Elk Output 'Output 065' is On And $i.Every.Other.Thursday is 0 Then Set 'Thermostats / Downstairs Stat' 74° (Cool Setpoint) Set 'Thermostats / Downstairs Stat' 70° (Heat Setpoint) Else Set 'Thermostats / Downstairs Stat' 85° (Cool Setpoint) Set 'Thermostats / Downstairs Stat' 64° (Heat Setpoint) I guess updating the ISY software runs the "if" part of this program and turns my thermostat to the economy setting. How can I keep this form happening?
TJF1960 Posted December 10, 2012 Posted December 10, 2012 Not sure which is the economy setting, the Then or the Else but the first thing that comes to mind is that when the ISY is finished upgrading it will reboot which will set all variables to 0 unless they are initialized. Could this be the cause?
jmed999 Posted December 10, 2012 Author Posted December 10, 2012 Not sure which is the economy setting, the Then or the Else but the first thing that comes to mind is that when the ISY is finished upgrading it will reboot which will set all variables to 0 unless they are initialized. Could this be the cause? Thanks for the reply. The economy setting is the "else" statement. Not sure if that's the problem or not.
sanders2222 Posted December 10, 2012 Posted December 10, 2012 I use a different approach to do the same thing. When I arm the ELK 'Away', that change triggers procedures to put house in 'economy' mode. When I come home and it's disarmed, then procedures run to turn things back up. I also can use my mobile device before I head home to bring the t-stat setting up so the house is nice and warm by the time I get there. If Elk Area 'House Main' 'Arm Up State' is Armed Fully And ( Elk Area 'House Main' 'Armed State' is Armed Away Or Elk Area 'House Main' 'Armed State' is Armed Vacation ) Then Set Scene 'Lights Upstairs' Off Set Scene 'Lights Down' Off Set Scene 'Utility Room / Away' Fast On Run Program 'Set Away' (Then Path) Else - No Actions - (To add one, press 'Action') The above procedure automatically executes when the ELK becomes fully armed in Away or Vacation mode. Then disarming automatically executes the following procedure that restores the settings for being home. If Elk Area 'House Main' 'Armed State' is Disarmed And $iAway is 1 Then Run Program 'Set Arrive' (Then Path) Else - No Actions - (To add one, press 'Action') If the ELK is armed Stay, my variable iAway is 0 which prevents this program from running when I disarm the ELK in the morning.
TJF1960 Posted December 10, 2012 Posted December 10, 2012 I use a similar approach as sanders2222. However, I think the key will be breaking your program into 2 programs jmed999 to get rid of the else statement. Create another program with the current else in the then section and set up the conditions for when you want it to run. Having anything in the else section can be tricky, especially when you have more than 1 conditon. Most of the time it is just plain easier to have 2 programs instead.
sanders2222 Posted December 10, 2012 Posted December 10, 2012 I think the key will be breaking your program into 2 programsThat is one VERY IMPORTANT key and the second is that the arm/disarm procedures call other programs that have no other 'If' conditions. A third rule to follow is to use mutiple simple programs (that you know work correctly) instead of one complex one. The program debugging tools that come with the ISY are not very good.
Recommended Posts