Energy Usage Chart

thanks I was able to get the graph work.
BTW, you mentioned earlier that adding a panel to HA didn’t work for you, I tried and seem to work (but for some reason it didn’t like anything other than ‘router’ as panel name)

All panel with graph work fine locally, when I try from my iPhone it just give me blank page, is it becaz the panel iframe url is local ip. How does the url inside the panel run anyway, is it processed locally by HA before rendering so I don’t have to open port 3000

looks like from outside home trying to access graph ip:port directly which obviously fail unless the port is open.

Anyway thanks for your help.

Glad you got it working, this looks really nice - I think Grafana comes also with a bright theme which probably looks better inside the HA web UI.
Regarding why I didn’t get it to work: IIRC there are some restrictions when embedding HTTPS content.
Also, I’m running HA inside a docker container while Grafana runs “natively” on the docker host.
I think I ran into some problems resulting from both facts and I just didn’t want to invest too much time :wink:

To access the panel from an outside network, you’d need to get a dynamic DNS hostname and then configure port forwarding on your router to e.g. forward connections on port 3000 to the IP/Port your Grafana instanance runs on.

I think the HA webinterface just embeds the content from that IP, i.e. the connection is initiated on the device that displays the web UI.


thanks elRadix
I also include History.graph and I like how it shows well inside HASS, I set to show 240
Is the data stored in HASS for ever?

It is stored in the HA database.

Unfortunately, over the year or so that I have been using HA, my database has become unusable 3 or 4 times, and had to be deleted. This would have lost all my history, had it not been stored in influxdb.

I have space heater connected with zwave energy switch which show current usage, how can I add the energy usage in a graph

Basically this is first time I put a heater in my greenhouse and see how much of energy I am using just to keep it around 45F, and want to decide if its worth it or not, So something thats useful for me that shows total energy used as of date and I can calculate the cost.

So I setup a temperature sensor and energy switch and setup an action to start the heater when temp goes below certain degree and stop above certain degree. (rather than completely trusting on thermostat of the portable heater)


follow this guide, really well explained

Thanks for the guide, i was able to put some graphs.

How did you get the Graph option on the left side and integrated the grafana graph?

I Have my ups setup using the NUT sensor… i see the history of the wattage which is nice because i can see when it spikes and the current wattage of the systems… is there a way to calculate and display the power usages for the day… month… year? that way i can get an idea about how much power my systems are using total.

Hi, please can you republish the link? Thanks in advance

Hi. This is not good idea to use this script. I am not using it any more. Each time script read all related data from database - can damage SD card on raspberry. I am planning build modern script, But it is not ready.

Would you share your code please? the file is not available anymore…

Which ups model?