BigEfromDaBx Posted September 2, 2016 Posted September 2, 2016 So have an away mode for MY AC using a variable which Im still undecided how I will set the variable. For now I just set the variable manually. I made two folders. One for Home and one for away. In my home folder I have 6 programs that change the temperature on my ac based on the time and date ($home is 1). In my away folder I have one program which sets the temperature to 82 when im in away mode ($home is 0). The problem im having is that when I set the variable to 0 it sets my AC to 82 with no issues. But when I set it back to 1 the AC stays at 82 even though when I go to the summary the status will say true. Below is what my folders consist of. I will show the away folder first because it has less info. Thanks for your help. Away Folder >>>>>>>>>>>>>>>>>>> =================================================================================== Away - [iD 001C][Parent 0001] Folder Conditions for 'Away' If $Home is 0 Then Allow the programs in this folder to run. ----------------------------------------------------------------------------------- Set Thermostat to 82 - [iD 001E][Parent 001C] If $Home is 0 Then Set 'Thermostat - Main' Mode Cool Set 'Thermostat - Main' Fan Auto Set 'Thermostat - Main' 82° (Cool Setpoint) Else - No Actions - (To add one, press 'Action') Home Folder >>>>>>>>>>>>>>>>>> =================================================================================== Home - [iD 001B][Parent 0001] Folder Conditions for 'Home' If $Home is 1 Then Allow the programs in this folder to run. ----------------------------------------------------------------------------------- AC-Weekdays-Day-1 - [iD 0012][Parent 001B] If On Mon, Tue, Wed, Thu, Fri From 9:00:00AM To 3:59:00PM (same day) Then Set 'Thermostat - Main' Mode Cool Set 'Thermostat - Main' Fan Auto Set 'Thermostat - Main' 80° (Cool Setpoint) Else - No Actions - (To add one, press 'Action') ----------------------------------------------------------------------------------- AC-Weekdays-Day-2 - [iD 000F][Parent 001B] If On Mon, Tue, Wed, Thu, Fri From 4:00:00PM To 10:59:00PM (same day) Then Set 'Thermostat - Main' Mode Cool Set 'Thermostat - Main' Fan Auto Set 'Thermostat - Main' 78° (Cool Setpoint) Else - No Actions - (To add one, press 'Action') ----------------------------------------------------------------------------------- AC-Weekdays-Night-1 - [iD 0010][Parent 001B] If On Sun, Mon, Tue, Wed, Thu From 11:00:00PM To 4:59:00AM (next day) Then Set 'Thermostat - Main' Mode Cool Set 'Thermostat - Main' Fan Auto Set 'Thermostat - Main' 74° (Cool Setpoint) Else - No Actions - (To add one, press 'Action') ----------------------------------------------------------------------------------- AC-Weekdays-Night-2 - [iD 0013][Parent 001B] If On Mon, Tue, Wed, Thu, Fri From 5:00:00AM To 8:59:00AM (same day) Then Set 'Thermostat - Main' Mode Cool Set 'Thermostat - Main' Fan Auto Set 'Thermostat - Main' 78° (Cool Setpoint) Else - No Actions - (To add one, press 'Action') ----------------------------------------------------------------------------------- AC-Weekends-Day - [iD 001D][Parent 001B] If On Sat, Sun From 10:00:00AM To 10:59:00PM (same day) Then Set 'Thermostat - Main' Mode Cool Set 'Thermostat - Main' Fan Auto Set 'Thermostat - Main' 78° (Cool Setpoint) Else - No Actions - (To add one, press 'Action') ----------------------------------------------------------------------------------- AC-Weekends-Night - [iD 001F][Parent 001B] If On Sat, Fri From 11:00:00PM To 4:59:00AM (next day) Then Set 'Thermostat - Main' Mode Cool Set 'Thermostat - Main' Fan Auto Set 'Thermostat - Main' 74° (Cool Setpoint) Else - No Actions - (To add one, press 'Action')
larryllix Posted September 2, 2016 Posted September 2, 2016 (edited) Your program trigger to detect you are hone is the same one that enables the folder and allows the program to "see' the trigger. You have a race and apparently the folder gets handled last so your program is blind to the change. I would remove the condition from the folder and test. Another thing I prefer, is to set the stat into vacation/home mode. That way, any changes made on the stats become effective without running Admin Console and other clumsy (for every day usage) programs. I use multiple MSes to control my Occupied mode. Based on that and a 16 hour delay, I then flag $sVacation as true. $sVacation sets my stat temperatures back when it changes. Any movement gets a four hour timer to indicate house occupied. After midnight to 8:00 AM, no timer will change that. If the usually mudroom exit place MS gets triggered, the timer is only 20 minutes. If I set my KPL password into the security system programs, Occupied is False immediately after a 1 minute beeper warning. My house will correct about one degree per hour so, if I correct my stat when I enter the house, I will be tossing and turning in the heat and humidity all night. My setbacks are much more conservative. In view of that, I try to remember to set my stat back to Home mode the morning I am travelling home again. Edit:Typos Edited September 2, 2016 by larryllix
BigEfromDaBx Posted September 2, 2016 Author Posted September 2, 2016 Your program trigger to detect yu are hone is the same one that enables the folder and allows the program to "see' the trigger. You have a race and apparently the folder gets handled last so your program is blind to the change. I would remove the condition from the folder and test. Another thing I prefer is to set the stat into vacation/home mode. That way any changes made on the stats become effective without running AC and other clumsy (for every day usage) programs. I use multiple MSes to control my Occupied mode. Based on that ad a 16 hour delay I then flag $sVacation as true. $sVacation sets my stat temperatures back when it changes. Any movement gets a four hour timer to indicate house occupied. After midnight to 8:00 AM no timer will change that. If the usually mudroom exit place MS gets triggered the timer is only 20 minutes. If I set my KPL password into the security system programs Occupied is False immediately after a 1 minute beeper warning. My house will correct about one degree per hour so if I correct my stat when I enter the house I will be tossing and turning in the heat and humidity all night. Y setbacks are much more conservative. In view of that I try to remember to set my stat back to Home the morning I am travelling home again. Thanks @larryllix. I tried removing the condition from the away folder and tested but it did not work. I also did the opposite where I removed the conditions from the home folder and it did not work also. I also put a AND condition $Home is 1 to the programs in my home folder and it did not work also. So this is how I got it to work. Being that my programs wont run until the time specified I made another program and put it in the Home folder that Runs the (If) on all my programs in the home folder when $Home is 1. VOILA Thanks for all your help guys. Especially @larryllix. You always seem to reply to my topics Check all Programs - [iD 0020][Parent 001B] If $Home is 1 Then Run Program 'AC-Weekdays-Day-1' (If) Run Program 'AC-Weekdays-Day-2' (If) Run Program 'AC-Weekdays-Night-1' (If) Run Program 'AC-Weekdays-Night-2' (If) Run Program 'AC-Weekends-Day' (If) Run Program 'AC-Weekends-Night' (If) Else - No Actions - (To add one, press 'Action')
larryllix Posted September 2, 2016 Posted September 2, 2016 (edited) Thanks @larryllix. I tried removing the condition from the away folder and tested but it did not work. I also did the opposite where I removed the conditions from the home folder and it did not work also. I also put a AND condition $Home is 1 to the programs in my home folder and it did not work also. So this is how I got it to work. Being that my programs wont run until the time specified I made another program and put it in the Home folder that Runs the (If) on all my programs in the home folder when $Home is 1. VOILA Thanks for all your help guys. Especially @larryllix. You always seem to reply to my topics Check all Programs - [iD 0020][Parent 001B] If $Home is 1 Then Run Program 'AC-Weekdays-Day-1' (If) Run Program 'AC-Weekdays-Day-2' (If) Run Program 'AC-Weekdays-Night-1' (If) Run Program 'AC-Weekdays-Night-2' (If) Run Program 'AC-Weekends-Day' (If) Run Program 'AC-Weekends-Night' (If) Else - No Actions - (To add one, press 'Action') I may have missed a big point here. To trigger program and IIRC to get the attention of a folder condition, from the ISY engine, the variable used must be a STATE variable. Integer variables do NOT cause evaluations to trigger programs or folder evaluations upon value changes. Also....most of us use a prefix signifier to signify State variable usage. It helps everybody, including yourself to know what type of variable you have used. I use $sVariable_name, and some use $s.Variable_name. Note: I do not prefix my Integer variables, others may. You are very welcome. I just hope it helps the way others help/ed me. Edited September 2, 2016 by larryllix
BigEfromDaBx Posted September 2, 2016 Author Posted September 2, 2016 I may have missed a big point here. To trigger program and IIRC to get the attention of a folder condition, from the ISY engine, the variable used must be a STATE variable. Integer variables do NOT cause evaluations to trigger programs or folder evaluations upon value changes. Also....most of us use a prefix signifier to signify State variable usage. It helps everybody, including yourself to know what type of variable you have used. I use $sVariable_name, and some use $s.Variable_name. Note: I do not prefix my Integer variables, others may. You are very welcome. I just hope it helps the way others help/ed me. I do admit I am a noob when it comes to the ISY. But I setup $Home as a state variable. I dont know the difference between the State and Integer. I only used state because my mobilinc geofence used it. See snapshot.
larryllix Posted September 2, 2016 Posted September 2, 2016 (edited) I do admit I am a noob when it comes to the ISY. But I setup $Home as a state variable. I dont know the difference between the State and Integer. I only used state because my mobilinc geofence used it. See snapshot.No Noob there when it comes to posting screenshots etc. When State variables change value they cause the ISY real-time engine to run through your programs and evaluate any logic that contains that variable, usually in the If section. Using too many (hundreds to thousands) may bog down the real-time engine processing, so IMHO you want to limit your State variable usage to only key variables that are needed for this function. This doesn't happen with Integer variables. Integer variables do not trigger any evaluation and just sit there doing nothing. Consider them lazy. I use hundreds of them to define values as in constants that never change. eg $TRUE, $FALSE Both types of variables can be used as logic filters eg: If 20 <= $sVar <= 30, just as well. The gotcha' comes in when you use trigger causing items (State variables, time periods etc.), as conditional logic filters in programs. They can cause sneaky triggers of Then and/or Else programs sections unless the program is disabled. Then the only way you can get the program to run is to call it from another program. EG: If . . $sVar >= 20 Then . . do something . . Wait 10 seconds . . do something else Else . . -- If $sVar changes to 19 while Then is running it will stop during the Wait and run the Else. Got it? ... ....Send money! Edited September 2, 2016 by larryllix
BigEfromDaBx Posted September 2, 2016 Author Posted September 2, 2016 No Noob there when it comes to posting screenshots etc. When State variables change value they cause the ISY real-time engine to run through your programs and evaluate any logic that contains that variable, usually in the If section. Using too many (hundreds to thousands) may bog down the real-time engine processing, so IMHO you want to limit your State variable usage to only key variables that are needed for this function. This doesn't happen with Integer variables. Integer variables do not trigger any evaluation and just sit there doing nothing. Consider them lazy. I use hundreds of them to define values as in constants that never change. eg $TRUE, $FALSE Both types of variables can be used as logic filters eg: If 20 <= $sVar <= 30, just as well. The gotcha' comes in when you use trigger causing items (State variables, time periods etc.), as conditional logic filters in programs. They can cause sneaky triggers of Then and/or Else programs sections unless the program is disabled. Then the only way you can get the program to run is to call it from another program. EG: If . . $sVar >= 20 Then . . do something . . Wait 10 seconds . . do something else Else . . -- If $sVar changes to 19 while Then is running it will stop during the Wait and run the Else. Got it? ... ....Send money! I GOT I!! I been in the graphic design/print industry for 15+ years. Snapshots do not make me a non noob lol
Recommended Posts