Jump to content

How To: Track HVAC heat/cool cycles and runtime


hoopty

Recommended Posts

Posted

I originally posted this in the thread that about counting the cycles, but felt it was kind of buried there and may never get seen. So I decided to make it a how to post.

 

I really liked the idea of counting the number of cycles I saw in another thread, as one of the main things I like about the ISY and the Venstar adapter, is that I can export the logs and examine how my HVAC system is running. So as I was implementing it, I remembered another thread in the forum about a counter to report accumulated on time for a particular light. I figured it would be a natural fit for this set of programs, so I merged the two and below is what I've got running. All credit goes to the original posters of these programs, I just molded them to fit my needs.

 

The following programs will count the heating and cooling cycles as well as accumulate the run time of each cycle. At the end of the day (or whenever you choose), it will send out a notification letting you know how many cycles of each ran, and the accumulated time, in hours and minutes, for each as well.

 

The counter runs on a 5 sec clock, therefore you have to divide by 12 to get minutes (you have to divide by (12*60) or 720 to get hrs). I chose 5 seconds as it gives a bit more accuracy. You can set it for whatever you want, but remember to change the calc program, so your end of day numbers come out right.

 

I have the calc program disabled as it is only called by the end of day routine.

 

I put in the monthly variable, but don't have it set up yet, other than to dump each of the daily figures into it. I plan on setting up variables to calculate the dates and such, then I can run a monthly report and reset the numbers at that time.

 

An example of the notification I put together looks like this:

 

Cooling ran for a total of 18 cycles today.

Total cooling run time was 5 hour(s) and 23 minute(s).

 

Heating ran for a total of 4 cycles today.

Total heating run time was 1 hour(s) and 49 minute(s).

 

 

Define variables (non-state):

 

$temp

$Cool_Cycles_Daily

$Heat_Cycles_Daily

$Heat_Cycle_Time_Daily_5Sec

$Cool_Cycle_Time_Daily_5Sec

$Heat_Cycle_Time_Hr

$Cool_Cycle_Time_Hr

$Heat_Cycle_Time_Min

$Cool_Cycle_Time_Min

$Heat_Cycle_Time_Monthly

$Cool_Cycle_Time_Monthly

$Heat_Cycles_Monthly

$Cool_Cycles_Monthly

 

 

Define Custom Notification:

 

Daily_Climate_Status

 

 

Programs:

 

Cool_Cycles/Run_Time

 

If

Status 'T-Stat / T-Stat' is Calling for Cool

 

Then

$Cool_Cycles_Daily += 1

$Cool_Cycles_Daily Init To $Cool_Cycles_Daily

Wait 5 seconds

Repeat Every 5 seconds

$Cool_Cycle_Time_Daily_5Sec += 1

 

Else

$Cool_Cycle_Time_Daily_5Sec Init To $Cool_Cycle_Time_Daily_5Sec

 

-----

 

Heat_Cycles/Run_Time

 

If

Status 'T-Stat / T-Stat' is Calling for Heat

 

Then

$Heat_Cycles_Daily += 1

$Heat_Cycles_Daily Init To $Heat_Cycles_Daily

Wait 5 seconds

Repeat Every 5 seconds

$Heat_Cycle_Time_Daily_5Sec += 1

 

Else

$Heat_Cycle_Time_Daily_5Sec Init To $Heat_Cycle_Time_Daily_5Sec

 

-----

 

Daily_Cycle_Times_Calc

 

If

- No Conditions - (To add one, press 'Schedule' or 'Condition')

 

Then

$Heat_Cycle_Time_Hr = $Heat_Cycle_Time_Daily_5Sec

$Heat_Cycle_Time_Hr /= 720

$Heat_Cycle_Time_Min = $Heat_Cycle_Time_Daily_5Sec

$Heat_Cycle_Time_Min /= 12

$temp = $Heat_Cycle_Time_Hr

$temp *= 60

$Heat_Cycle_Time_Min -= $temp

$Cool_Cycle_Time_Hr = $Cool_Cycle_Time_Daily_5Sec

