Hello,
I am trying to move to Grafana and MariaDB within my openHAB configuration. In my post here
I explained how to get data from an SMA PV converter to a mysql database.
In Grafana I want to sum up the power of three phases using this sql query:
SELECT
$__unixEpochGroupAlias(TimeStamp, $__interval),
sum(Pac1 + Pac2 + Pac3) AS "Total Pac"
FROM SpotData
WHERE
$__unixEpochFilter(TimeStamp, $__interval)
GROUP BY 1
ORDER BY $__unixEpochGroup(TimeStamp, $__interval)
This works ok for time ranges smaller than two days:
The “Total Pac” was a trial and error approach without knowing what I really do
However, removing it doesn’t work -> Values ar wrong even for small time ranges