Integrating your electricity grid
Energy management is all about knowing how much energy you’re consuming, where it’s coming from and where it’s going.
Almost all houses are connected to the electricity grid which provides the energy your home will need. The energy usage is being tracked by your energy meter and is billed to you by your energy provider. Energy prices can differ based on a schedule or change according to market price.
Tariffs
It has become popular for energy utilities to split the price of energy based on time of the day; this is done in order to incentivise consumers to shift their power needs towards times where the grid has lower loads. These periods of time are commonly referred to as Peak and Off Peak, exactly because they match periods of time where everyone is consuming energy (Peak) and periods of time where the energy is abundant but no one is using it (Off Peak). Therefore Peak energy is more expensive then Off Peak energy.
If you want to split energy usage into multiple tariffs, read this.
Hardware
Home Assistant will need to know the amount of energy flowing through your meter. This data can be tracked in various ways.
Connect to your meter
The best way to get this data is directly from your electricity meter that sits between your house and the grid. In certain countries these meters contain standardized ways of reading out the information locally.
Connect using a P1 port
The P1 port is a standardized port in the Netherlands, Belgium and Luxembourg. A P1 reader can connect to this port and receive real-time information.
We have worked with creator Marcel Zuidwijk
Connect via Zigbee Energy Profile
The Zigbee Energy Profile is a wireless energy standard to provide real-time information about electricity usage. This standard is available in some meters in the US, UK and Australia. This is not “normal” Zigbee as implemented by Home Assistant but requires special certified hardware.
We are not currently aware of a device that implements this which supports a local API and is compatible with Home Assistant.
Reading the meter via a pulse counter
Many meters, including older ones, have an LED that will flash whenever energy passes through it. For example, each flash is a 1/1000th kWh. By monitoring the time between flashes it’s possible to determine the energy consumption.
We have developed Home Assistant Glow
Reading the meter via a IEC62056-21
The IEC62056-21 is a common protocol not only for electric meters. It uses an infrared port to read data.
Aquaticus
Using (Smart Message Language) interface
In countries like Germany, SML (Smart Message Language) is used typically. ESPHome’s SML (Smart Message Language)
Read the meter using an AI-on-the-edge-device
AI-on-the-edge-device
Using a CT clamp sensor
Current transformer (CT) clamp sensors measure your energy usage by looking at the current passing through an electrical wire. This makes it possible to calculate the energy usage. In Home Assistant we have support for off-the-shelf CT clamp sensors or you can build your own.
- The off-the-shelf solution that we advise is the Shelly EM
. The device has a local API, updates are pushed to Home Assistant and it has a high quality integration. - You can build your own using ESPHome’s CT Clamp Current sensor
or energy meter sensors like the ATM90E32 . For the DIY route, check out this video by digiblur to get started.
Attention! Installing CT clamp sensor devices requires opening your electrical cabinet. This work should be done by someone familiar with electrical wiring and may require a licensed professional in some regions. Your qualified installer will know how to do this.
Disclaimer: Some links in this section are affiliate links.
Data provided by your energy provider
Some energy providers will provide you real-time information about your usage and have this data integrated into Home Assistant.
Manual integration
If you manually integrate your sensors, for example, using the MQTT or Template integrations: Make sure you set and provide the device_class
, state_class
, and unit_of_measurement
for those sensors.
Troubleshooting
If you are unable to select your energy sensor in the grid consumption drop-down, make sure that its value is being recorded in the Recorder settings.
Disclaimer: Some links on this page are affiliate links helping support the Home Assistant project.