$Cool_Cycle_Time_Hr /= 720

$Cool_Cycle_Time_Min = $Cool_Cycle_Time_Daily_5Sec

$Cool_Cycle_Time_Min /= 12

$temp = $Cool_Cycle_Time_Hr

$temp *= 60

$Cool_Cycle_Time_Min -= $temp

$temp = 0

 

Else

- No Actions - (To add one, press 'Action')

 

-----

 

Send_Daily_Status_And_Reset

 

If

Time is 11:59:30PM

 

Then

Set 'T-Stat / T-Stat' Query

Wait 3 seconds

Run Program 'Daily_Cycle_Times_Calc' (Then Path)

Wait 3 seconds

Send Notification to 'E-mail' content 'Daily_Climate_Status'

Wait 3 seconds

$Heat_Cycle_Time_Monthly += $Heat_Cycle_Time_Daily_5Sec

$Heat_Cycle_Time_Monthly Init To $Heat_Cycle_Time_Monthly

$Cool_Cycle_Time_Monthly += $Cool_Cycle_Time_Daily_5Sec

$Cool_Cycle_Time_Monthly Init To $Cool_Cycle_Time_Monthly

$Heat_Cycles_Monthly += $Heat_Cycles_Daily

$Heat_Cycles_Monthly Init To $Heat_Cycles_Monthly

$Cool_Cycles_Monthly += $Cool_Cycles_Daily

$Cool_Cycles_Monthly Init To $Cool_Cycles_Monthly

$Heat_Cycles_Daily = 0

$Heat_Cycles_Daily Init To 0

$Cool_Cycles_Daily = 0

$Cool_Cycles_Daily Init To 0

$Heat_Cycle_Time_Daily_5Sec = 0

$Heat_Cycle_Time_Daily_5Sec Init To 0

$Cool_Cycle_Time_Daily_5Sec = 0

$Cool_Cycle_Time_Daily_5Sec Init To 0

 

Else

- No Actions - (To add one, press 'Action')

 

Let me know if you have any questions. Also, always looking for ways to streamline, so let me know if you see those opportunities as well. Thanks.

Posted

Thanks for this! I put it on my system last night and it appears to be working just fine. I'll probably create some kind of monthly report/reset program to view the longer term data.

 

I just switched out my thermostat (twice). I originally put in a Venstar T1700, but then replaced it with a T1800. My original thermostat was a modulating thermostat. Unfortunately, there doesn't appear to be a modulating thermostat that is insteon controllable. Using a Venstar makes my furnace operate as a 2-stage (Actually 3 stage - the furnace ramps up from 40%, to 65% to 100%, based on its own internal logic). I'm trying to decide if there a difference in furnace runtime. It seems like it doesn't warm up as fast, but, it's difficult to compare. We are also in the middle of a remodel, and some walls are out, so all the airflow is already messeed up.

 

We've also had a VERY mild winter here. I'd like to be able to compare my runtimes vs. my natural gas usage on a monthly basis, and this might be very helpful.

 

I'd some point, I'm going to create a home status web page. (probably using my NSLU - see my other threads in the Network Resources section). I'd like to include some of this information on there as well. I'm adding a Sony Google TV to my kitchen. At a glance, I'd like to be able to see the "house at a glance". I'm not sure how I'm going to accomplish this yet, but I'll get there.

Posted

Would one of you please post up a screen shot of each of the tabs with the above programs / variables in their respective places for me to see and compare.

 

I just can't seem to get this up and running. :oops:

 

Teken . . .

Posted

This may be a silly point, but your counter counts the 5 second blocks at the start of the 5 second time period. So you will be overcounting your usage by anywhere from 0 to 4.9 seconds on each cycle. You will never be undercounting. If you put a "wait" 2 seconds as the very first line, you would end up sometimes undercounting by up to 2 seconds and sometimes overcounting by 3 seconds, on average this would mostly cancel each other out and you would get a more accurate number.

 

