Calculation of hourly/daily energy consumption

Hej folks,

I’ve been searching the internet for days for the right solution, but haven’t found it yet.
In the last few days I have been using Grafana for the first time and now I wanted to have the daily consumption of my Fritz! powerline socket displayed graphically as a bar chart.
My socket shows me the current voltage value in Volt and the current consumption in Watt. However, I don’t know which variables I have to set in the Query Editor to determine the hourly and daily energy consumption. Which variables and which calculations do I have to use for this output?
Is there somewhere an overview where all variables are described with their functions? Because I haven’t found one anywhere.

Thanks for your help!


Query Editor for hourly consumption


Query Editor for daily consumption

Where is the data stored? If your data source is only broadcasting the current value and not storing it, then you won’t be able to show the past data. Grafana does not store metrics, it just displays them.

Hej @dianapayton,
I hope I understand your question correctly. My data is visualised via an InfluxDB database at Grafana. So there should be much more data available than just the current values?
But how can I calculate my power consumption and is there an overview of all possible query variables?

Okay, I get what’s going on.

You are looking in Query options, which controls things like max data points for your query, but has nothing to do with variables.

You need to define the variables before they appear (unless you have some already in InfluxDB, but I don’t know about that).

Start at the top of the Templates and variables section.

You will probably want to define some query variables for the calculations that you need.

Hope that helps!