I have been logging, but ignoring, energy data for several years. I just started trying to use the data in Home Assistant, but noticed that my energy feeds are really odd. While the deltas between data points are correct, the starting point of each file is not zero, so my current values are all really large negative or positive numbers. For example, my Air Conditioner is currently showing -300920543 KWh. After an update, the new value is -300920508 KWh – so it’s moving in the correct direction. If I graph it and go to the very first data point from back in 2015, it is -303004704 KWh.
If this was rrd, I could use rrddump to dump the data, pipe it into a script to rebase the starting value to zero, and recreate the file. Is there a way to do something similar with PHPFINA? Or if it stores the deltas, is there a way to fix the starting value in each file?