ErikdeVries.com
ErikdeVries.com

Monitor energy consumption in Home Assistant

Published on

Home Assistant is the perfect solution to monitor energy consumption around the home (both electricity, gas and water). As energy keeps getting more expensive I found it quite helpful to see what I could possibly do to reduce it. And a good way to accomplish this is to first get detailed insight in what is actually consuming energy.

Total energy consumption

Years ago I started by connecting Home Assistant to my smart-meter (slimme meter in Dutch) using a P1 cable (a cable that connects the smart-meter to a usb port on the machine running Home Assistant). This provided me with real-time information on the consumption of both electricity and gas. The downside to this solution was that it did not provide me with fine grained insight of what devices were actually causing the energy consumption.

Home Assistant Energy Usage

Monitor individual devices

More recently I purchased several smart plugs (Shelly Plus Plug S) and a couple behind the wall energy monitors (Shelly PM Mini Gen3). I picked these Shelly devices as they can be used fully local in Home Assistant without the need to connect to a cloud and they have been around for quite some time and generally well liked.

At the moment I have the following in place, starting with several smart plugs:

  • Office desk (monitor, laptop, speakers, etc.)
  • TV and media (TV, PlayStation, receiver, mediaplayer, etc.)
  • Meterbox (NAS, Intel NUC running Home Assistant, network devices, etc.)
  • Bike charger
  • Fridge
  • Heating

And I have a single Shelly PM Mini Gen3 in use for my washing machine and dryer. Check out my other blog on how I set this all up.

After adding these devices to Home Assistant they can be added to the energy dashboard, which results in a nice breakdown of energy consumption per device.

Home Assistant Energy Usage Individual Devices

Something is missing!

This still doesn't cover all the energy consumption, for example my home is equipped with mechanical ventilation, I have quite a few smart lights, and devices like a HomePod. It is not feasable to put each and every device behind an energy monitor, but there is a really clever alternative by the name Powercalc.

Powercalc is a custom component for Home Assistant to estimate the power consumption (as virtual meters) of lights, fans, smart speakers and other devices, which don't have a built-in power meter.

After installing Powercalc using HACS (check the Powercalc documentation on how to set it all up) it detects all the supported devices and creates virtual energy meters for them.

I then create two groups, one for all the lights in my house and another one for all the Shelly energy monitors (as these devices also consume a little bit of energy, in my case they consume around 7,5 watts in total).

Lastly I created a custom virtual energy sensor for the mechanical ventilation in my house. I checked the manual and found out it uses around 2,1 watt when off to 64,5 watt when on high. Using Powercalc I created a linear sensor that calculates the usage depending on the mode of the ventilation (this might not be 100% acurate, but close enough for my needs).

Wrap it up

Everything combined this provides me with pretty good insights in the power usage in my house. There are still some gaps, like I do not monitor the oven, water kettle and coffee machine. But I am aware of this, so any "untraced" usage is from these devices.

The most interesting insight I gained was the consumption of the mechanical ventilation which is a lot higher than I expected. This made me rethink some automations to make sure the ventilation does not run on high when not needed (e.g. at night or when humidity and/or air quality is sufficient).

I also replaced a desklamp which was still using an old fashioned light source consuming up to around 50 watts. And more generally it sparked some thoughts on how to further reduce energy consumption.