SHM Posted Sunday at 02:54 PM Posted Sunday at 02:54 PM I have a motion sensor that detects the presence of my car in the garage. The presence or absence (1 or 0) is saves in a state variable, $caringarage. When there is a power failure or any event that causes the Polisy to re-initialize, $caringarage is reset to 0. The ISY manual shows a way to preserve the state variable value, but the syntax is confusing. Any suggestions/examples? Quote
paulbates Posted Sunday at 03:00 PM Posted Sunday at 03:00 PM There is a way. Right after you set the variable, put an 'init to' as the next program statement with the same value. It will survive the reboot. Quote
paulbates Posted Sunday at 03:09 PM Posted Sunday at 03:09 PM (edited) Here's an example I use to keep data for my sump pump. You' ll always need two variable statements, one to assign the value, and one to tell the isy to remember it even if it reboots. If 'TimeData' Day of Month is 1 days And Time is 11:59:55PM Then $Sump_Pump_Maximum_daily_Gallons = $Sump_Pump_Gallons_Daily $Sump_Pump_Maximum_daily_Gallons Init To $Sump_Pump_Maximum_daily_Gallons Edited Sunday at 03:10 PM by paulbates 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.