Of course, if you used 4 or 6 seconds as your interval, then you could use 2 or 3 seconds as your opening wait and even more accurately average out your under/over counting.

 

Again, this won't change things that much, but just to be anal, that would be my suggestion.

Posted
Would one of you please post up a screen shot of each of the tabs with the above programs / variables in their respective places for me to see and compare.

 

I just can't seem to get this up and running. :oops:

 

Teken . . .

Here ya go. Hope this helps.

post-2984-140474155244_thumb.jpg

post-2984-140474155246_thumb.jpg

post-2984-140474155247_thumb.jpg

Posted
So you will be overcounting your usage by anywhere from 0 to 4.9 seconds on each cycle. You will never be undercounting.

Is this because there will be one last count after the cooling stops (program goes false)? Meaning once the last repeat starts, the count will always increment one more time?

Posted

Hoopty... Great that we can build on each others stuff!!! I just implemented your cumulative time code today.

 

I went ahead and set up a monthly reset program that runs at 12:00:01 on the first day of each month and resets the monthly counts.

Posted
So you will be overcounting your usage by anywhere from 0 to 4.9 seconds on each cycle. You will never be undercounting.

Is this because there will be one last count after the cooling stops (program goes false)? Meaning once the last repeat starts, the count will always increment one more time?

 

Sort of.

 

The progression is this

 

1) Units turns on

2) counter goes up by one immediately (even though 0 seconds of being on have actually happened, counter would indicate the full 5 sec have passed)

3) counter waits 5 sec (at the end of this, unit has been on 5 sec)

4) counter goes up by one again (at this point the unit has actually been on 5 sec, but the counter would indicate 10 sec)

5) counter waits 5 sec (at the end of this unit has been on 10 sec)

 

The counter adds one at the beginning of the 5 sec interval, even though the unit could shut off before the 5 sec is up. So there is no difference between the unit shutting off .1 sec after the counter went up or 4.9 sec. Either way it looks like 5 full seconds of being on.

 

Their are 2 ways to fix this.

 

1) Count the number of cycles, multiply by 2.5 seconds and subtract that from the total

2) Have the counter start counting 2.5 seconds after the unit turns on.

Posted

2) counter goes up by one immediately (even though 0 seconds of being on have actually happened, counter would indicate the full 5 sec have passed)

I don't understand. I have the counter starting after 5 seconds of run-time using the 'Wait 5 seconds' command. Watching it work, by starting it manually and monitoring the variables, it works like you'd expect. Only after 5 seconds have elapsed, does it add the first count.

Wait 5 seconds
Repeat Every 5 seconds
$Cool_Cycle_Time_Daily_5Sec += 1

The only problem I see with this particular logic, is when the unit shuts off between counts, and you miss counting the last 1-5 seconds. Hence why I chose a small 5 second counting window. I suppose you could shorten the count time to as small as 1 second, but I assumed that that would use too much resources and might cause problems if another program tried to run at the same time.

 

The way I see it is, if I miss a complete 5 seconds every cycle (not likely), my count is off (low) a max of 1 minute every 12 cycles. When the math is calculated, the variables get rounded down as well. From that, I could be as much as 59 seconds low per report also. I wonder if that wait statement shouldn't be removed as a way of compensating for the rounding down.

 

Anyway, I do want things to be as accurate as possible, and if there is a quick and easy way to do it, I'm all for it. But at the end of the day, a couple of minutes either way isn't that big of a deal to me. When it's running for 8 or 10 hrs in the summer, 2-3 minutes is minor.

Posted

2) counter goes up by one immediately (even though 0 seconds of being on have actually happened, counter would indicate the full 5 sec have passed)

I don't understand. I have the counter starting after 5 seconds of run-time using the 'Wait 5 seconds' command. Watching it work, by starting it manually and monitoring the variables, it works like you'd expect. Only after 5 seconds have elapsed, does it add the first count.

Wait 5 seconds
Repeat Every 5 seconds
$Cool_Cycle_Time_Daily_5Sec += 1

