johnnyt Posted February 17, 2015 Posted February 17, 2015 I have some things I want done before a shutdown or reboot, including sending some emails and committing some variables to NVRAM. I didn't see a way to run a program automatically whenever ISY is about to shutdown. I normally run one manually when I know or plan a reboot but sometimes get caught in an ISY initiated reboot, e.g. I updated IP address settings recently and ISY needed to reboot but gave no warning ahead of time or chance to back out of the action. Is there a way?
paulbates Posted February 17, 2015 Posted February 17, 2015 (edited) Johnny Not for shut down, but you can mark programs to run on start up. For what I need to do, I consider that the same thing. I won't help with writing variables, but can with other things, Would that work for you? Sent from my iPad using Tapatalk HD Edited February 17, 2015 by paulbates
Xathros Posted February 17, 2015 Posted February 17, 2015 Why wait to store your critical vars. sny that I need saved, i copy to init with every change. That way I'm covered for any power fail or reboot. . -Xathros Sent from my iPhone using Tapatalk
johnnyt Posted February 18, 2015 Author Posted February 18, 2015 I have several variables I don't "init" each time they change but rather at strategic times during the day, or only when an else condition runs (in case of timers). This is to keep the wear on my SD drive to a dull roar. (I have over 270 variables and over 750 programs) At start up the data is gone. Here's my (currently manual) shutdown program: 1-1Save All Counters - for reboot If - No Conditions - (To add one, press 'Schedule' or 'Condition') Then Run Program 'Persist Counters - Daytime Use Only' (Then Path) Run Program 'Persist Counters in use all day' (Then Path) Run Program 'Persist HVAC Sensor Use Counters' (Then Path) Send Notification to 'jt.ha' content 'HVAC Status' Else - No Actions - (To add one, press 'Action') And the programs that gets called by the above or at other times. Persist Counters in use all day If Time is 2:00:04AM Or Time is 8:00:00AM Or Time is 2:00:04PM Or Time is 8:00:00PM Or $sPowerFailure > 0 Then $iSensorCount.Driveway Init To $iSensorCount.Driveway $iHVAC.FilterScore.BedroomWIC Init To $iHVAC.FilterScore.BedroomWIC $iHVAC.FilterScore.Furnace Init To $iHVAC.FilterScore.Furnace $iHVAC.FilterScore.ColdStoreDehumidifier Init To $iHVAC.FilterScore.ColdStoreDehumidifier $iHVAC.FilterScore.BasementDehumidifier Init To $iHVAC.FilterScore.BasementDehumidifier $iHVAC.Count.Dehumidify Init To $iHVAC.Count.Dehumidify $iCount.ColdStoreFan Init To $iCount.ColdStoreFan $iCount.Dehumidifier.ColdStore Init To $iCount.Dehumidifier.ColdStore $iHumMaxDifference.ForColdStore Init To $iHumMaxDifference.ForColdStore $iHumMaxDifference.ForHouse Init To $iHumMaxDifference.ForHouse $iCount.Dehumidifier.Bsmt Init To $iCount.Dehumidifier.Bsmt $iHVAC.Count.FanLow Init To $iHVAC.Count.FanLow $iHVAC.Count.FanHigh Init To $iHVAC.Count.FanHigh $iHVAC.Count.BedroomVentHigh Init To $iHVAC.Count.BedroomVentHigh $iHVAC.Count.BedroomVentLow Init To $iHVAC.Count.BedroomVentLow $iCalcOudoorTempMin Init To $iCalcOudoorTempMin $iCalcOutdoorTempMax Init To $iCalcOutdoorTempMax $iCount.SynchroLinc.SingleRun Init To $iCount.SynchroLinc.SingleRun $iCount.SynchroLinc.Total Init To $iCount.SynchroLinc.Total Else - No Actions - (To add one, press 'Action') Persist HVAC Sensor Use Counters If $sPowerFailure > 0 Then $iHVAC.Count.HeatCall Init To $iHVAC.Count.HeatCall $iHVAC.Count.Dehumidify Init To $iHVAC.Count.Dehumidify $iHVAC.Count.ACCall Init To $iHVAC.Count.ACCall $iHVAC.Count.BasementDampersClosed Init To $iHVAC.Count.BasementDampersClosed $iHVAC.Count.CableRoomFansOn Init To $iHVAC.Count.CableRoomFansOn $iHVAC.Count.HumidifierOn Init To $iHVAC.Count.HumidifierOn $iHVAC.Count.AC.Rate1 Init To $iHVAC.Count.AC.Rate1 $iHVAC.Count.AC.Rate2 Init To $iHVAC.Count.AC.Rate2 $iHVAC.Count.AC.Rate3 Init To $iHVAC.Count.AC.Rate3 $iHVAC.Count.OfficeDamper Init To $iHVAC.Count.OfficeDamper $iHVAC.HeatCycle Init To $iHVAC.HeatCycle $iHVAC.ACCycle Init To $iHVAC.ACCycle $sHRV.Low.Minutes Init To $sHRV.Low.Minutes $sHRV.High.Minutes Init To $sHRV.High.Minutes Else - No Actions - (To add one, press 'Action') Persist Counters - Daytime Use Only If Time is 1:30:00PM Or Time is 10:30:00PM Or $sPowerFailure > 0 Then $iSensorCount.LaundryRoom Init To $iSensorCount.LaundryRoom $iSensorCount.RecRoom Init To $iSensorCount.RecRoom $iSensorCount.BasementKitchen Init To $iSensorCount.BasementKitchen $iCount.RemoteLincWIC Init To $iCount.RemoteLincWIC $iSensorCount.MainBath Init To $iSensorCount.MainBath Else - No Actions - (To add one, press 'Action')
johnnyt Posted February 18, 2015 Author Posted February 18, 2015 (edited) My ISY is on a UPS and I have a mechanism to detect a power failure. I'd like to protect against ISY reboots, either because I forgot or didn't know. Edited February 18, 2015 by johnnyt
Recommended Posts