Energy Management in Home Assistant

TL; DR: We’re adding energy management and it’s awesome. Created two products to read out electricity meters: SlimmeLezer for P1 ports & Home Assistant Glow for activity LEDs. Upgraded most of the existing energy integrations to be compatible.

The world is in a climate crisis. Global warming is a reality and the weather is getting unpredictable. Our way of living needs to change, at all levels. I am worried that the climate crisis is something that the world is going to try to solve too late and after irreversible damages have already been done.

So with Home Assistant we want to do our part to help take on the climate crisis, and help you do the same. One part of fighting the climate crisis is making sure our homes are energy efficient and use low-carbon energy sources.

Starting today, Home Assistant is adding official support for home energy management. Our energy management will help users monitor the energy usage, transition to sustainable energy and save money.

Home automation and energy management are built on top of knowing what devices are doing

Energy management and Home Assistant in context

Bill Gates was recently interviewed by Marques Brownlee (MKBHD) and talked about how intelligent homes are needed to make smart cities. And how all of this starts with energy management in the home. The interview is 3 minutes and worth watching:

Home Assistant won’t have all the answers when it comes to energy management, at least not right away. But we have two key things going for us that makes us the perfect platform to choose for your energy management:

The first is that we’re completely open. This means that with Home Assistant, anyone can use the source or its collected data and build anything with it. We already see this happening: the European federation of citizen energy cooperatives is using Home Assistant to build energy management software tailored for communities. We are part of a rich ecosystem with many different approaches, all connected with Home Assistant.

The second thing is that we have a passionate and global community that wants to make their homes the best it can be. A community that revolves around building and sharing their own hardware and software to be able to achieve their goals. Through experimentation and iteration we will be able to improve energy management over time to fit our needs – there are no investors to satisfy.

When it comes to your home, Home Assistant is the best platform to manage it and figure out what works and what doesn’t.

Energy Dashboard

Today’s release of Home Assistant Core 2021.8 contains a new energy dashboard (demo). The goal is to make it super easy for users to get insight into their energy usage. The dashboard has been designed to see at a quick glance how you’re doing today, with the option to also break down per hour to see what happened when. It also includes indicators to help you identify your reliance on the grid and if adding energy storage would help your situation.

(above) Different ways of looking at your consumption will help you better understand your energy usage (below) The energy usage graph shows per hour how much energy you used from the grid, how much energy you produced and how much of that energy went back to the grid.

Users will be able to see at a glance what sources of energy have been used in their home. This insight includes the carbon intensity of the electricity being consumed from the grid, which is available thanks to electricityMap.

If users have solar panels they can set up the Forecast.Solar integration which allows users to see at a glance how today’s production is going to be. This enables users to schedule when to charge their electric car or heat extra water.

Energy management is complicated, so we made sure that our energy settings are as easy as it can be. They are accompanied with documentation to further explain the different concepts.

Users can configure their consumption and production and Home Assistant will do the rest. Home Assistant can pull in energy data from any supported hardware such as smart energy meters, inverters, CT clamps, pulse monitors and smart plugs.

The configuration is separated into different sections.

Hardware

Home Assistant is vendor agnostic and there is no vendor lock-in. You can use any hardware that you want. We’ve already upgraded many of the existing integrations for energy monitoring to work out of the box with energy management.

Besides supporting existing integrations, we’ve also created two open-source hardware projects to help you get your energy data into Home Assistant.

Slimme Lezer

Most energy meters in the Netherlands, Belgium and Luxembourg have a P1 port on their energy meter. This port provides real-time usage statistics.

Together with Marcel Zuidwijk we have designed and developed SlimmeLezer. This product, based on ESPHome, will make all P1 data instantly available in Home Assistant. P1 ports using the DSMR v5 protocol will also be able to power this device directly, so you don’t need an external charger. The SlimmeLezer firmware is fully open source.

Buy a SlimmeLezer

SlimmeLezer on GitHub

Home Assistant Glow

Most energy meters will flash a small light when a fixed amount of energy has been consumed. Home Assistant Glow monitors this light and brings it as a consumption sensor into Home Assistant.

Home Assistant Glow is powered by ESPHome. Both firmware and case are fully open source and it is relatively straightforward to make your own with the included guide.

The Home Assistant Glow was designed and developed by Klaas Schoute as part of his internship at Nabu Casa.

Home Assistant Glow on GitHub

This is only the beginning

Today we released the very first version of energy management in Home Assistant 2021.8. We have many ideas that we’re going to add in the next couple of releases.