The only problem I see with this particular logic, is when the unit shuts off between counts, and you miss counting the last 1-5 seconds. Hence why I chose a small 5 second counting window. I suppose you could shorten the count time to as small as 1 second, but I assumed that that would use too much resources and might cause problems if another program tried to run at the same time.

 

The way I see it is, if I miss a complete 5 seconds every cycle (not likely), my count is off (low) a max of 1 minute every 12 cycles. When the math is calculated, the variables get rounded down as well. From that, I could be as much as 59 seconds low per report also. I wonder if that wait statement shouldn't be removed as a way of compensating for the rounding down.

 

Anyway, I do want things to be as accurate as possible, and if there is a quick and easy way to do it, I'm all for it. But at the end of the day, a couple of minutes either way isn't that big of a deal to me. When it's running for 8 or 10 hrs in the summer, 2-3 minutes is minor.

 

Sorry, you are right, you are counting the 5 sec blocks at the end, which would result in undercounting. Just change the wait time to 2 or 3 seconds and then, on average, you would reduce your error to 1 sec per cycle on average. Or change your count interval to 6 seconds and use a 3 second wait to start things off, then (on average again) you would be dead on.

 

It isn't a big deal, but if you are doing it, I figure you might as well make as dead on as possible.

 

Wait 3 seconds
Repeat Every 6 seconds
$Cool_Cycle_Time_Daily_6Sec += 1

 

By having your counter flip at the middle of the cycle, on average, you would undercount the same number of times as you overcount and thus it would zero out. You could also go with much larger intervals while still maintaining accuracy but taxing the ISY less.

Posted

Gotcha. That's what I was thinking. Cut the error in half on both ends and it should average out in the long run. I should change it to a # divisible by two, whatever I decide to go with.

Posted

Hoopty,

 

Thank you so very much for providing the screen shots. I have some questions for you or anyone else who may know. I have five of these thermostats installed and all of them also have the humidity sensor in place.

 

I have copied the original program from the one TSTAT. This copy of the program has been renamed and also the secondary TSTAT has been assigned to as the device to be queried.

 

How do I track this TSTAT and the other ones?? :?:

 

Teken . . .

Posted
How do I track this TSTAT and the other ones?? :?:
Well, that's a bit more complicated isn't it? I think you can attack it a couple of different ways.

 

First, you could just duplicate all the variables and programs 5 times and label them such that you can tell them apart. i.e. heat1_cycles_daily, heat2_cycles_daily, etc... This method is the easiest to pull off and understand, but I don’t think that is the most efficient way of doing things. But depending upon the resource drain, it might not be a bad idea, as you can set each end of day to run independently at different times.

 

The second option would be more complicated. You'd still need quite a few more variables and you'd have to modify the calc and the send/reset program pretty significantly. Without knowing your complete setup and expected outcome for this, here’s how I would start out:

 

Define variables (non-state):

 

$Cool1_Cycles_Daily

$Cool2_Cycles_Daily

$Cool3_Cycles_Daily

$Cool4_Cycles_Daily

$Cool5_Cycles_Daily

 

$Heat1_Cycles_Daily

$Heat2_Cycles_Daily

$Heat3_Cycles_Daily

$Heat4_Cycles_Daily

$Heat5_Cycles_Daily

 

$Cool1_Cycle_Time_Daily_5Sec

$Cool2_Cycle_Time_Daily_5Sec

$Cool3_Cycle_Time_Daily_5Sec

$Cool4_Cycle_Time_Daily_5Sec

$Cool5_Cycle_Time_Daily_5Sec

 

$Heat1_Cycle_Time_Daily_5Sec

$Heat2_Cycle_Time_Daily_5Sec

$Heat3_Cycle_Time_Daily_5Sec

$Heat4_Cycle_Time_Daily_5Sec

$Heat5_Cycle_Time_Daily_5Sec

 

$temp

 

$Cool1_Cycle_Time_Hr

$Cool2_Cycle_Time_Hr

$Cool3_Cycle_Time_Hr

$Cool4_Cycle_Time_Hr

