Cormacs Posted November 3, 2015 Author Posted November 3, 2015 I updated to the beta, I'm still not seeing this feature to put the time from start of day into a variable? Sent from my iPhone using Tapatalk
Cormacs Posted November 3, 2015 Author Posted November 3, 2015 As soon as I posted that I found it Sent from my iPhone using Tapatalk
Cormacs Posted November 3, 2015 Author Posted November 3, 2015 So this is what I have so far... Main Sump Pump - [iD 0011][Parent 0001] If 'Basement / Sump Pump Main' Status is On Then $Sump_Pump_On = [seconds since start of day] Else $Sump_Pump_Off = [seconds since start of day] Wait 1 second $Sump_Pump_Off -= $Sump_Pump_On Wait 1 second $Sump_Pump += $Sump_Pump_Off It is working great. My only issue is, I would like at midnight of every night for it to notify my the runtime for that day and then start over again. I can easily make a program to clear the variable each night. I just can't figure out how to get it to email me the variable.
stusviews Posted November 4, 2015 Posted November 4, 2015 Configuration > Emails/Notifications > Customizations > Add. Select Customized Content. Near the bottom center, click on Alert down arrow, select Variables.
Cormacs Posted November 4, 2015 Author Posted November 4, 2015 Perfect. Thanks Sent from my iPhone using Tapatalk
larryllix Posted November 4, 2015 Posted November 4, 2015 (edited) So this is what I have so far... Main Sump Pump - [iD 0011][Parent 0001] If 'Basement / Sump Pump Main' Status is On Then $Sump_Pump_On = [seconds since start of day] Else $Sump_Pump_Off = [seconds since start of day] Wait 1 second $Sump_Pump_Off -= $Sump_Pump_On Wait 1 second $Sump_Pump += $Sump_Pump_Off It is working great. My only issue is, I would like at midnight of every night for it to notify my the runtime for that day and then start over again. I can easily make a program to clear the variable each night. I just can't figure out how to get it to email me the variable. Since you were into this and I have been meaning to create one for my HRV I set these up. They have been tested somewhat but not thoroughly yet. Four Integer variables need to be defined for start, stop, runtime, and scratchpad Here is the start and stop with accumulation timer = runtime HRV.tracking - [ID 0094][Parent 00BD] If 'Cold Cellar / CCel Ventilation Fan' Status is Off Then $HRV_Fan.offTime = [Seconds since start of day] $HRV_Fan.offTime Init To $HRV_Fan.offTime $HRV_Fan.scratchpad = $HRV_Fan.offTime $HRV_Fan.scratchpad -= $HRV_Fan.onTime $HRV_Fan.runtime += $HRV_Fan.scratchpad $HRV_Fan.runtime Init To $HRV_Fan.runtime Else $HRV_Fan.onTime = [Seconds since start of day] $HRV_Fan.onTime Init To $HRV_Fan.onTime The reporting take two programs as I don't want the condition of the fan running over midnight to trigger that program. Note there is code included to account for a running fan over midnight while the report is being generated. This should keep the times exact except for the time short of midnight when ISY is probably very busy. Also, power failures should be handled to stay accurate by initialising key variables. HRV.tracking.report - [ID 0095][Parent 00BD] If Time is 11:59:50PM Then Run Program 'HRV.tracking.report.2' (If) Else - No Actions - (To add one, press 'Action') HRV.tracking.report.2 - [ID 009A][Parent 00BD][Not Enabled] If 'Cold Cellar / CCel Ventilation Fan' Status is Off Then $HRV_Fan.scratchpad = [Seconds since start of day] $HRV_Fan.scratchpad -= $HRV_Fan.onTime $HRV_Fan.runtime += $HRV_Fan.scratchpad Run Program 'HRV.tracking.report.2' (Else Path) Else Send Notification to 'Text Larry' content 'HRV RunTime Report' Wait 8 seconds $HRV_Fan.onTime Init To 0 $HRV_Fan.onTime = 0 $HRV_Fan.runtime Init To 0 $HRV_Fan.runtime = 0 Add in last time to midnight (if any) Send report Set On time = 0. .If running, use midnight=0, else use next On time. Reset accumuated runtime Finally here is a screenshot of my notification message. . Edited November 4, 2015 by larryllix
Cormacs Posted November 4, 2015 Author Posted November 4, 2015 Mine works great. I got the email last night with my two pumps run time for that day, the variable automatically reset to zero. Thanks everyone for your help. Sent from my iPhone using Tapatalk
Cormacs Posted November 4, 2015 Author Posted November 4, 2015 It works great. There are three variables and it is accumulated in the Sump_Pump variable. Sent from my iPhone using Tapatalk
larryllix Posted November 4, 2015 Posted November 4, 2015 It works great. There are three variables and it is accumulated in the Sump_Pump variable. Sent from my iPhone using Tapatalk So you are not using the program you posted then?
Cormacs Posted November 4, 2015 Author Posted November 4, 2015 Yes Sent from my iPhone using Tapatalk
Cormacs Posted November 4, 2015 Author Posted November 4, 2015 There is sump_pump, sump_pump_on, and sump_pump_off. Sent from my iPhone using Tapatalk
larryllix Posted November 4, 2015 Posted November 4, 2015 (edited) LOL. I guess I misread the program with so many 'ump's. if you have a continuous run over midnight things will be off somewhat depending on how long the run lasts. 24x7 continuous run will register as zero seconds per day as only Offs count.. I also changed mine to minutes to look more of a mentally manageable time unit. Edited November 4, 2015 by larryllix
Cormacs Posted November 4, 2015 Author Posted November 4, 2015 My sump pump maybe runs 2-5 minutes a day so the seconds aren't too bad. Sent from my iPhone using Tapatalk
larryllix Posted November 4, 2015 Posted November 4, 2015 Nice. My biggest problem was handling the midnight run over and cutting it off properly. If you don't handle the next day reset of the ISY seconds counter and the pump runs over midnight Example of midnight pump run time: You will get a (negative) -80,150 seconds reading if the pump started at 80,300 seconds and stopped at 150 seconds the next day.
Cormacs Posted November 4, 2015 Author Posted November 4, 2015 Ah I see what your saying. Maybe I'll add a program that resets the on variable to zero at midnight Sent from my iPhone using Tapatalk
larryllix Posted November 5, 2015 Posted November 5, 2015 That is what I set mine up to do but you have to add in the existing time passed to that point first. Most of the rest is just init to be able to survive a power failure.
Recommended Posts