I want to use Grafana to create a dashboard where I can easily switch from hourly to daily, weekly or monthly view from my solar power entity_id.
But I don’t know how I wil calculate the difference between 00:00-23:59 in time interval.
Could you help me please ?
Antony, thank you so much for your interested in…
I want to show the power produced by solar panels as the total energy produced at the end of the day, week etc.
how do i chart the total production at the end of the day or the weekend ?
For example, I store the grid in power, grid out, home and solar every second and the do a downgrade data to one minute to free resources.
So I do a mean by hour to see a “day chart”. See i query all data in one query.
I did diferent days with: Query Options → Relative time, Time shift
SELECT sum("P_Red")/60 AS "Red", sum("P_FV")/60 AS "FV", sum("P_Exp")/60 AS "Exportada", sum("P_Cargas")/60 AS "Cargas" FROM "Potencias" WHERE ("Tipo" = '1m') AND $timeFilter GROUP BY time(1h) fill(null)
Thank you my friend,
It looks like so cool. Also I would like to do my charts.
Whattever i am new on the grafana and influxdb. Could you expleane a little more how i would set it ( SELECT sum(“P_Red”)/60 AS “Red”, sum(“P_FV”)/60 AS “FV”, sum(“P_Exp”)/60 AS “Exportada”, sum(“P_Cargas”)/60 AS “Cargas” FROM “Potencias” WHERE (“Tipo” = ‘1m’) AND $timeFilter GROUP BY time(1h) fill(null) )
I store in my InfluxDB the power consumption every second. So I have 60 measurements every minute, 3600 every hour.
In my python script, where I collect the data, I do a mean every minute and store in the InfluxDB with the label “Tipo” = ‘1m’… in english “Type = 1 minute”
The query in Grafana is… give me the sum of “P_Red” and divide it by 60.