If you’re interested in helping out, don’t hesitate to stop by the new #devs_energy channel on our Discord server.

New possibilities for advanced users

Every home is different and so are the needs of individual users. The energy management feature in Home Assistant is created with existing Home Assistant building blocks: Lovelace & Data storage. This means that our advanced users can choose to build up their own dashboards and use the pieces from the energy dashboard that they like.

On top of that, advanced users will have access to the new long-term statistics that have been added to Home Assistant. This data allows you to easily monitor most sensor data over long periods of time, not just energy data.

Thank you community

Our home energy management has been in the making for over six months and many people and companies around the world have contributed to making this a success.

We’ve upgraded how Home Assistant stores data, renders charts and enhanced many other parts. We also extended the sensor model in ESPHome and added new features to make it possible to create devices that work out of the box with energy management. It’s been a lot of work by a lot of people and I am very proud of what we have been able to accomplish.

It shows that open source works: when you bring a group of people together that are passionate about something, great things can be made.

I want to give a special thanks to Klaas Schoute who started the initial research as part of his internship at Nabu Casa. He researched available solutions, created his own solutions (Home Assistant Glow), held in-depth interviews with 20 Home Assistant users, created the first iterations of the dashboard and integrated new data sources into Home Assistant (forecast.solar). Thanks Klaas!

Support our work

If you like what we’re doing and want to help fund our work, subscribe to Home Assistant Cloud.


This is a companion discussion topic for the original entry at https://www.home-assistant.io/blog/2021/08/04/home-energy-management/
8 Likes

great stuff! thnx for sharing

btw, the slimmelezer url in this post is wrong , it points to www.slimmelezer instead of www.slimmelezer.nl

1 Like

This is awesome! Can I use my already running MQTT sensors as slimme meter source for the new Energy Management functionality?

2 Likes

This looks like a nice new feature. I would also like to use the MQTT protocol to add my meter data. Hope this will become available one day.

5 Likes

Any chance we can also input data for our natural gas usage? That data also comes through the same P1 smart meter reader so it would be great if we can also add that consumption (with m3 units)

7 Likes

Hi !

Awsome work as usual ! Hats off !

One thing tho, I just updated and I can’t seem to find how to get to that energy configuration… Is there anything I need to enable ?

Thanks in advance !

That is available. Zigbee2MQTT is an example that uses MQTT to provide energy data in their latest release combined with this Home Assistant Core release.

Sounds like you are not using default_config: in your configuration. Either add that back so you use the default set, or in case you don’t want to have that, add energy:.

6 Likes

Heh, I guessed it but I did not find it in the default_config docs so I wasn’t sure ! Thank you very much :slight_smile:

2 Likes

I live in Australia and they read my metre now with a Wi-Fi single so now they don’t have to come into my house they can do it from my footpath… Love to hook it up to home assistant to do the reeds for myself don’t know if there’s anything anyone else has done…

Thanks for the information about Zigbee2MQTT. Don’t know if that could help me as I have manual MQTT sensors in my configuration.yaml from an old smart meter system that don’t show up in the drop down list. But i willk have a look later on.

See: https://www.home-assistant.io/integrations/sensor.mqtt/#last_reset_topic

Really great stuff! If I understand correctly, the SolarEdge integration needs to be updated by the maintainer for so it can show on the Dashboard? Or is there something I can do with a template?
(same question for the Tesla integration :slight_smile: )

SolarEdge is working, as I am a SolarEdge owner, I made sure it worked :smiley:

image

4 Likes

Amazing job guys!!! Looking forward to test this new functionality.
I haven’t seen anything regarding energy storage (I have an LG Chem battery connected to my SolarEdge inverter). Are there any plans to support this kind of setup?

Thank you!!!

1 Like

How do I disable this?

2 Likes

Haha. I had added that one, but it showed 0 kWh. Guess I just have to be patient :slight_smile:

But the Tesla integration needs an upgrade before I can add it as a device that consumes quite bit?

1 Like

Yes, I have added last_reset_topic but doesn’t seem to do much. In the developers page Sensor Entity | Home Assistant Developer Docs it talks about last_reset (for sensors) instead of last_reset_topic (for MQTT). Anyway, this isn’t really the place for troubleshooting, keep up the good work and I will figure it out eventually.

Please add Emporia Due integration as it is an excellent home energy monitor. I currently rely on HACS to offer integration and am not sure if that will translate into usable info for the new energy monitor.

Also will the Zooz z-wave plugs that provide energy use data be usable with this?

2 Likes