HVAC system monitoring device

I have finished building an HVAC system monitor, though it had been in the planning stages for months, I just needed time to get everything assembled. I had everything I needed except the relays, selecting the right ones was difficult, since I wanted a wider operational voltage and very low current draw.

It connects to the thermostat input wiring on the furnace, which in my case comes out of a multizone thermostat controller. The relays allow the Shelly i3 to read the control signals from the 24VAC wiring. I used a spare 24VDC passive POE injector to power the Shelly. The entire rig is DIN rail mounted and quite full, I will have to pull things off the ends to screw it into the wall, or wherever I decide it will go.

The Yel/Org/Red wires on yellow terminal blocks are the signal IO for the relays, the Blk/Gry/Pur wires on blue terminal blocks are the “common” wires, aka ground on DC side. The Phoenix Contact relays have a status LED so any kind of diagnostics should be simple, and they will operate at up to 1.4X nominal voltage, most of the other brands I looked at were only 1.1X.

The Shelly will run on AC, or 24VDC…, but not 24VAC, so I had to rig up the ethernet port for power, but that should be far cleaner than the transformer output of the furnace, and it can be plugged into a UPS.

So why would anybody want something like this?

First of all (the big one) is that I do not need any kind of smart thermostat to monitor the HVAC status, the dumb one on the wall works just fine, so why replace it?

It can allow estimated energy usage monitoring. I can easily find out the power draw of the AC unit and the gas usage of the furnace, and add a template sensor that takes the HVAC state to provide the energy usage.

The state combined with the change in rate of heating or cooling can provide early warning of component failure, it usually takes a few hours for a human to notice something like an AC start capacitor failure, but with the right programming I should be able to tell in under 30 minutes and be alerted by automation. I will also be able to get intelligence regarding the duty cycle of the system, and how many start/stops occur, right now I have no idea other than what I can infer from temperature readings.

I plan on collecting large amounts of data; the HVAC state, solar radiation output, internal temp of several rooms, attic temp, and exterior temp. I will then try to develop an algorithm that simulates the heat transfer rate of the house given the environmental conditions, to eventually predict when the AC or furnace should be activated in advance of the thermostat temp exceeding the set threshold, in order to optimize comfort in the rooms most likely to be occupied at the time.

During hot days there can be a several degree delta between occupied room temp and thermostat reading due to house geometry and the fact that the main floor is the upper floor. On cold nights bedrooms can become excessively warm, while the rest of the house is still cold enough that you need a sweater.

The long term goal is to ditch the thermostat and use high precision room temp monitoring instead, and have all the control hardware next to the furnace.

I have done some preliminary bench tests and it should function as expected. If all goes well I can get this installed tonight and start collecting heating data during next weeks cold spell

2 Likes

I love it!

I do something very similar, but nowhere near as pretty. I monitor each of my three heating zones using relays powered by the 24VAC signals from the zone controller to the zone valves. The contacts on these relays connect to GPIO pins on the RPi running HA.

I have smart thermostats but (1) they require the vendor’s cloud, and (2) the vendor only allows updates every 5 minutes or so. This way I know immediately what the thermostats are doing, and the actual run-time of each individual zone.

I also have a 120VAC relay connected to the burner on my boiler which communicates back to HA a different way (GPIO wasn’t working well when I started with HA.) The contacts from this relay are wired to where the magnetic reed switch was in a Zigbee door sensor. This device now reports when the burner is firing the boiler. Since the burner uses a fixed amount of fuel per hour, I can estimate my fuel use and fuel remaining from this.

The real value in all of this is the ability to monitor the heating system when I’m away. I live in a climate where a failure could result in burst pipes, and a very expensive repair.

I agree! The main reason I use HA is for monitoring and alerts, I have pets, so on a hot summer day an AC failure can be lethal, and in the winter it can get down to -30F, where heat failure can get dangerous VERY quickly.

The next step on my end is to add a temp probe to the surface of the HVAC output vents, so I can detect within maybe 1 minute if the heat or AC is not functioning properly. I have had the device hooked up for a few days, so far it is working 100% on all 3 inputs (heat/fan/cold). I have yet to mount it in a permanent location, I am still deciding if I want to wire it to the output terminals of the zone controller or the input terminals of the HVAC, either way I was going to replace my wiring to use brown thermostat wire.

Or maybe not, the red wire makes it very obvious which one is the device! Here are some more details of how it works and what I used to build it.

Power

The Shelly i3 operates on 24 to 60VDC, so a spare 24V passive POE injector from some Unify equipment did the trick, where VDC is provided to the blue conductors and Ground to the brown. I pulled some CAT6 wire apart to connect the ethernet jack to the i3 and the DC side common block. I did run into an issue with polarity, my i3 wiring does NOT match the diagram on the Shelly site:

You may notice from the first set of images that my i3 has the N at the end… and I did need to connect that to ground to get it to function properly. My best guess is they changed the design at some point, but attention needs to be paid to the polarity. I used Wago lever nuts to connect the stranded wire from the i3 to the solid wire going to the terminal blocks.

