I am using Grafana to do some home monitoring, specifically energy flows/consumption/PV power being generated adhoc/right now.
I would like to display the power being generated for the 2 inverters separately and as a grand total, I partially succeeded by configuring the queries as follows:
select last(vermogen)
FROM (
SELECT mean("number_SMA_ACVermogen") as vermogen
FROM "SMA_values"
WHERE $timeFilter
AND ("host" = 'SMA1')
GROUP BY time(1s)
)
My thought was that by grouping them by 1s Grafana would be able to make a total, however, sometimes the values and the associated timestamp being returned differ 1 second or maybe even 2 although I haven’t seen that which results in the following:
How do I make sure that no matter when the value was being generated, grafana always adds them both? Because that would also remove the need for grouping them since I can just select last.