Electricity meter reading

is is possible to take the raw reading (as an input) and store the difference between last reading and the current one in a feed ?

i have a vaillant heatpump that has build in consumption reading for heating hot water and for space heating… i want to take those values and store the difference between reading

I’d suggest that you store the absolute cumulative values from Valliant, and plot the “Delta” when you graph it. Then you can get relative values for any time period: minutes, hours, days, weeks, etc.

of course… and it just came to mind that if i want to pick data directly from the database i just have to compare last value to the x number back value… ie if i read the value every hour and i want to know the consumption the last 24 hours i just have to go 24 readings back and compare