Ev_energy feed get wrong data (>80KWh) for a 0KWh charge

Hi,
I started to use OpenEVSE a few weeks ago. When testing OpenEVSE features, if I click on Start (charging) and then Clear, as my vehicule is not connected, I get a 0kWh session (which is ok). In Emon EVSE the ev_energy feed gets datas and shows more than 80kWh consumed in less than 15 minutes, instead of 0kWh.

Here are the events from OpenEVSE:
… other events before 19:00 (mainly EV Not connected, Waiting - EV Not connected)
14/04/2023 18:19:44 - information - Waiting - EV Not connected - 0.00 kWh
14/04/2023 18:19:25 - information - EV Not connected
14/04/2023 18:19:24 - information - Starting - 0.00 kWh

In eMonCMS, the graph show
14/04/2023 - 18:15 : 172.5kWh
14/04/2023 - 19:00 : 254.3kWh

The ev_energy feed shows wrong values wrong. It’s the second time I have this issue since I started using OpenEVSE with EmonCMS.
On OpenEVSE, Energy frame show a total of 89.72 kWh which is the kWh I consumed since I started using it. This is what eMonCMS is supposed to show me, not 254.3kWh.

EDIT : i restarted the openEVSE right now after testing some short charging sessions (to test timer feature), and now eMonCMS shows 344kWh. eMonCMS integrate 89.7kWh (the real total of kWh I used from start) and add it to its last total (254.3 + 89.7 = 344). Not sure who is guilty between eMonCMS and OpenEVSE.

What OpenEvse property does ev_energy grabs?

Session_energy or total_energy?
First is in wh , second and other new counter data ( daily, weekly, … ) are in kwh

Can you show your energymeter values ( Monitoring / Data in openEvse web UI2)?

Hi Guillaume,

first, a big thank you for your work on the “current shaper” service. This is one of the main reason I bought EmonEVSE. I discovered this on automobile-propre.com forum. Thanks to this service, I can now adjust charging power with datas coming from my solar divert module (ArdTek MSunPV). But this is another story :slight_smile:

In my eMonCMS, ev_energy comes from “wh” input. It uses 2 process : the first convert to kWh (* 0.001), the second is a “Wh Accumulator” that feeds “ev_energy”. None of session_energy or total_energy are used. This is the default configuration for ev_energy when i added my EmonEVSE node to eMonCMS. Maybe I deleted some feeds, but I didn’t changed the settings of the existing inputs.
From what I understand, if I want to know about my sessions kWh, it would be better to use session_energy input, convert to kWh and feed into a new feed ?
I’m going to delete all the existing eMonCMS nodes and feeds and start again the EMonEVSE integration to check the default settings.
But I don’t understand the result of the ev_energy feed populated with “wh” input. The result is weird.

Here is the default initialization settings for EmonEVSE. The “Cumulative energy” (which populate ev_energy) does come from “wh” input

wh is deprecated and will be removed. Please use those:

Session_energy, total_energy, total_day, total,week, total_month, total_year

But you’re the second one reporting wrong values ( one in Hass, the other is you with emoncms ) after import old counter.
I wonder if it doesn’t publish a null value first then the imported values, reinitializing your accumulator.
If you can catch some logs somehow.

Also , I don’t know emoncms codebase. Can somebody point me out where those default openEvse variables are defined in the code to submit a PR.

Thanks