$Cool5_Cycle_Time_Hr

 

$Heat1_Cycle_Time_Hr

$Heat2_Cycle_Time_Hr

$Heat3_Cycle_Time_Hr

$Heat4_Cycle_Time_Hr

$Heat5_Cycle_Time_Hr

 

$Cool1_Cycle_Time_Min

$Cool2_Cycle_Time_ Min

$Cool3_Cycle_Time_ Min

$Cool4_Cycle_Time_ Min

$Cool5_Cycle_Time_ Min

 

$Heat1_Cycle_Time_ Min

$Heat2_Cycle_Time_ Min

$Heat3_Cycle_Time_ Min

$Heat4_Cycle_Time_ Min

$Heat5_Cycle_Time_ Min

 

Programs:

 

Cool1_Cycles/Run_Time

If
Status 'T-Stat / T-Stat_1' is Calling for Cool

Then
$Cool1_Cycles_Daily += 1
$Cool1_Cycles_Daily Init To $Cool1_Cycles_Daily
Wait 5 seconds
Repeat Every 5 seconds
$Cool1_Cycle_Time_Daily_5Sec += 1

Else
$Cool1_Cycle_Time_Daily_5Sec Init To $Cool1_Cycle_Time_Daily_5Sec

Copy Cool1_Cycles/Run_Time program 4 more times change all instances of Cool1 to Cool2, Cool3, etc… and reference the appropriate TSTAT.

Same goes for the Heat_Cycles/Run_Time. Create 5 separate programs utilizing Heat1, Heat2, etc…

Daily_Cycle_Times_Calc

If
- No Conditions - (To add one, press 'Schedule' or 'Condition')

Then
$Heat1_Cycle_Time_Hr = $Heat1_Cycle_Time_Daily_5Sec
$Heat1_Cycle_Time_Hr /= 720
$Heat1_Cycle_Time_Min = $Heat1_Cycle_Time_Daily_5Sec
$Heat1_Cycle_Time_Min /= 12
$temp = $Heat1_Cycle_Time_Hr
$temp *= 60
$Heat1_Cycle_Time_Min -= $temp
$Cool1_Cycle_Time_Hr = $Cool1_Cycle_Time_Daily_5Sec
$Cool1_Cycle_Time_Hr /= 720
$Cool1_Cycle_Time_Min = $Cool1_Cycle_Time_Daily_5Sec
$Cool1_Cycle_Time_Min /= 12
$temp = $Cool1_Cycle_Time_Hr
$temp *= 60
$Cool1_Cycle_Time_Min -= $temp
$temp = 0

$Heat2_Cycle_Time_Hr = $Heat2_Cycle_Time_Daily_5Sec
$Heat2_Cycle_Time_Hr /= 720
$Heat2_Cycle_Time_Min = $Heat2_Cycle_Time_Daily_5Sec
$Heat2_Cycle_Time_Min /= 12
$temp = $Heat2_Cycle_Time_Hr
$temp *= 60
$Heat2_Cycle_Time_Min -= $temp
$Cool2_Cycle_Time_Hr = $Cool2_Cycle_Time_Daily_5Sec
$Cool2_Cycle_Time_Hr /= 720
$Cool2_Cycle_Time_Min = $Cool2_Cycle_Time_Daily_5Sec
$Cool2_Cycle_Time_Min /= 12
$temp = $Cool2_Cycle_Time_Hr
$temp *= 60
$Cool2_Cycle_Time_Min -= $temp
$temp = 0

****REPEAT 3 MORE TIMES FOR REMAINING TSTATS****

Else
- No Actions - (To add one, press 'Action')

Send_Daily_Status_And_Reset

If
Time is 11:59:30PM

