hart2hart Posted October 21, 2011 Posted October 21, 2011 I want to run a program at reboot (power failure) so I can manually reset the value of a couble program variables that need to be persisted. I'll upgrade to 3.1.? when I have time but system is rock solid and I don't need another project now Easy enough to say run at startup but what "if" condition should I use? Device status, schedule etc?
LeeG Posted October 21, 2011 Posted October 21, 2011 There is no requirement for anything to be in the If. The following Program which is marked to run at startup sets $IVar4 to 10 If - No Conditions - (To add one, press 'Schedule' or 'Condition') Then $IVar4 = 10 Else - No Actions - (To add one, press 'Action') EDIT: 3.1.10 has been solid except for a network resource issue that is fixed by applying 3.1.11 on top of 3.1.10. 3.1.10 has to be installed first as 3.1.11 is a firmware only fix. 3.1.11 is required only if having a problem with Network Module network resources not working when the WeatherBug module is not installed.
apostolakisl Posted October 21, 2011 Posted October 21, 2011 I want to run a program at reboot (power failure) so I can manually reset the value of a couble program variables that need to be persisted. I'll upgrade to 3.1.? when I have time but system is rock solid and I don't need another project now Easy enough to say run at startup but what "if" condition should I use? Device status, schedule etc? That is what the "init" value for the variables does. Whatever program sets your variables in the first place just needs to simultaneously init the value. No need to run a program at reboot, the variable will automatically go to the init value. The program below is an example. The program sets the variable and then it immediately changes the init value so it will persist through a power failure. You should do this with all variables you want to persist through a power failure. The only time you shouldn't do it is if you want a power failure to cause the variable to be different. Then right a program that runs only at startup. If - No Conditions - (To add one, press 'Schedule' or 'Condition') Then $iOdd.Even.Day = $iDay.of.Month $iOdd.Even.Day %= 2 $iOdd.Even.Day Init To $iOdd.Even.Day Else - No Actions - (To add one, press 'Action')
hart2hart Posted October 21, 2011 Author Posted October 21, 2011 ...just assumed program had to have a condition. Thanks for information about 3.1.?, UD always has solid software and the best support of any product I've ever purchased. I've had HS for years starting in X10 days -- only use it today for interface to DSC panel so I'm look forward to upgrading to variables, implementing DSCLink and retiring HS 2.x. We'll see if 3.x adds any value but I doubt it since all I read is Zwave as in waving goodbye
Recommended Posts