[Very Newbie] Daily consumption

Hello,
I’m retrieving the data from my power meter.
I’d like to get the daily consumption. ( reset every 24h at 00:00)

Any idea ?

My data arrive like that :
The first number is time stamp , second one the value of meter.

values:Array[1153]

0:Array[1586344268000,1591330]
1:Array[1586344272000,1591331]
2:Array[1586344275000,1591331]
3:Array[1586344278000,1591332]
4:Array[1586344281000,1591333]
5:Array[1586344284000,1591333]
6:Array[1586344287000,1591334]
7:Array[1586344290000,1591334]
8:Array[1586344293000,1591335]
9:Array[1586344296000,1591335]
10:Array[1586344299000,1591336]

What datasource are you using?

The database is handle by influx.

i think that something like:

SELECT MAX(energy)-MIN(energy)
FROM measurement
WHERE $timeFilter
GROUP BY time(1d)

but it depends of your names