After finishing my fist Home Assistant (HA) project controlling our AlphaESS solar inverter I started to wonder what else could be automated, besides the usual suspects like smart plugs.
We ran out of heating oil in the past, not just once, one time on Christmas Eve – not ideal timing. So I started looking into monitoring tank contents. There were all kinds of options, all sounding very complex and expensive. I started wondering if I can’t just measure the time the burner is actually running, measuring the consumption that way. After a bit of research I noticed that others were doing (or trying to do) it that way too.
Parts required: since I already had a couple of Shelly’s I chose Shelly’s cheapest power monitoring option, a Shelly 1PM Mini Gen3 for ca. €15.
I installed the Shelly behind the existing heating timer, keeping the original timer functionality in tact. Once that was done I did some quick test, reading the power consumption of the heating running, taking one reading of only the circulation pump running (ca. 25W) and a second reading of both circulation pump and burner running (ca. 130W).
Next I rang our heating guy to find out the specifications of the oil heating, the details of the burner nozzle. The nozzle fitted in our heating was a 0.75 gallon per hour one = 2.83906 L/h. That and the power consumption measured earlier was all the information I needed, the rest was creating some helper sensors and an automation to reset the counters after topping up the oil tank.
Helpers
- Create helper > Template > Sensor:
Name: Heating On
State: “{{ (states(‘sensor.heating_switch_0_power’) | float(0)) > 80 }}” (where sensor.heating_switch_0_power is the name of your Shelly sensor) - Create helper > History Stats:
Name: Heating On Today
Entity: Heating On (sensor.heating_on_today)
Type: Time
State: True
Start: {{ now().replace(hour=0).replace(minute=0).replace(second=0) }}
End: {{ now() }} - Create helper > Template > Sensor:
Name: Heating Oil Today
State: {{ (states(‘sensor.heating_on_today’)|float(0) * 2.83906)|round(2) }} (where 2.83906 is specific to your burner’s nozzle)
Unit of measurement: L - Create helper > Utility Meter:
Name: Heating Oil Total
Input sensor: Heating Oil Today
I’ve also added two additional helpers, Heating On Today, Heating On Total, an automation to reset the Totals after refilling the oil tank and a notification when the remaining oil level drops below a threshold.
