Yesterday, we had a very short “blackout” - not even all of my devices rebooted. EmonPI did, however, and the pulse count was reset to zero after reboot, which, in turn, of course messed up many things in emoncms.
Is there any way to prevent this from happening again?
Look at using the “Wh Accumulator” or “Total pulse count to pulse increment Count” processes, they are designed to accumulate the increment since the last value rather than using the pulse count directly.
I have also noticed occasionally the Wh Accumulator is reset to zero. This looks like it could be a bug. Interestingly, I have only noticed this when logging pulse accumulators from emonTx / emonTH not directly from emonPi, I’m not sure if this is significant. I will try and investigate with @TrystanLea.