The AC relays need… AC, and you may be able to tell from the image, but the zone controller has no “common” AC wire terminal, however it is fully powered by the HVAC transformer so there are power terminals on the right side, I ran an insulated jumper closer to the red wire instead of a bare wire across the device. Took about 5s with a multimeter to figure out which one was common relative to the Rhc wire, and I connected it to the blue conductor in my red wire, which is the standard color for 24VAC common. With that in place the relays function properly.

Signals

I connected the fan wire to the center relay, then connected the cold to yellow, which happens to be the standard color, and heat to red. Once I get some thermostat wire I will probably replace those so it is more consistent with the standard colors, but for now the wire I am using is for fire protection systems (hence the read insulation) and does not include white or green.

The DC side of the device connects the i3 inputs to the relay NO relay contacts, and the blue common block wiring to the COM relay contacts. The relays are Form C but I am not using the NC contacts.

When a zone controller relay trips to send a signal to the monitored wires, the device’s relay is also tripped, closing the relay and energizing the respective input wire on the i3. HA receives the change from the i3 a fraction of a second later. Interestingly, my blower fan will turn off during the heating cycle for 35s or up to 4 and a half minutes… that may be completely normal but it is inconsistent.

Parts

I had most of the parts to build this in my stash of spare parts and supplies, but needed the DIN mounted relays. I chose Phoenix Contact 2900300 relays, 24VAC with only 11ma coil current. They are very narrow which allowed me to use individual terminal blocks for every wire on the small rail.

The terminal blocks themselves are Dinkle DK2.5N series, I had a ton of blue and yellow left over from my security system wiring project so I used those.

The wire was pulled out of an 8 conductor bundle, nothing special there, the DIN mount for the ethernet jack is also pretty standard, but it did have a plastic end cap that allowed me to adhere the i3 in a way that was removable in case I needed to adjust any of the wiring.

Next Steps

In addition to the temp probe for early warning of system failure, I was going to make a couple of general alerts based on the state of doors, windows, outdoor temp, and other environmental monitoring:

IF the heat or cold turns on AND there is a door or window open AND carbon dioxide/voc are within tolerance AND the target temp trend is NOT in the direction of the outdoor temp THEN send an alert

What that basically means…
It may be 70 degrees outside, but it is 74 inside and going up, so the AC turns on, but I have the deck door wide open. Since the target trend is temp down, and the outdoor temp is below the current temp, do not send me an alert
OR
It may be 50 degrees outside, but it is 68 inside and dropping, so the heat turns on, and I have the deck door wide open. Since the target trend is temp up, and the outdoor temp is in the opposite direction, send me an alert, UNLESS there is high CO2 or VOC, in which case the door is open to air out the house, so the alert will be skipped.

After winter, If I have collected enough cold weather data, I will work on interruption of the main zone thermostat signals to either send heat earlier if the temp trend is down and low, or delay it if the tread is expected to go up in the near future.

I found some time to add template sensors to view the state of the heat relay as gas utilization.

The furnace has an approx 6s delay from the thermostat calling for heat till when the gas valve opens, so the first sensor includes a delay to make it as accurate as possible. I used the BTU rating of the furnace (75000/h) to make the sensor power usage in watts:

template:
  - trigger:
      - platform: state
        entity_id: binary_sensor.shelly_i3_162_input_3
        to: 'on'
        for: 00:00:06
      - platform: state
        entity_id: binary_sensor.shelly_i3_162_input_3
        to: 'off'
    sensor:
      - name: "Furnace Gas Input"
        state: >
          {% if is_state('binary_sensor.shelly_i3_162_input_3', 'on') %}
            21975
          {% else %}
            0
          {% endif %}
        unit_of_measurement: W

This provides a 22KW equivalent power utilization sensor whenever the gas valve should be open, there are other factors that may cause the furnace to shut off the valve when the thermostat is calling for heat, but in general it should be accurate enough unless there is a furnace problem. I may eventually check realtime readings on the meter to see if an adjustment is required.

The second sensor reads this over time to calc the Riemann sum and increment the value, since the “curve” is basically a square wave, the reading is extremely accurate, a rounding of 4 allows measurement down to the watt-hour.
I tried adding a device class for energy but it did not like that, perhaps that is something that will be addressed in a future HA update.

sensor:
  - platform: integration
    source: sensor.furnace_gas_input
    method: left
    name: "Furnace Gas Usage"
    unit_prefix: k
    round: 4

Readings look good! I hand checked several of the steps and the graph values match. Next step is to modify the template sensor to better behave during HA restart, then maybe add electrical utilization sensors based on the relay states, but I need current readings for the HVAC system to do that (hello new clamp meter!)

Based on furnace behavior I have decided the permanent wiring will be to the HVAC control board and not the zone controller, specifically because the blower fan controller adds a delay after the fan signal is removed, and I want to capture that without adding another template sensor or an additional wire from the zone controller to the blower relay.

Old thread, CaptTom, wondering on details of your 24VAC zone valve relay signal to your pi GPIO. interposing relay or optocoupler or… just giv er?

I use a relay (contactor) with a 24VAC coil. The contacts connect directly to the pins on either the RPi running HA, or a ESP8266 running ESPHome. I started out with the direct connection but have added the ESP for additional sensors after HA dropped native support for GPIO pins on the RPi.

1 Like