Power consumed per day


Here is a picture of my setup:


On the original topic: I have gotten a few more questions from friends on how to make that dashboard. I have moved everything over to an Intel NUC and recreated the dashboard and decided to do a little write up on it as a first post on my new site: https://www.clevercrib.net/visualise-energy-consumption-with-grafana/

I hope it helps a few people (@nicx ?) and please let me know if anything needs clarification :smiley: or what you would like to see next


@dmircea then the solution @rtenklooster suggested is your best bet I think. Are you running hassio? If so, you need to install the nodered addon to get going, assuming it is supporting mariaDB. I will look into it a bit more later this week, can’t do much from where I am now though


My setup: Just a simple ESP8266 as serial bridge.


and @rtenklooster, you wrote a sketch to read serial data and whenever something is received post it as mqtt topic or something?


No, what I did at first was using Domoticz just for the DSMR reading. Domoticz published every event on the MQTT bus. That’s how I was able to use NodeRed.

Since last week I’ve directly added it in HA. I’m not to happy with it atm. I liked the simple domoticz statistics.
Using node-red I logged the daily usage to MariaDB and influxDB.


Not sure I understand (I am not familiar with domoticz): are you not happy with the data as it comes out of DSMR? I guess you could write a sketch on the esp to read the serial data and have that publish an mqtt message, right?


No, It’s just the way Home Assistant handles the data.

Domoticz summarizes the data and creates some simple but usefull graphs.
I can see my daily, monthly total usage, costs etc.

Just a simple overview of my usage.


Well, since you have all the data in MariaDB, and the dashboard you saw is in Grafana, there is no need for HASS to be involved, if it is only the dashboard you want. You would have to install Grafana (which is an add-on for HASS.IO if you are already running HASS), and within Grafana install MariaDB as a datasource to connect to your database. Then import the dashboard JSON from the repo and adjust to your setup. I made the dashboard based on the sensor names HASS creates and are stored in InfluxDB, hence the need for you to adjust to your MariaDB and probably other sensor/field names in the SQL.


Can u please show us how to get graph as yours


hi @kirpat, the graph in @rtenklooster his post is from a different home automation software: Domoticz, so that is not something you will find in home assistant. It would be possible to make something similar in grafana, but home assistant does not provide such a graph.



this is pretty awesome indeed, and exactly what I ws hoping to create someday…
Having all necessary sensors available in my HA setup, I was wondering if you could guide us through setting this up in Grafana/Influx (which I have already been able to setup too, or at least think so, didn’t use it to this day)

What would be the best way to start, collecting all data in this view?

Lovelace: Power wheel card

Hi @Mariusthvdb, have you seen the writeup I did on it? That article contains a link to a gitlab repo where you can find the code to import into grafana to get your own, assuming your setup is similar to mine:

You would then import the dashboard JSON from the repo and indicate what database to use (the one where your home assistant logs its data).

Hope that helps, if not, let me know, I can have a go at doing a screenrecording and put it on youtube or something.


yes, thanks, I did read it, but missed the import… which looks as if it is ready to use…very nice.

since Ive never really used Grafana yet, only set it up once to see influxdb, please help me with this:

  • how do I import this in Grafana?
  • I have all sensors available for the entities needed, but they are not derived from the Hassio dsmr component. where do I enter the entities/ sensors to use? Is that done in Grafana, or do I have to edit the import json manually first. If the latter, please tell me how?



Hi @Mariusthvdb,

I did a quick screen recording to explain how to import the JSON from the gitlab repo into Grafana and some pointers where to make changes to the queries if you have stored the data using a different setup. Hope this helps!


Video updated, please see above


This is so wonderful thank you! Managed my way back in to Grafana today and will try to import soon! Thanks a bunch. This needs a firm place in the Cookbook imho :+1:


how do i know if this is compatible with my energy provider and or gas provider?


Hi @david1, I am not sure I understand your question, but this is what I can think of:

With respect to creating a grafana dashboard for energy consumption monitoring:
This dashboard is fed using data on energy consumption. It does not really matter if it comes from a smart utility meter, or some other system that is able to provide this data. For example: If you have a smart plug or switch that provides power monitoring, you could use that as source for the electricity graphs. It would not graph “whole house electricity consumption” but “appliance electricity consumption”, but could still be useful.

But if you have a utility meter that is able to provide a serial output that you can tap into, you could use that data to create similar graphs.

With respect to the setup of capturing data from a smart utility meter into home assistant:
If you are able to get data from your smart meter using the DSMR component, you’re in good shape. The component page shows various utility meters that the component is compatible with, but the D in DSMR stands for Dutch. So, I am not sure if or how well it works for smart utility meters that are not located in Holland.

Having said that; there are currently 26 components in the “Energy category” in home assistant, maybe one of those can help provide meaningful data for energy consumption monitoring and analysis for your setup. Or, add a new years resolution to your list for 2019 and try to develop a component yourself if you haven’t already :slight_smile:


Thanks, very nice words! Not sure if this qualifies for the cookbook, since most of this stuff is done outside of home assistant. But, I’d be happy to see if it can get a spot there. For me, this dashboard is only step 1 in a longer journey to monitoring energy and finding ways to measure the impact of changes in the house to reduce energy consumption. I’ll make sure I will share it all here and on the blog :slight_smile: