HubiSaver HVAC Control System for RM

Just got a second rewrite done of my HVAC system for RM 5.0 last night and am happy with the results testing so wanted to share:

HubiSaver HVAC Control System for RM by Rudi Cilibrasi (cilibrar@gmail.com)

An extensible, efficient, and comfortable HVAC controller for Hubitat
that utilizes sensor fusion so that most people don't need to manually
adjust their thermostats in order to save money.

This system combined presence detection from a mobile phone as well as a
motion sensor to have more reliable presence detection. It has a built in
timer so that whenever any presence is detected it will keep HVAC going for
up to 55 minutes. If there is 56 minutes of no presence detected the HVAC
will turn off until presence is again detected.

This approach saves a lot of energy when you are not home on hot summer
afternoons.

The system is structured with an abstract top level HVAC controller script
that is insulated from particular hardware devices or capabilities. In this
way this system can be easily adjusted or extended to integrate any kind of
thermostat, motion detector, or mobile phone.

TOP LEVEL STATE (Hub variables)

There are two user-set configuration variables:
idealTemperature is the target temperature for inside the home
idleHVACMin is the number of minutes of no presence before HVAC turns off


Global Hub Variables
Name Type Connector

hvacEnabled Boolean Variable
idealTemperature Number Create (suggested initial value: 74)
idleHVACMin Number Create (suggested initial value: 55)
minIdleMinutes Number Variable
minuteCounter Number Variable
noMotionMin Number Variable
noNetworkPresMin Number Variable
thirtySeconds Number Variable

Real Physical Devices

Advanced Honeywell T6 Pro Thermostat
Zooz 4-in-1 Sensor (for Motion detection)
mobile phone (for Wifi based presence detection)

User virtual devices:

iPhone WiFi Presence Sensor (must have phone set up for static IP address)
presence-full Virtual Presence device (System)

If using RuleManager 5.0, also need:

RM 5.0 Connectors for hub variables:
everyHalfMinute
hvacEnabled
minIdleMinutes
minuteCounter
noMotionMin
noNetworkPresMin
thirtySeconds

SOURCE CODE for Rule Machine (5.0 or earlier)

Seven short RM scripts:

everyHalfMinute
everyMinute
hvacToggle
iphone-wifi-presence
minuteHVACController
motionNetworkFusion
motion-present

This timer works around problems with configuring periodic events in

earlier versions of Hubitat platform by making a simple minuteCounter

using a periodic scheduled event that happens every thirty seconds.

everyHalfMinute

TRIGGERS
Every 30 seconds

ACTIONS
Add 1 to thirtySeconds
Set thirtySeconds to (thirtySeconds % 2.0)

everyMinute

TRIGGERS
Variable reports thirtySeconds = 1

ACTIONS
Add 1 to noMotionMinutes
Add 1 to noNetworkPresMin
Add 1 to minuteCounter

hvacToggle

TRIGGERS
presence-full changed

ACTIONS
IF (presence-full present(T) [TRUE]) THEN
Set hvacEnabled to true
ELSE
Set hvacEnabled to false
END-IF
iphone-wifi-presence

TRIGGERS
iphone wifi presence sensor arrives

ACTIONS
Set noNetworkPresMin to 0
minuteHVACController

TRIGGERS
minuteCounter reports variable(739) changed

ACTIONS
IF (Variable hvacEnabled(true) = true(T) [TRUE]) THEN
Thermostats: Advanced Honeywell T6 Pro Thermostat --> Mode: auto --> Heat: idealTemperature(76) --> Cool: idealTemperature(76) --> Fan: auto
ELSE
Thermostats: Advanced Honeywell T6 Pro Thermostat --> Mode: off --> Fan: auto
END-IF

motionNetworkFusion
TRIGGERS
Variable reports noMotionMin "changed"
OR
Variable reports noNetworkPresMin "changed"

ACTIONS
Set minIdleMinutes to noMotionMin
IF (noNetworkPresMin < minIdleMinutes) THEN
minIdleMinutes = noNetworkPresMin
END-IF

IF (minIdleMinutes < idleHVACMin) THEN
arrived() on presence-full
ELSE
departed() on presence-full
END-IF
motion-present

TRIGGERS
zooz 4-in-1 sensor 01 active

ACTIONS
Set noMotionMinutes to 0

Ok, not looking to start a war here, probably just my lack of knowledge on the specifics here, but let me ask...

If I'm not home, and it shuts down the HVAC, and the temp in the house climbs to 95 deg, then as soon as I show up it starts up. Isnt it far more efficient to have the AC just maintaining a constant temp while I'm out, versus the temp climbing in the house while I'm not there, then the system running non-stop for hours to get back down to my "at-home" set point?

Again, not throwing stones, just trying to understand how it would save a ton of energy?

1 Like

