telljcl Posted October 31, 2014 Posted October 31, 2014 (edited) Edit: Still testing - couldn't seem to delete post... Edited October 31, 2014 by telljcl
randyth Posted October 31, 2014 Posted October 31, 2014 I don't think we can evaluate your program without seeing what is changing the AC_Temp_Difference_Cool_Den variable. In any case, is AC_Temp_Difference_Cool_Den a State variable? If it isn't, try making it one and see if that helps you achieve your expected result. -Randy
telljcl Posted October 31, 2014 Author Posted October 31, 2014 Thanks - sorry for lack of info as I'm still changing a few things. It is not a state variable - should it be? Not sure of the difference. Thanks
LeeG Posted October 31, 2014 Posted October 31, 2014 (edited) State variables changing value can trigger programs, Integer variables changing values do not trigger Programs. That is the difference between a State and Integer variable. EDIT: folks have found it a good practice to indicate in the Variable name whether a State or Integer variable. $ixxx or $Ixxx - I use a capital "I" but case makes no difference $sxxx or $Sxxx it serves as a reminder and makes programs self documenting. Edited October 31, 2014 by LeeG
telljcl Posted October 31, 2014 Author Posted October 31, 2014 (edited) Well that explains a lot. I've got about 70 variables and things seem to work pretty well - maybe I'm lucky in how I'm using them. I'll need to go through it all (that's going to take a while...) and see if some i variables need to be changed to s. I know I've got programs that use integer variables in the "if" part - not sure why they've been working... Thanks for the clarification. Edited October 31, 2014 by telljcl
stusviews Posted October 31, 2014 Posted October 31, 2014 You can have integer variables in the "If" part if there is some other trigger.
telljcl Posted October 31, 2014 Author Posted October 31, 2014 (edited) Well that explains a lot also. I've never professed to be any kind of expert on ISY - far, far from it - but it's amazing I'm just now figuring this out. I've been lucky I guess. Just wish I could somehow change some of these variables over easily. Edit: search and replace... Nice. Thanks! Edited October 31, 2014 by telljcl
LeeG Posted October 31, 2014 Posted October 31, 2014 (edited) Stu makes a good point, Integer Variables CANNOT trigger a Program but CAN affect the True/False evaluation of the If clause when the Program is triggered by something else. "device1" being switched On triggers the Program and the value in the Integer variable affects the True/False analysis. Changing the value of $Integer1 NEVER triggers the Program. It must be triggered by "device1" but once triggered the value of Integer1 must be 0 for the If to be True and run the Then clause. If Control 'device1' is switched On And $Integer1 = 0 Then Edited October 31, 2014 by LeeG
telljcl Posted November 1, 2014 Author Posted November 1, 2014 I'm not sure how I've been able to have programs that work for so long not understanding this properly - lucky I guess. I've changed the variables that I need to rely on most to State - didn't take that long with the search / replace feature. Things seem to be 100%. Thanks!
Bob P. Posted November 7, 2014 Posted November 7, 2014 I recall adding an integer variable with the same name as an existing state variable, and my ISY totally locked up. I had to do a factory reset and backup restore to get it back. I'm not sure if this was a fluke, but be careful when changing variables from state to integer.
Recommended Posts