I’ve been looking into showing monthly energy consumption for some time now. Right now I have a shelly 3em sending data into HA using the built in shelly integration. Then I have a daily , monthly and yearly utility meter running on the power consumption. Thats all great.
… But.
I would really like to have the power consumption available on monthly basis - not like 30 days but actual real months. So 12 columns going from January to December . I’ve been trying with influxdb and got flux working so I could split data based on 1mo and not just 30days like I’ve seen many do, but still … It’s not quite there.
So I really want to hear if someone has solved this problem and want to share how? Everything from back to frontend ideas/solutions are welcome!
Hi
I’m also looking for such features since months, but never find any solution so far. Ieven tried using InfluxDB+Grafana, but no way…
Yes, if someone has an idea that would be great as it’s clearly something really missing there in HA Utility meter and/or Grafana too
Hi @isaste , right now I’ve configured my recorder to send the daily utility meter data to a mariadb . Here I will try to do some old school sql magic and first group by day to find the max value pr. day and then group by month and find the total sum pr. month.
I’ve also hooked grafana up to this database and I will try to use this as the frontend
I think both myself and @isaste have tried to group by month in grafana . Not 30 days , but actual months. And both of us failed. If you want to share how to do that it is much appreciated!
@cvester have you managed to do it in the end? I’m in the same boat with shelly devices and utility meter for daily/monthly consumption, but I would like to be able to visualize it in grafana by month.
We do have that in ‘Energy’ part of the HA now, but I would like to have it in grafana as well.
It’s what replaces InfluxQL as interrogation language.
It isn’t too far from jinja in some ways, but hard to grasp if you’re accustomed to SQL-like languages , or at least it is for me
@nightshadow , no I never really managed to get it grouped by month . I ended up grapping the numbers from my energy company’s website instead
If I should make it now I think I would just make some sort of script that runs last day every month and grabs the current number into a database, then perhaps make some sort of derivative when selecting it from the DB .
So I would have the new ‘value_template’ entity which would update once a month only… And all I have to do is put that in grafana…
Simple solution, but it is what I need exactly Thanks!
But the entity sensor.monthly_total_energy has ‘unknown’ state.
sensor.monthly_energy is the entity from utility meter that’s calculating monthly energy usage of my shelly 1PM sensor.
Any idea what’s wrong?