Then
Set 'T-Stat / T-Stat1' Query
Set 'T-Stat / T-Stat2' Query
Set 'T-Stat / T-Stat3' Query
Set 'T-Stat / T-Stat4' Query
Set 'T-Stat / T-Stat5' Query
Wait 3 seconds
Run Program 'Daily_Cycle_Times_Calc' (Then Path)
Wait 3 seconds
Send Notification to 'E-mail' content 'Daily_Climate_Status'
Wait 3 seconds
$Heat1_Cycles_Daily = 0
$Heat1_Cycles_Daily Init To 0
$Cool1_Cycles_Daily = 0
$Cool1_Cycles_Daily Init To 0
$Heat1_Cycle_Time_Daily_5Sec = 0
$Heat1_Cycle_Time_Daily_5Sec Init To 0
$Cool1_Cycle_Time_Daily_5Sec = 0
$Cool1_Cycle_Time_Daily_5Sec Init To 0

$Heat2_Cycles_Daily = 0
$Heat2_Cycles_Daily Init To 0
$Cool2_Cycles_Daily = 0
$Cool2_Cycles_Daily Init To 0
$Heat2_Cycle_Time_Daily_5Sec = 0
$Heat2_Cycle_Time_Daily_5Sec Init To 0
$Cool2_Cycle_Time_Daily_5Sec = 0
$Cool2_Cycle_Time_Daily_5Sec Init To 0

****REPEAT 3 MORE TIMES FOR REMAINING TSTATS****

Else
- No Actions - (To add one, press 'Action')

You might need some waits between the TSTAT query lines, I’m not sure. You may have to play around with some of this timing wise as there is a lot going on.

 

I put this together assuming that you'd have all your stats in one single report. You'll have to modify your notification(s) to meet your desired format.

 

Note: I’ve removed the monthly stats for the sake of cutting down on code and variables. If that’s a must have, it can be done. I just didn’t feel that the benefit of having that stat outweighed the complexity that leaving it in would create.

 

One last thing. I have NO idea how this is going to affect your ISY’s resources if multiple programs are running and counting, let alone the amount of calculating it is going to be doing when you run that program. I don’t have that much stuff going on at any given time, so that is something to think about also.

 

Good luck! Let me know how it turns out.

Posted

If I change from 5 seconds to the following:

 

Wait 3 seconds

Repeat Every 6 seconds

$Cool_Cycle_Time_Daily_6Sec += 1

 

Would I need to change the other values such as /= 12, /= 720 and the *=60 referances in the program?

Posted
If I change from 5 seconds to the following:

 

Wait 3 seconds

Repeat Every 6 seconds

$Cool_Cycle_Time_Daily_6Sec += 1

 

Would I need to change the other values such as /= 12, /= 720 and the *=60 referances in the program?

Yes. For 2 of the 3 anyway. You would need to change /= 12 to /=10 and /= 720 to /= 600. Leave *= 60 alone.
Posted

This thread would definitely be affected by some thing being discussed in this thread. viewtopic.php?f=27&t=8166

 

Specifically, it would seem that the repeat statement delays roughly 1 second from the time it finishes executing the repeat statements to the time it starts over again. The smaller you make your time interval on measuring the hvac, the more this issue affects your results.

Posted

After reading that thread, I don't see how. This program doesn't repeat the wait statement. The wait occurs first and is only there to allow for the first five seconds to pass before the variable is incremented. After that, the variable +1 is will repeat every 5 seconds.

Posted
Hoopty,

 

Thank you so very much for providing the screen shots. I have some questions for you or anyone else who may know. I have five of these thermostats installed and all of them also have the humidity sensor in place.

 

I have copied the original program from the one TSTAT. This copy of the program has been renamed and also the secondary TSTAT has been assigned to as the device to be queried.

 

How do I track this TSTAT and the other ones?? :?:

 

Teken . . .

Teken, did you ever get this to work for your setup?
Posted
After reading that thread, I don't see how. This program doesn't repeat the wait statement. The wait occurs first and is only there to allow for the first five seconds to pass before the variable is incremented. After that, the variable +1 is will repeat every 5 seconds.

 

The problem isn't repeating the wait, it is "repeat x times". So it may not affect "repeat every x seconds". But it is worth a look and an independent timing of things.

