Best way to track consumption though a smart plug

Hi there
Just bought a Blitzwolf smartplug in order to track my fridge energy consumption.
Right now I have it flashed with espurna and can get all of this sensors through its rest api

Switch [ON/OFF]
Current (Amperes)
Voltage
Active Power
Reactive Power
Apparent Power
Power Factor
Energy (kWh) → counter is reset to zero when switch is turned off, firmware upgraded, or house power loss

I’m wondering the best way to send the consumption info to emoncms.
My first idea would be using the Energy (kWh) sensor but do not know how to avoif the spikes due to the “turn to zero” effect when/if the plug is reset
Should I use the active power? After logging it using power to kWh conversion? How often should i read it?

I’m pretty sure many of you may have same configuration, so any clue will be more than appreciated

Thanks a lot in advance

I am not an emonCMS expert, but my understanding is the Wh accumulators should ignore the drop to zero and continue accumulating when your smart plug returns.

However, it appears that there might be a bug: Wh accumulator does not survive several reboots

I suggest you watch that thread.

Have you set up your emonCMS to see what happens?

The “Help” texts:

Wh Accumulator: Use with emontx, emonth or emonpi pulsecount or an emontx running firmware emonTxV3_4_continuous_kwhtotals sending cumulative watt hours.

This processor ensures that when the emontx is reset the watt hour count in emoncms does not reset, it also checks and filters out spikes in energy use that are larger than a max power threshold set in the processor, assuming these are errors, the max power threshold is set to 25kW.

and

kWh Accumulator: This processor removes resets from a cumulative kWh input, it also filters out spikes in energy use that are larger than a max power threshold set in the processor, assuming these are errors, the max power threshold is set to 25kW.

Hi @Robert.Wall thank you for the answer
No. To be honest did not set up as I still was trying my recently adquired gadget before installing in in his definitive housing.
In fact I will do it the way you suggest and see what happens.
My understanding was that many people could be using similar plugs so config would be quite straightforward based on people experience. Unfortunately seems like these plugs might not be as popular as I thought.

Thats a lot for your answer.

Julio