A few points:

  1. I have energy data (via Sense) for my house and HVAC going back about 5 years. In general, my energy consumption is lower when the away temperature is about 4-5 degrees higher than my home temperature, relative to letting the away temperature reach 10-12 degrees more than the home temperature.

  2. In general, longer compressor run times are desirable, but the effect of this desirability ends at about 30 minutes for my house. By this I mean that there's a big difference in the energy used by six 10-minute runs v/s two 30-minute runs. There's very little further energy saving between two 30-minute runs and a single 1 hour run, although the latter would still likely be better for the compressor.

  3. I currently control my house based on a calculated dew-point, rather than just temperature. I set the desired dew-point while the house is occupied to 54-56, and the desired dew-point while I am away to be 60-62. There is a slight energy saving when I compare this year to last year (for the same month). That could either be annual variation, or be a correlate with dew-point control resulting in longer compressor run-times on the average.

Somewhat peripherally related, but you might find this to be an interesting read (link goes to a PDF):
Smart & Cool - The Art of Air-Conditioning.

2 Likes

Thanks for the question Darryl. Thermodynamically, it is not more efficient to keep a house cool for any length of time than it is to let it warm up (HVAC off) then cool it down again over the same period of time because you are not working against heat loss when the HVAC is off. The amount of energy you save does depend on your schedule and the setting of idleHVACMin. For me, I am often away from my home during the hours of 1pm-8pm. In the summer in California this saves hours of air conditioning each day and only takes about 10 minutes to cool down when I enter the house. So you can imagine running the AC ten minutes continuously is less energy used than running it intermittently over the 1pm-8pm time period adding up to maybe an hour or two of AC on time... looking at my energy usage graphs and costs of peak energy (around $0.45 / kWh) it saves about $5-$15 on a hot summer day. To save more you can adjust idealTemperature or reduce idleHVACMin to make it turn off sooner.

1 Like

I know very little of thermodynamics, but does this statement assume the existence of a "closed" system?

In homes like mine (I live in New Orleans), as the day progresses, there's an increase in heat and humidity. My home is 35 years old; while not especially leaky, it doesn't exactly keep the humidity out either. So when my air-conditioner runs, achieving comfort requires both functions of air-conditioning: cooling and dehumidification.

I know from personal experience that comfort (measured as a function of temp & relative humidity) takes much longer to achieve when returning in the evening if the combination of temperature and relative humidity is allowed to reach too high a point while the house is unoccupied.

Just curious.

Yeah I see what you mean about New Orleans heat and humidity combination. It turns out I was not assuming a "closed" system but rather a "leaky" system because no house is perfectly insulated. i can't post links here but was able to google more extensive writeups about how turning off hvac when absent saves the most money if you can ignore or don't care about certain factors such as a) if you ignore the discomfort of walking into a 90 degree home that takes too long to cool down when you enter (this doesn't bother me as my home is small and cools down quickly) and b) you aren't worried about mold (my humidity stays pretty low all the time around 40% due to the California drought we have been in for years) then you save the most energy by turning off AC when absent. My basic line of thinking is: assume for all of 1pm-8pm it's say 90 degrees outside. If you leave AC on you are running it and fighting heat leakage into your house when you are absent. If you leave AC off the whole time heat will still leak in but less and less will leak in (as a rate or kWh per unit time) as the house inside temp approaches 90 degrees by Newton's Law of Cooling. You will still have to run AC to cool it down when you walk in but that will be less than the amount you would have run it if you left the thermostat going at any temperature to try to keep it somewhat cool during your absence. Thermodynamically it doesn't save energy to "keep your house cool actively" when you can rather cool it down only when you actually are using it in this simple model. In any case my daily PG&E energy bill shows savings for me but sometimes I am away from my house for up to 24 hours and the longer away of course the more savings are possible with such a simple system. Certainly you can adjust the HubiSaver code above to set the thermostat to a temperature instead of turn AC and heat off like I do if you have a bigger house or for other reasons like your high humidity. Mostly I like the small part (scripted automation rules) breakdown for RM 5.0. I had tried to use fewer complex rules in earlier versions but I think now it's easy to understand as a system of about 8 small rules or so. For my situation I have the luxury of ignoring humidity and the time it takes to cool down in this analysis and can imagine how New Orleans humidity tilts things in favor of spending some extra money to keep the house somewhat dry and cool even when absent.

1 Like

This is pretty much why I had asked the initial question, we are 3600sqft in Alabama, where the humidity wreaks havoc on an un-conditioned home. I've already spent quite a bit to encapsulate our crawlspace so I can avoid mold\mildew on our support members, and in addition to the closed system down there we have a fairly significant dehumidifier running non-stop to maintain 50%. It's made a significant impact to floor temp in the winter and the small patches of mildew, after remediation, have not returned.

I'm considering a dedicated dehumidifier for the main living space, in lieu of changing my HVAC setpoints, but not sure if it's worth the investment...

That will dehumidify, but also raise the temperature by putting out hot air. You will be better off getting a single window unit into a back room window that runs 24/7.

Download the Hubitat app