Posted
The problem isn't repeating the wait, it is "repeat x times". So it may not affect "repeat every x seconds". But it is worth a look and an independent timing of things.
I ran a few more tests and it was no more than a second off over a 3 minute period. And that could be attributed to several things such as lag in the interface or difference in start time of prog and timer.
Posted
Hoopty,

 

Thank you so very much for providing the screen shots. I have some questions for you or anyone else who may know. I have five of these thermostats installed and all of them also have the humidity sensor in place.

 

I have copied the original program from the one TSTAT. This copy of the program has been renamed and also the secondary TSTAT has been assigned to as the device to be queried.

 

How do I track this TSTAT and the other ones?? :?:

 

Teken . . .

Teken, did you ever get this to work for your setup?

 

Hoopty,

 

For the interim I have simply replicated all five TSTAT using your original program. :mrgreen: I do however have a couple of questions for you. So if you don't mind taking the time to break it down for me, it would be greatly appreciated. :oops:

 

Heating ran for a total of 0 cycles today. <-- Why does this not show a value??

Total heating run time was 10 hour(s) 146325 minute(s). <-- Why does the minutes calculate to this amount??

 

I read the initial thread about the seconds and how you had to divide the numbers etc. But, some how this math doesn't add up.

 

Your insight would be appreciated !

 

Teken . . .

Posted
Heating ran for a total of 0 cycles today. <-- Why does this not show a value??

Total heating run time was 10 hour(s) 146325 minute(s). <-- Why does the minutes calculate to this amount??

 

I read the initial thread about the seconds and how you had to divide the numbers etc. But, some how this math doesn't add up.

 

Your insight would be appreciated !

 

Teken . . .

Well, those numbers don't look right do they... I'm not sure why you wouldn't have any heating cycles, unless there's something wrong w/ the program. Have you seen the variable increment when a call for heat is initiated? Also, if the report is showing zero, but the variable actually has a different value, maybe your custom notification is calling the wrong variable. Just some thoughts.

 

As for the math, here is how it breaks down. The counter itself increments by one every five seconds that the HVAC is running. So one minute would equate to a count of 12 (or 60/5).

The way I calculate for the report is like this: Lets say our count for the day ended up being 3197

 

1. Make the xxx_Hr variable equal the total count for the day.

xxx_Hr = xxx_5sec = 3197

 

2. Divide xxx_Hr variable by 720 to get the number of hours it ran. (720 = 12 counts per minute * 60 minutes/hr)

xxx_Hr/720 = 3197/720 = 4.4402777777 - The variables always round down so xxx_Hr ends up equaling 4.

 

3. Make the xxx_Min equal the total count for the day.

xxx_Min = xxx_5sec = 3197

 

4. Divide xxx_Min by 12 to get the number of minutes it ran. (again, 60/5 based on the 5 second count interval)

xxx_Min = 3197/12 = 266.4166666 - Again, the variable rounds down to 266.

 

5. Then I set the temp variable to equal xxx_Hr.

temp = xxx_Hr = 4

 

6. Multiply temp by 60 to get the number of minutes in the hours it ran.

temp*60 = 4*60 = 240

 

7. Subtract temp from xxx_Min to obtain the remainder of minutes after the hours are calculated.

xxx_Min - temp = 266 - 240 = 26

 

So you get a run time of xxx_Hr and xxx_Min or 4 Hr and 26 Min(s). And if you change the counter interval, you will have to re-calculate the numbers for 12 and 720.

 

I hope this helps.

  • 1 month later...
Posted

I'm new to doing programs so this question is probably stupid. I've been trying to get this to work for me. I have all the varibles and programs completed. It will send out a email notification but it always shows 0 for the run times. The only thing that looks different in my programs is that for the IF status line your program shows 'T-Stat / T-Stat' is calling for? What is the / for? The only thing I can put in this field is the name of my thermostat. Thanks for any help!

 

Aaron

Guest
This topic is now closed to further replies.

  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

  • Forum Statistics

    • Total Topics
      37k
    • Total Posts
      371.4k
×
×
  • Create New...