Get data from today


Currently I’m busy with moving new data from Domoticz to Grafana via InfluxDB.

The problem I have is reading the actual power usage from today.

The data I’ve got today in Domoticz is (as we speak) 8.968 kWh and Grafana is reporting 7.998 kWh.

The data is not only from today but yesterday also. So the kWh in Grafana should be higher (and not lower) when the query is wrong?

SELECT non_negative_derivative(last(“value”), 1d) FROM “Usage-1” WHERE $timeFilter GROUP BY time(1d) fill(previous)

In InfluxDB there are two power usage tables (Usage-1 and Usage-2). The total of both is the complete electrical usage of the day.