Is there a simple way to log/chart HVAC runtime?

Hello Folks,

Does someone have a simple persistence rule for charting an item that is in an “ON” state? I’m trying to find a simple method for tracking how many hours and/or minutes that my HVAC is running. I currently use rrd4j.persist for logging data in hourly, daily, weekly, monthly, and annually spans. I have a CT100 thermostat and here is the fan state item.

Number Hvac_Fan_State “HVAC Fan State [MAP(tstatfan.map):%d]” (All,Zwave,Thermostat) { zwave=“15:command=thermostat_fan_state” }

tstatfan.map (It’s never in a Running High state)

0=Off
1=Running
2=Running High
-=initilizing

I’ve looked at the Generator hours counter post and it seems a bit complicated for what I wish to achieve.

For charting you must use an everyMinute strategy with rrd4j or your charts will be blank.

You can then just chart the Item and you will see the line high when it is on an low when it is off.

Given that the state is 1 when on and zero when off you can do, for example, a sumSince(now.minusMinutes(60)) and because ON == 1 and you store it every minute you will have the total number of minutes the fan has been on, ± a minute.

But note that as the data ages in rrd4j your sum will become less and less accurate as rrd4j will throw out a bunch of you data points and replace them with their average.