openevse_esp32_firmware
openevse_esp32_firmware copied to clipboard
OCPP does not report correct energy if EV is not unplugged
If an OCPP session is stopped but the EV remains plugged in the wh reported by the EVSE does not increment, since the EVSE only increments lifetime wh when the EV is unplugged

@jeremypoulter @lincomatic is there a reason why the EVSE only increments lifetime wh when the EV is unplugged? I think it would be better if lifetime wh was incremented in real-time during a charging session
Think this has always been the behaviour of the OpenEVSE. We can easily sum the total + session values if needed if the session value clears when the total increases will have to do some tests.
Also on the subject, calling these wh/watthour and wattsecond is terrible, what do folks think about correcting the names and units in the v4 (breaking backwards compatible) ?
This is addressed in #255
@glynhudson Can you ckeck if the PR solves this issue? Unfortunately, I cannot test it with a real load.
@matth-x did you change this just for OCP we need to be careful about what is fixed in OCPP and what is at a higher level.
Yes I've only worked on the OCPP side of this.
Then I think we should remove from OCPP, and fix generically for consistency.
Yes, that would be great. The energy reading is fully encapsulated in my code, so switching to another function will be no effort.
PR https://github.com/OpenEVSE/ESP32_WiFi_V4.x/pull/556 will breaks things here as now counters will be updated in real time @matth-x I let you check the changes involed for OCPP ?
@KipK Thanks for the notice, I checked it and commented in the PR.