Repository: evcc-io/evcc

Issue:
Easee: Charging vehicle updates SOC % to a wrong value
### Describe the bug

Charged energy in main screen is wrong. When vehicle is connected it changes the % of battery of the car and says that it already charged the car (previous charged energy). As can be seen in the log. After 30 minutes the SOC value will be the correct value, however the charged energy still remains wrong.

Linked with: https://github.com/evcc-io/evcc/pull/20659 ?

### Steps to reproduce

1.Start charging
2.Plug out vehicle
3.Plug in same vehicle or new vehicle
4. Start charging
...

### Configuration details

```yaml
network:
  # schema is the HTTP schema
  # setting to `https` does not enable https, it only changes the way URLs are generated
  schema: http
  # host is the hostname or IP address
  # if the host name contains a `.local` suffix, the name will be announced on MDNS
  # docker: MDNS announcements don't work. host must be set to the docker host's name.
  host: DS218plus
  # port is the listening port for UI and api
  # evcc will listen on all available interfaces
  port: 7070

interval: 1s # control cycle interval

# log settings
log: info
levels:
  site: debug
  lp-1: debug
  lp-2: debug
  cache: error
  db: error

# modbus proxy for allowing external programs to reuse the evcc modbus connection
# each entry will start a proxy instance at the given port speaking Modbus TCP and
# relaying to the given modbus downstream device (either TCP or RTU, RS485 or TCP)
modbusproxy:
  #  - port: 5200
  #    uri: solar-edge:502
  #    # rtu: true
  #    # readonly: true

# meter definitions
# name can be freely chosen and is used as reference when assigning meters to site and loadpoints
# for documentation see https://docs.evcc.io/docs/devices/meters
meters:
  - name: grid
    type: template
    template: homewizard
    usage: grid
    host: 192.168.0.173
  - name: my_pv
    type: template
    template: huawei-dongle
    usage: pv
    
    # Modbus TCP
    modbus: tcpip
    id: 1
    host: 192.168.0.172 # Hostname
    port: 502 # Port
    timeout: 15s # optional 
  
# charger definitions
# name can be freely chosen and is used as reference when assigning charger to vehicle
# for documentation see https://docs.evcc.io/docs/devices/chargers
chargers:
  - name: easee
    type: template
    template: easee
    user: XXXXXX
    password: XXXXXX # same as Easee app or the web portal (https://easee.cloud)
    charger: EHUTEU3B
# vehicle definitions
# name can be freely chosen and is used as reference when assigning vehicle to loadpoint
# for documentation see https://docs.evcc.io/docs/devices/vehicles

# site describes the EVU connection, PV and home battery
site:
  title: Home # display name for UI
  meters:
    grid: grid # grid meter
    pv: my_pv
  residualPower: 0 # additsehold usage margin

circuits:
  - name: main
    title: Main Circuit
    maxPower: 4500
    meter: grid
  - name: laadpaal
    title: laadpaal
    maxPower: 11040
    meter: grid
    parent: main
# loadpoint describes the charger, charge meter and connected vehicle
loadpoints:
  - title: Garage # display name for UI
    charger: easee # charger
    mode: "MinPV" # set default charge mode, use "off" to disable by default if charger is publicly available
    # vehicle: car1 # set default vehicle (disables vehicle detection)
    # remaining settings are experts-only and best left at default values
    priority: 0 # relative priority for concurrent charging in PV mode with multiple loadpoints (higher values have higher priority)
    soc:
      # polling defines usage of the vehicle APIs
      # Modifying the default settings it NOT recommended. It MAY deplete your vehicle's battery
      # or lead to vehicle manufacturer banning you from API use. USE AT YOUR OWN RISK.
      poll:
        # poll mode defines under which condition the vehicle API is called:
        #   charging: update vehicle ONLY when charging (this is the recommended default)
        #   connected: update vehicle when connected (not only charging), interval defines how often
        #   always: always update vehicle regardless of connection state, interval defines how often (only supported for single vehicle)
        mode: charging
        # poll interval defines how often the vehicle API may be polled if NOT charging
        interval: 60m
      estimate: true # set false to disable interpolating between api updates (not recommended)
    enable: # pv mode enable behavior
      delay: 20s # threshold must be exceeded for this long
      threshold: -200 # grid power threshold (in Watts, negative=export). If zero, export must exceed minimum charge power to enable
    disable: # pv mode disable behavior
      delay: 5m # threshold must be exceeded for this long
      threshold: 1300 # maximum import power (W)
    guardDuration: 5m # switch charger contactor not more often than this (default 5m)
    minCurrent: 6  
    maxCurrent: 16
    phases: 0
    circuit: laadpaal


# tariffs are the fixed or variable tariffs
tariffs:
  currency: EUR # three letter ISO-4217 currency code (default EUR)
  grid:
    # either static grid price (or price zones)
    type: fixed
    price: 0.1786 # EUR/kWh
    zones:
      - days: Mo-Fr
        hours: 6-21
        price: 0.1956 # EUR/kWh
  feedin:
    # rate for feeding excess (pv) energy to the grid
    type: fixed
    price: 0.028991 # EUR/kWh
    zones:
      - days: Mo-Fr
        hours: 6-21
        price: 0.028991 # EUR/kWh    
  co2:

# mqtt message broker
mqtt:
   broker: localhost:1883
   topic: evcc # root topic for publishing, set empty to disable
   user: XXXXX
   password: XXXXXX
 
messaging:
  events:
    start: # charge start event
      title: Charge started
      msg: Started charging in "${mode}" mode
    stop: # charge stop event
      title: Charge finished
      msg: Finished charging ${chargedEnergy:%.1fk}kWh in ${chargeDuration}.
    connect: # vehicle connect event
      title: Car connected
      msg: "Car connected at ${pvPower:%.1fk}kW PV"
    disconnect: # vehicle connected event
      title: Car disconnected
      msg: Car disconnected after ${connectedDuration}
    soc: # vehicle soc update event
      title: Soc updated
      msg: Battery charged to ${vehicleSoc:%.0f}%
    guest: # vehicle could not be identified
      title: Unknown vehicle
      msg: Unknown vehicle, guest connected?
```

### Log details

```text
[site  ] DEBUG 2025/07/01 22:31:54 ----
[lp-1  ] DEBUG 2025/07/01 22:31:54 charge power: 0W
[lp-1  ] DEBUG 2025/07/01 22:31:54 charge currents: [0 0 0]A
[site  ] DEBUG 2025/07/01 22:31:54 grid power: 1018W
[site  ] DEBUG 2025/07/01 22:31:54 grid currents: [0.64 1.32 3.79]A
[site  ] DEBUG 2025/07/01 22:31:54 pv 1 power: 0W
[site  ] DEBUG 2025/07/01 22:31:54 site power: 1018W
[lp-1  ] DEBUG 2025/07/01 22:31:54 charge total import: 14722.420kWh
[lp-1  ] DEBUG 2025/07/01 22:31:54 charger status: A
[lp-1  ] INFO 2025/07/01 22:31:54 car disconnected
[lp-1  ] DEBUG 2025/07/01 22:31:54 set charge mode: minpv
[lp-1  ] INFO 2025/07/01 22:31:54 vehicle updated: Enyaq -> unknown
[lp-1  ] DEBUG 2025/07/01 22:31:54 set battery boost: false
[lp-1  ] DEBUG 2025/07/01 22:31:54 set session soc limit: 0
[lp-1  ] DEBUG 2025/07/01 22:31:54 set session energy limit: 0
[site  ] DEBUG 2025/07/01 22:31:54 ----
[lp-1  ] DEBUG 2025/07/01 22:31:54 charge power: 0W
[lp-1  ] DEBUG 2025/07/01 22:31:54 charge currents: [0 0 0]A
[site  ] DEBUG 2025/07/01 22:31:54 grid power: 1018W
[site  ] DEBUG 2025/07/01 22:31:54 grid currents: [0.64 1.32 3.79]A
[site  ] DEBUG 2025/07/01 22:31:54 pv 1 power: 0W
[site  ] DEBUG 2025/07/01 22:31:54 site power: 1018W
[lp-1  ] DEBUG 2025/07/01 22:31:54 charge total import: 14722.420kWh
[lp-1  ] DEBUG 2025/07/01 22:31:54 charger status: A
[site  ] DEBUG 2025/07/01 22:32:04 ----
[lp-1  ] INFO 2025/07/02 10:15:16 car connected
[lp-1  ] DEBUG 2025/07/02 10:15:16 vehicle api refresh
[lp-1  ] DEBUG 2025/07/02 10:15:16 pv timer elapse
[lp-1  ] DEBUG 2025/07/02 10:15:16 pv timer inactive
[lp-1  ] DEBUG 2025/07/02 10:15:16 charge total import: 14722.420kWh
[lp-1  ] DEBUG 2025/07/02 10:15:16 charger vehicle id: 04D52062791394
[lp-1  ] INFO 2025/07/02 10:15:17 vehicle updated: unknown -> Model Y
[lp-1  ] DEBUG 2025/07/02 10:15:17 set charge mode: pv
[lp-1  ] DEBUG 2025/07/02 10:15:18 vehicle status: B
[lp-1  ] DEBUG 2025/07/02 10:15:18 vehicle soc: 76%
[lp-1  ] DEBUG 2025/07/02 10:15:18 vehicle soc limit: 100%
[lp-1  ] DEBUG 2025/07/02 10:15:18 vehicle range: 381km
[lp-1  ] DEBUG 2025/07/02 10:15:18 pv charge current: 8.98A = 0A + 8.98A (-2065W @ 1p)
[lp-1  ] DEBUG 2025/07/02 10:15:18 site power -2065W <= -200W enable threshold
[lp-1  ] DEBUG 2025/07/02 10:15:18 pv enable in 0s
[lp-1  ] DEBUG 2025/07/02 10:15:18 pv enable timer elapsed
[lp-1  ] DEBUG 2025/07/02 10:15:18 pv timer reset
[lp-1  ] DEBUG 2025/07/02 10:15:18 pv timer inactive
[lp-1  ] DEBUG 2025/07/02 10:15:19 set charge current limit: 6A
[lp-1  ] DEBUG 2025/07/02 10:15:19 charger enable
[lp-1  ] DEBUG 2025/07/02 10:15:19 wake-up timer: start
[site  ] DEBUG 2025/07/02 10:15:19 ----
[lp-1  ] DEBUG 2025/07/02 10:15:19 charge power: 0W
[lp-1  ] DEBUG 2025/07/02 10:15:19 charge currents: [0.011 0.011 0.012]A
[site  ] DEBUG 2025/07/02 10:15:19 grid power: -2047W
[site  ] DEBUG 2025/07/02 10:15:19 grid currents: [6.51 1.67 3.24]A
[site  ] DEBUG 2025/07/02 10:15:19 pv 1 power: 5039W
[site  ] DEBUG 2025/07/02 10:15:19 site power: -2047W
[lp-1  ] DEBUG 2025/07/02 10:15:19 vehicle odometer: 51860km
[lp-1  ] DEBUG 2025/07/02 10:15:19 charge total import: 14722.420kWh
[lp-1  ] DEBUG 2025/07/02 10:15:19 charger status: B
[lp-1  ] DEBUG 2025/07/02 10:15:19 pv charge current: 8.9A = 0A + 8.9A (-2047W @ 1p)
[lp-1  ] DEBUG 2025/07/02 10:15:20 set charge current limit: 8A
[site  ] DEBUG 2025/07/02 10:15:24 ----
[lp-1  ] DEBUG 2025/07/02 10:15:24 charge power: 0W
[lp-1  ] DEBUG 2025/07/02 10:15:24 charge currents: [0.011 0.011 0.012]A
[site  ] DEBUG 2025/07/02 10:15:24 grid power: -2046W
[site  ] DEBUG 2025/07/02 10:15:24 grid currents: [6.51 1.67 3.24]A
[site  ] DEBUG 2025/07/02 10:15:24 pv 1 power: 5054W
[site  ] DEBUG 2025/07/02 10:15:24 site power: -2046W
[lp-1  ] DEBUG 2025/07/02 10:15:24 charge total import: 14722.420kWh
[lp-1  ] DEBUG 2025/07/02 10:15:24 charger status: B
[lp-1  ] DEBUG 2025/07/02 10:15:24 charger vehicle id: 04B13ADA3E1290
[lp-1  ] DEBUG 2025/07/02 10:15:24 pv charge current: 8.9A = 0A + 8.9A (-2046W @ 1p)
[site  ] DEBUG 2025/07/02 10:15:34 ----
[lp-1  ] DEBUG 2025/07/02 10:15:34 charge power: 304W
[lp-1  ] DEBUG 2025/07/02 10:15:34 charge currents: [1.42 0.011 0.012]A
[site  ] DEBUG 2025/07/02 10:15:34 grid power: -1998W
[site  ] DEBUG 2025/07/02 10:15:34 grid currents: [6.49 1.52 3.23]A
[site  ] DEBUG 2025/07/02 10:15:34 pv 1 power: 5056W
[site  ] DEBUG 2025/07/02 10:15:34 site power: -1998W
[lp-1  ] DEBUG 2025/07/02 10:15:34 charge total import: 14722.420kWh
[lp-1  ] DEBUG 2025/07/02 10:15:34 charger status: C
[lp-1  ] INFO 2025/07/02 10:15:34 start charging ->
[lp-1  ] DEBUG 2025/07/02 10:15:34 wake-up timer: stop
[lp-1  ] DEBUG 2025/07/02 10:15:38 soc estimated: 76.00% (vehicle: 76.00%)
[lp-1  ] DEBUG 2025/07/02 10:15:38 vehicle soc: 76%
[lp-1  ] DEBUG 2025/07/02 10:15:38 vehicle soc limit: 100%
[lp-1  ] DEBUG 2025/07/02 10:15:38 vehicle range: 381km
[lp-1  ] DEBUG 2025/07/02 10:15:38 pv charge current: 12.1A = 3.42A + 8.69A (-1998W @ 1p)
[lp-1  ] DEBUG 2025/07/02 10:15:39 set charge current limit: 12A
[site  ] DEBUG 2025/07/02 10:15:44 ----
[lp-1  ] DEBUG 2025/07/02 10:15:44 charge power: 1860W
[lp-1  ] DEBUG 2025/07/02 10:15:44 charge currents: [1.42 0.011 0.012]A
[site  ] DEBUG 2025/07/02 10:15:44 grid power: -211W
[site  ] DEBUG 2025/07/02 10:15:44 grid currents: [6.53 7.37 3.26]A
[site  ] DEBUG 2025/07/02 10:15:44 pv 1 power: 5065W
[site  ] DEBUG 2025/07/02 10:15:44 site power: -211W
[lp-1  ] DEBUG 2025/07/02 10:15:44 detected active phases: 1p
[lp-1  ] DEBUG 2025/07/02 10:15:44 charge total import: 14722.420kWh
[lp-1  ] DEBUG 2025/07/02 10:15:44 charger status: C
[lp-1  ] DEBUG 2025/07/02 10:15:44 soc estimated: 94.15% (vehicle: 76.00%)
[lp-1  ] DEBUG 2025/07/02 10:15:44 vehicle soc: 94%
[lp-1  ] DEBUG 2025/07/02 10:15:44 vehicle soc limit: 100%
[lp-1  ] DEBUG 2025/07/02 10:15:44 vehicle range: 381km
[lp-1  ] DEBUG 2025/07/02 10:15:44 pv charge current: 4.34A = 3.42A + 0.917A (-211W @ 1p)
[lp-1  ] DEBUG 2025/07/02 10:15:46 set charge current limit: 6A
[site  ] DEBUG 2025/07/02 10:15:54 ----
[site  ] DEBUG 2025/07/02 10:45:24 ----
[lp-1  ] DEBUG 2025/07/02 10:45:24 charge power: 2575W
[lp-1  ] DEBUG 2025/07/02 10:45:24 charge currents: [11.1 0.02 0.011]A
[site  ] DEBUG 2025/07/02 10:45:24 grid power: 8W
[site  ] DEBUG 2025/07/02 10:45:24 grid currents: [7.59 9.86 3.64]A
[site  ] DEBUG 2025/07/02 10:45:24 pv 1 power: 5678W
[site  ] DEBUG 2025/07/02 10:45:24 site power: 8W
[lp-1  ] DEBUG 2025/07/02 10:45:24 detected active phases: 1p
[lp-1  ] DEBUG 2025/07/02 10:45:24 charge total import: 14722.420kWh
[lp-1  ] DEBUG 2025/07/02 10:45:24 charger status: C
[lp-1  ] DEBUG 2025/07/02 10:45:24 soc estimated: 94.15% (vehicle: 76.00%)
[lp-1  ] DEBUG 2025/07/02 10:45:24 vehicle soc: 94%
[lp-1  ] DEBUG 2025/07/02 10:45:24 vehicle soc limit: 100%
[lp-1  ] DEBUG 2025/07/02 10:45:24 vehicle range: 383km
[lp-1  ] DEBUG 2025/07/02 10:45:24 pv charge current: 12A = 12A + -0.0348A (8W @ 1p)
[lp-1  ] DEBUG 2025/07/02 10:45:26 set charge current limit: 11A
[site  ] DEBUG 2025/07/02 10:45:34 ----
[lp-1  ] DEBUG 2025/07/02 10:45:34 charge power: 2575W
[lp-1  ] DEBUG 2025/07/02 10:45:34 charge currents: [11.1 0.02 0.011]A
[site  ] DEBUG 2025/07/02 10:45:34 grid power: -9W
[site  ] DEBUG 2025/07/02 10:45:34 grid currents: [7.63 9.85 3.67]A
[site  ] DEBUG 2025/07/02 10:45:34 pv 1 power: 5685W
[site  ] DEBUG 2025/07/02 10:45:34 site power: -9W
[lp-1  ] DEBUG 2025/07/02 10:45:34 detected active phases: 1p
[lp-1  ] DEBUG 2025/07/02 10:45:34 charge total import: 14722.420kWh
[lp-1  ] DEBUG 2025/07/02 10:45:34 charger status: C
[lp-1  ] DEBUG 2025/07/02 10:45:35 vehicle status: C
[lp-1  ] DEBUG 2025/07/02 10:45:35 vehicle soc: 77%
[lp-1  ] DEBUG 2025/07/02 10:45:35 vehicle soc limit: 100%
[lp-1  ] DEBUG 2025/07/02 10:45:35 vehicle range: 386km
[lp-1  ] DEBUG 2025/07/02 10:45:35 pv charge current: 11A = 11A + 0.0391A (-9W @ 1p)
[site  ] DEBUG 2025/07/02 10:45:44 ----
[lp-1  ] DEBUG 2025/07/02 10:45:44 charge power: 2575W
[lp-1  ] DEBUG 2025/07/02 10:45:44 charge currents: [11.1 0.02 0.011]A
[site  ] DEBUG 2025/07/02 10:45:44 grid power: -8W
[site  ] DEBUG 2025/07/02 10:45:44 grid currents: [7.63 9.84 3.7]A
[site  ] DEBUG 2025/07/02 10:45:44 pv 1 power: 5670W
[site  ] DEBUG 2025/07/02 10:45:44 site power: -8W
[lp-1  ] DEBUG 2025/07/02 10:45:44 detected active phases: 1p
[lp-1  ] DEBUG 2025/07/02 10:45:44 charge total import: 14722.420kWh
[lp-1  ] DEBUG 2025/07/02 10:45:44 charger status: C
[lp-1  ] DEBUG 2025/07/02 10:45:44 soc estimated: 77.00% (vehicle: 77.00%)
[lp-1  ] DEBUG 2025/07/02 10:45:44 vehicle soc: 77%
[lp-1  ] DEBUG 2025/07/02 10:45:44 vehicle soc limit: 100%
[lp-1  ] DEBUG 2025/07/02 10:45:44 vehicle range: 386km
[lp-1  ] DEBUG 2025/07/02 10:45:44 pv charge current: 11A = 11A + 0.0348A (-8W @ 1p)
[site  ] DEBUG 2025/07/02 10:45:54 ----
```

### What type of operating system or environment does evcc run on?

Docker container

### External automation

- [x] I have made sure that no external automation like HomeAssistant or Node-RED is active or accessing any of the mentioned devices when this issue occurs.

### Nightly build

- [x] I have verified that the issue is reproducible with the latest nightly build

### Version

0.204.5

Hints from issue comments:
@VolkerK62: charged energy seems to be an Easee issue.
If you deactivate the estimator, evcc will show only the soc, the car is sending. Regardless of charged energy
https://docs.evcc.io/en/docs/reference/configuration/loadpoints#estimate@Xaelian: > charged energy seems to be an Easee issue. If you deactivate the estimator, evcc will show only the soc, the car is sending. Regardless of charged energy https://docs.evcc.io/en/docs/reference/configuration/loadpoints#estimate

That’s why I linked: https://github.com/evcc-io/evcc/pull/20659

But when I restart evcc during charging. Afterwards the charged energy starts at 0. So then it won’t get the session energy state.
Also strange, charge point in the config says 0.0 kWH charged. Easee apps says it hasn’t an open session. But at charging start it just does something strange.

On a note, it’s not always that it does this. But since I have 2 EV’s and it can be that on a sunny day (and depending on who needs to leave when), both cars are plugged in on the same way. It’s mainly only an issue for the reporting part in EVCC (and my reporting out of evcc). @andig: /cc @grimmimeloni@GrimmiMeloni: I am not clear on which problem you are facing @Xaelian.
The title states it is about the SOC of the car. That is unrelated to Easse, as we fetch the value from the vehicle APIs.
The description however states an issue about the charged energy shown in the UI, which is fetched from the charger's meter.
As these values are technically unrelated, it is important to understand which of the two this is about.

If it is the latter (charged energy), then I am happy to have another look, and would need the following from you.
* A full(no filtering, no excerpts!) evcc.log, from the very start (or as long as you can get), which includes the charge in question
* the log must have the easee logger set to trace level, so we can see the messages received from the charger
* Also, please include more specific information, e.g. instead of stating "wrong/incorrect value", please state it like "i see XXXX kWh, but would expect YYYYY kWh" or similar
* Please include a rough timestamp of the erronous charge, to help me find the relevant data faster


@Xaelian: > I am not clear on which problem you are facing [@Xaelian](https://github.com/Xaelian). The title states it is about the SOC of the car. That is unrelated to Easse, as we fetch the value from the vehicle APIs. The description however states an issue about the charged energy shown in the UI, which is fetched from the charger's meter. As these values are technically unrelated, it is important to understand which of the two this is about.
> 
> If it is the latter (charged energy), then I am happy to have another look, and would need the following from you.
> 
> * A full(no filtering, no excerpts!) evcc.log, from the very start (or as long as you can get), which includes the charge in question
> * the log must have the easee logger set to trace level, so we can see the messages received from the charger
> * Also, please include more specific information, e.g. instead of stating "wrong/incorrect value", please state it like "i see XXXX kWh, but would expect YYYYY kWh" or similar
> * Please include a rough timestamp of the erronous charge, to help me find the relevant data faster

It's mainly the charged energy. But since the charged energy goes from 0 to 15 kWh sometimes it immediatly thinks the vehicle SOC % is higher.

It looks like it's trigger by: 

> [easee ] TRACE 2025/07/03 09:56:06 POST https://api.easee.com/api/chargers/EHUTEU3B/commands/resume_charging

Below the relevant log:

>[lp-1  ] DEBUG 2025/07/03 09:56:02 charger status: B
[lp-1  ] INFO 2025/07/03 09:56:02 car connected
[lp-1  ] DEBUG 2025/07/03 09:56:02 vehicle api refresh
[lp-1  ] DEBUG 2025/07/03 09:56:02 pv timer elapse
[lp-1  ] DEBUG 2025/07/03 09:56:02 pv timer inactive
[lp-1  ] DEBUG 2025/07/03 09:56:02 charge total import: 14745.861kWh
[lp-1  ] DEBUG 2025/07/03 09:56:02 charger vehicle id: 04B13ADA3E1290
[main  ] DEBUG 2025/07/03 09:56:03 vehicle status: B (Model Y)
[easee ] TRACE 2025/07/03 09:56:03 ProductUpdate EHUTEU3B: (2025-07-03 07:56:01 +0000 UTC) LEDMODE 21
[easee ] TRACE 2025/07/03 09:56:03 ProductUpdate EHUTEU3B: (2025-07-03 07:56:01 +0000 UTC) REASON_FOR_NO_CURRENT 100
[httpd ] TRACE 2025/07/03 09:56:03 GET /api/state
[easee ] TRACE 2025/07/03 09:56:04 ProductUpdate EHUTEU3B: (2025-07-03 07:56:01 +0000 UTC) REASON_FOR_NO_CURRENT 5
[easee ] TRACE 2025/07/03 09:56:04 ProductUpdate EHUTEU3B: (2025-07-03 07:56:02 +0000 UTC) CHARGER_OP_MODE 2
[easee ] TRACE 2025/07/03 09:56:04 ProductUpdate EHUTEU3B: (2025-07-03 07:56:02 +0000 UTC) ObservationID(224) false
[easee ] TRACE 2025/07/03 09:56:04 ProductUpdate EHUTEU3B: (2025-07-03 07:56:02 +0000 UTC) NUMBER_OF_CARS_CHARGING 1
[main  ] DEBUG 2025/07/03 09:56:04 vehicle status: A (Enyaq)
[lp-1  ] INFO 2025/07/03 09:56:04 vehicle updated: unknown -> Model Y
[lp-1  ] DEBUG 2025/07/03 09:56:04 set charge mode: pv
[lp-1  ] DEBUG 2025/07/03 09:56:04 vehicle status: B
[lp-1  ] DEBUG 2025/07/03 09:56:04 vehicle soc: 83%
[lp-1  ] DEBUG 2025/07/03 09:56:04 vehicle soc limit: 100%
[lp-1  ] DEBUG 2025/07/03 09:56:04 vehicle range: 420km
[easee ] TRACE 2025/07/03 09:56:04 GET https://api.easee.com/api/sites/576803/circuits/545786/settings
[easee ] TRACE 2025/07/03 09:56:04 {"allowOfflineMaxCircuitCurrent":true,"equalizerId":"QP8PGNLK","masterChargerId":"EHUTEU3B","useDynamicMaster":false,"dynamicCircuitCurrentP1":32.0,"dynamicCircuitCurrentP2":0.0,"dynamicCircuitCurrentP3":0.0,"enableIdleCurrent":false,"maxCircuitCurrentP1":32.0,"maxCircuitCurrentP2":32.0,"maxCircuitCurrentP3":32.0,"offlineMaxCircuitCurrentP1":28,"offlineMaxCircuitCurrentP2":28,"offlineMaxCircuitCurrentP3":28}
[easee ] TRACE 2025/07/03 09:56:04 POST https://api.easee.com/api/sites/576803/circuits/545786/settings
[easee ] TRACE 2025/07/03 09:56:04 {"dynamicCircuitCurrentP1":32,"dynamicCircuitCurrentP2":0,"dynamicCircuitCurrentP3":0}
[lp-1  ] DEBUG 2025/07/03 09:56:04 switched phases: 1p
[site  ] DEBUG 2025/07/03 09:56:04 ----
[lp-1  ] DEBUG 2025/07/03 09:56:04 charge power: 0W
[lp-1  ] DEBUG 2025/07/03 09:56:04 charge currents: [0 0 0]A
[circuit-laadpaal] DEBUG 2025/07/03 09:56:04 power: -3697W
[circuit-laadpaal] DEBUG 2025/07/03 09:56:04 current: 7.25A
[circuit-main] DEBUG 2025/07/03 09:56:04 power: -3697W
[circuit-main] DEBUG 2025/07/03 09:56:04 current: 7.25A
[site  ] DEBUG 2025/07/03 09:56:04 grid power: -3697W
[site  ] DEBUG 2025/07/03 09:56:04 grid currents: [7.25 2.12 7.21]A
[site  ] DEBUG 2025/07/03 09:56:05 site power: -3697W
[lp-1  ] DEBUG 2025/07/03 09:56:05 vehicle odometer: 51937km
[lp-1  ] DEBUG 2025/07/03 09:56:05 charge total import: 14745.861kWh
[lp-1  ] DEBUG 2025/07/03 09:56:05 charger status: B
[lp-1  ] DEBUG 2025/07/03 09:56:05 pv charge current: 16.1A = 0A + 16.1A (-3697W @ 1p)
[lp-1  ] DEBUG 2025/07/03 09:56:05 site power -3697W <= -200W enable threshold
[lp-1  ] DEBUG 2025/07/03 09:56:05 pv enable in 0s
[lp-1  ] DEBUG 2025/07/03 09:56:05 pv enable timer elapsed
[lp-1  ] DEBUG 2025/07/03 09:56:05 pv timer reset
[lp-1  ] DEBUG 2025/07/03 09:56:05 pv timer inactive
[circuit-laadpaal] TRACE 2025/07/03 09:56:05 validate power: -3697W + (0W -> 1380W) <= 11040W ok
[circuit-main] TRACE 2025/07/03 09:56:05 validate power: -3697W + (0W -> 1380W) <= 4500W ok
[easee ] TRACE 2025/07/03 09:56:05 POST https://api.easee.com/api/chargers/EHUTEU3B/settings
[easee ] TRACE 2025/07/03 09:56:05 ProductUpdate EHUTEU3B: (2025-07-03 07:56:02 +0000 UTC) NUMBER_OF_CARS_IN_QUEUE 0
[easee ] TRACE 2025/07/03 09:56:05 {"dynamicChargerCurrent":6}
--
[{"device":"EHUTEU3B","commandId":48,"ticks":638871261650809780}]
[easee ] TRACE 2025/07/03 09:56:05 ProductUpdate EHUTEU3B: (2025-07-03 07:56:03 +0000 UTC) CIRCUIT_TOTAL_ALLOCATED_PHASE_CONDUCTOR_CURRENT_L1 32
[easee ] TRACE 2025/07/03 09:56:05 ProductUpdate EHUTEU3B: (2025-07-03 07:56:03 +0000 UTC) CHARGER_OP_MODE 6
[easee ] TRACE 2025/07/03 09:56:05 ProductUpdate EHUTEU3B: (2025-07-03 07:56:03 +0000 UTC) REASON_FOR_NO_CURRENT 77
[easee ] TRACE 2025/07/03 09:56:05 ProductUpdate EHUTEU3B: (2025-07-03 07:56:03 +0000 UTC) OUTPUT_CURRENT 32
[easee ] TRACE 2025/07/03 09:56:05 ProductUpdate EHUTEU3B: (2025-07-03 07:56:03 +0000 UTC) OUTPUT_PHASE 10
[easee ] TRACE 2025/07/03 09:56:06 CommandResponse EHUTEU3B: {SerialNumber:EHUTEU3B ID:48 Timestamp:2025-07-03 07:56:05.080978 +0000 UTC DeliveredAt:2025-07-03 07:56:04.118 +0000 UTC WasAccepted:true ResultCode:0 Comment: Ticks:638871261650809780}
[easee ] TRACE 2025/07/03 09:56:06 ProductUpdate EHUTEU3B: (2025-07-03 07:56:04 +0000 UTC) DYNAMIC_CHARGER_CURRENT 6
[lp-1  ] DEBUG 2025/07/03 09:56:06 set charge current limit: 6A
[easee ] TRACE 2025/07/03 09:56:06 POST https://api.easee.com/api/chargers/EHUTEU3B/commands/resume_charging
[easee ] TRACE 2025/07/03 09:56:06 ProductUpdate EHUTEU3B: (2025-07-03 07:56:04 +0000 UTC) NUMBER_OF_CARS_CHARGING 0
[easee ] TRACE 2025/07/03 09:56:06 ProductUpdate EHUTEU3B: (2025-07-03 07:56:04 +0000 UTC) NUMBER_OF_CARS_FULLY_CHARGED 1
[easee ] TRACE 2025/07/03 09:56:06 ProductUpdate EHUTEU3B: (2025-07-03 07:56:04 +0000 UTC) REASON_FOR_NO_CURRENT 78
[easee ] TRACE 2025/07/03 09:56:06 ProductUpdate EHUTEU3B: (2025-07-03 07:56:04 +0000 UTC) OUT_VOLT_PIN1_2 4.7729997634887695
[easee ] TRACE 2025/07/03 09:56:06 {"device":"EHUTEU3B","commandId":48,"ticks":638871261663631360}
[easee ] TRACE 2025/07/03 09:56:06 ProductUpdate EHUTEU3B: (2025-07-03 07:56:04 +0000 UTC) OUT_VOLT_PIN1_3 233.4810028076172
[easee ] TRACE 2025/07/03 09:56:06 ProductUpdate EHUTEU3B: (2025-07-03 07:56:04 +0000 UTC) PILOT_MODE C
[easee ] TRACE 2025/07/03 09:56:06 ProductUpdate EHUTEU3B: (2025-07-03 07:56:04 +0000 UTC) CHARGER_OP_MODE 3
[easee ] TRACE 2025/07/03 09:56:06 ProductUpdate EHUTEU3B: (2025-07-03 07:56:04 +0000 UTC) CABLE_LOCKED false
[easee ] TRACE 2025/07/03 09:56:07 CommandResponse EHUTEU3B: {SerialNumber:EHUTEU3B ID:48 Timestamp:2025-07-03 07:56:06.363136 +0000 UTC DeliveredAt:2025-07-03 07:56:05.335 +0000 UTC WasAccepted:true ResultCode:0 Comment: Ticks:638871261663631360}
[easee ] TRACE 2025/07/03 09:56:07 ProductUpdate EHUTEU3B: (2025-07-03 07:56:04 +0000 UTC) ObservationID(157) 1
[easee ] TRACE 2025/07/03 09:56:07 ProductUpdate EHUTEU3B: (2025-07-03 07:56:04 +0000 UTC) ObservationID(156) 152
[easee ] TRACE 2025/07/03 09:56:07 ProductUpdate EHUTEU3B: (2025-07-03 07:56:04 +0000 UTC) TEMP_MAX 36
[easee ] TRACE 2025/07/03 09:56:07 ProductUpdate EHUTEU3B: (2025-07-03 07:56:05 +0000 UTC) OUTPUT_CURRENT 6
[easee ] TRACE 2025/07/03 09:56:07 ProductUpdate EHUTEU3B: (2025-07-03 07:56:05 +0000 UTC) DYNAMIC_CHARGER_CURRENT 32
[easee ] TRACE 2025/07/03 09:56:07 ProductUpdate EHUTEU3B: (2025-07-03 07:56:05 +0000 UTC) NUMBER_OF_CARS_FULLY_CHARGED 0
[easee ] TRACE 2025/07/03 09:56:07 ProductUpdate EHUTEU3B: (2025-07-03 07:56:05 +0000 UTC) REASON_FOR_NO_CURRENT 25
[easee ] TRACE 2025/07/03 09:56:07 POST https://api.easee.com/api/chargers/EHUTEU3B/settings
[easee ] TRACE 2025/07/03 09:56:07 ProductUpdate EHUTEU3B: (2025-07-03 07:56:05 +0000 UTC) NUMBER_OF_CARS_CHARGING 1
[easee ] TRACE 2025/07/03 09:56:07 {"dynamicChargerCurrent":6}
--
[]
[lp-1  ] DEBUG 2025/07/03 09:56:07 charger enable
[lp-1  ] DEBUG 2025/07/03 09:56:07 wake-up timer: start
[httpd ] TRACE 2025/07/03 09:56:08 GET /api/state
[easee ] TRACE 2025/07/03 09:56:10 ProductUpdate EHUTEU3B: (2025-07-03 07:56:08 +0000 UTC) CIRCUIT_TOTAL_ALLOCATED_PHASE_CONDUCTOR_CURRENT_L1 6
[site  ] DEBUG 2025/07/03 09:56:12 ----
[lp-1  ] DEBUG 2025/07/03 09:56:12 charge power: 0W
[lp-1  ] DEBUG 2025/07/03 09:56:12 charge currents: [0 0 0]A
[circuit-laadpaal] DEBUG 2025/07/03 09:56:12 power: -3700W
[circuit-laadpaal] DEBUG 2025/07/03 09:56:12 current: 7.33A
[circuit-main] DEBUG 2025/07/03 09:56:12 power: -3700W
[circuit-main] DEBUG 2025/07/03 09:56:12 current: 7.33A
[site  ] DEBUG 2025/07/03 09:56:12 grid power: -3700W
[site  ] DEBUG 2025/07/03 09:56:12 grid currents: [7.33 2.15 7.18]A
[site  ] DEBUG 2025/07/03 09:56:12 pv 1 power: 5477W
[site  ] DEBUG 2025/07/03 09:56:12 site power: -3700W
[lp-1  ] DEBUG 2025/07/03 09:56:12 charge total import: 14745.861kWh
[lp-1  ] DEBUG 2025/07/03 09:56:12 charger status: C
[lp-1  ] INFO 2025/07/03 09:56:12 start charging ->
[lp-1  ] DEBUG 2025/07/03 09:56:12 wake-up timer: stop
[easee ] TRACE 2025/07/03 09:56:13 ProductUpdate EHUTEU3B: (2025-07-03 07:56:11 +0000 UTC) IN_CURRENT_T3 1.152999997138977
[easee ] TRACE 2025/07/03 09:56:13 ProductUpdate EHUTEU3B: (2025-07-03 07:56:11 +0000 UTC) IN_CURRENT_T2 1.152999997138977
[httpd ] TRACE 2025/07/03 09:56:13 GET /api/state
[lp-1  ] DEBUG 2025/07/03 09:56:14 soc estimated: 87.08% (vehicle: 83.00%)
[lp-1  ] DEBUG 2025/07/03 09:56:14 vehicle soc: 87%
[lp-1  ] DEBUG 2025/07/03 09:56:14 vehicle soc limit: 100%
[lp-1  ] DEBUG 2025/07/03 09:56:14 vehicle range: 420km
[lp-1  ] DEBUG 2025/07/03 09:56:14 pv charge current: 18.1A = 2A + 16.1A (-3700W @ 1p)
[circuit-laadpaal] TRACE 2025/07/03 09:56:14 validate power: -3700W + (0W -> 4140W) <= 11040W ok
[circuit-main] TRACE 2025/07/03 09:56:14 validate power: -3700W + (0W -> 4140W) <= 4500W ok
[easee ] TRACE 2025/07/03 09:56:14 POST https://api.easee.com/api/chargers/EHUTEU3B/settings
[easee ] TRACE 2025/07/03 09:56:14 ProductUpdate EHUTEU3B: (2025-07-03 07:56:11 +0000 UTC) CIRCUIT_TOTAL_PHASE_CONDUCTOR_CURRENT_L1 1.152999997138977
[easee ] TRACE 2025/07/03 09:56:14 {"dynamicChargerCurrent":18}
--
[{"device":"EHUTEU3B","commandId":48,"ticks":638871261741998010}]
[easee ] TRACE 2025/07/03 09:56:15 CommandResponse EHUTEU3B: {SerialNumber:EHUTEU3B ID:48 Timestamp:2025-07-03 07:56:14.199801 +0000 UTC DeliveredAt:2025-07-03 07:56:13.348 +0000 UTC WasAccepted:true ResultCode:0 Comment: Ticks:638871261741998010}
[easee ] TRACE 2025/07/03 09:56:15 ProductUpdate EHUTEU3B: (2025-07-03 07:56:13 +0000 UTC) DYNAMIC_CHARGER_CURRENT 18
[lp-1  ] DEBUG 2025/07/03 09:56:15 set charge current limit: 18A
[easee ] TRACE 2025/07/03 09:56:15 ProductUpdate EHUTEU3B: (2025-07-03 07:56:13 +0000 UTC) TOTAL_POWER 0.1589999943971634
[easee ] TRACE 2025/07/03 09:56:16 ProductUpdate EHUTEU3B: (2025-07-03 07:56:14 +0000 UTC) OUT_VOLT_PIN1_5 3.053999900817871
[easee ] TRACE 2025/07/03 09:56:16 ProductUpdate EHUTEU3B: (2025-07-03 07:56:14 +0000 UTC) LEDMODE 22
[easee ] TRACE 2025/07/03 09:56:18 ProductUpdate EHUTEU3B: (2025-07-03 07:56:16 +0000 UTC) TEMP_INPUT_T4 31
[easee ] TRACE 2025/07/03 09:56:18 ProductUpdate EHUTEU3B: (2025-07-03 07:56:16 +0000 UTC) TEMP_INPUT_T2 36
[easee ] TRACE 2025/07/03 09:56:18 ProductUpdate EHUTEU3B: (2025-07-03 07:56:16 +0000 UTC) TEMP_INPUT_T3 35
[easee ] TRACE 2025/07/03 09:56:18 ProductUpdate EHUTEU3B: (2025-07-03 07:56:16 +0000 UTC) TEMP_INPUT_T5 31
[easee ] TRACE 2025/07/03 09:56:18 ProductUpdate EHUTEU3B: (2025-07-03 07:56:16 +0000 UTC) TEMP_OUTPUT_L1 32
[easee ] TRACE 2025/07/03 09:56:18 ProductUpdate EHUTEU3B: (2025-07-03 07:56:16 +0000 UTC) TEMP_OUTPUT_L3 32
[easee ] TRACE 2025/07/03 09:56:18 ProductUpdate EHUTEU3B: (2025-07-03 07:56:16 +0000 UTC) TEMP_OUTPUT_L2 31
[easee ] TRACE 2025/07/03 09:56:18 ProductUpdate EHUTEU3B: (2025-07-03 07:56:16 +0000 UTC) TEMP_OUTPUT_N 33
[httpd ] TRACE 2025/07/03 09:56:18 GET /api/state
[easee ] TRACE 2025/07/03 09:56:18 ProductUpdate EHUTEU3B: (2025-07-03 07:56:16 +0000 UTC) IN_CURRENT_T3 6.052999973297119
[easee ] TRACE 2025/07/03 09:56:18 ProductUpdate EHUTEU3B: (2025-07-03 07:56:16 +0000 UTC) IN_CURRENT_T2 6.052999973297119
[easee ] TRACE 2025/07/03 09:56:19 ProductUpdate EHUTEU3B: (2025-07-03 07:56:16 +0000 UTC) CIRCUIT_TOTAL_PHASE_CONDUCTOR_CURRENT_L1 6.052999973297119
[easee ] TRACE 2025/07/03 09:56:21 ProductUpdate EHUTEU3B: (2025-07-03 07:56:19 +0000 UTC) TOTAL_POWER 1.4140000343322754
[site  ] DEBUG 2025/07/03 09:56:22 ----@GrimmiMeloni: > It looks like it's trigger by:
> 
> > [easee ] TRACE 2025/07/03 09:56:06 POST https://api.easee.com/api/chargers/EHUTEU3B/commands/resume_charging

No it's not.

Repeating myself: A full**_(no filtering, no excerpts!)_** evcc.log, from the very start (or as long as you can get).@Xaelian: Log attached. 

At 09:54 I've stopped charging. And also restarted evcc to load the yaml file with trace logging.
At 09:56 I've started charging and the sessionenergy got reset towards the previous session.

[evcc.log](https://github.com/user-attachments/files/21041848/evcc.log)@GrimmiMeloni: Thanks!
I had a look and it confirms your observation that SESSION_ENERGY does not reset.
The log also looks like you unplugged the car, as the charger cycles through PILOT_MODE A->C.
To the best of my knowledge this should lead to Easee also resetting the SESSION_ENERGY, but in your case this does not happen. So the charger continues the previous session, and therefore also sends incorrect data to evcc.

Unless we have any other data, I would close this, as evcc is behaving correctly, following the (incorrect) data the charger is sending.@andig: @Xaelian I'd suggest to open a ticket with Easee- apparently SESSION_ENERGY handling is broken. Would be great to get feedback here when resolved. Thank you!@andig: Big thank you to @GrimmiMeloni @Xaelian: The charger isn’t sending incorrect data.
The session energy gets updated once an hour apparently by default.

That’s the reason why in the UI of the charger the charged energy gets updated correctly: see the screenshots on.
https://github.com/evcc-io/evcc/issues/21362

So the change in behaviour on EVCC is linked with: https://github.com/evcc-io/evcc/pull/20659

@andig: Point is it doesn‘t come timely enough. @grimmimeloni wdyt- could we work around this by reverting? Contact Easee (little hope of anx meaningful response)?@GrimmiMeloni: No, reverting is not possible as Easee has removed the API calls we used until January. We raised the issue with them back then, pointing out exactly this kind of issue will arise, but so far no change was announced to fill this gap. 

Unfortunately I don‘t see anything we can do here. 😩@andig: Asked Easee anyway:

> it seems that since the ProductUpdate API has been removed, users are experiencing issues with the SESSION_ENERGY updates: https://github.com/evcc-io/evcc/issues/22175#issuecomment-3037094328. It seems this is only updated on an hourly basis now, but not when vehicle connection state changes (as it should during disconnect).@GrimmiMeloni: @andig I double checked this morning, and I have to stand corrected.
We can (and should) revert - specifically #20659.
I mixed up the two changes of the Easee API. The one we can't do anything about is the LIFETIME_ENERGY (effectively the charger's meter), which only comes in once an hour and cannot be polled any longer.

The change about SESSION_ENERGY is something we can put back in. Best case it is not needed, but in situations like the one experienced by @Xaelian it would help.

PR: https://github.com/evcc-io/evcc/pull/22212 

Solution patch:
diff --git a/charger/easee.go b/charger/easee.go
index 8814d271..f7c4632d 100644
--- a/charger/easee.go
+++ b/charger/easee.go
@@ -61,12 +61,13 @@ type Easee struct {
 	phaseMode             int
 	currentPower, sessionEnergy, totalEnergy,
 	currentL1, currentL2, currentL3 float64
-	rfid      string
-	lp        loadpoint.API
-	cmdC      chan easee.SignalRCommandResponse
-	obsC      chan easee.Observation
-	obsTime   map[easee.ObservationID]time.Time
-	startDone func()
+	sessionStartEnergy *float64
+	rfid               string
+	lp                 loadpoint.API
+	cmdC               chan easee.SignalRCommandResponse
+	obsC               chan easee.Observation
+	obsTime            map[easee.ObservationID]time.Time
+	startDone          func()
 }
 
 func init() {
@@ -313,9 +314,17 @@ func (c *Easee) ProductUpdate(i json.RawMessage) {
 	case easee.TOTAL_POWER:
 		c.currentPower = 1e3 * value.(float64)
 	case easee.SESSION_ENERGY:
-		c.sessionEnergy = value.(float64)
+		// SESSION_ENERGY must not be set to 0 by Productupdates, they occur erratic
+		// Reset to 0 is done in case CHARGER_OP_MODE
+		if value.(float64) != 0 {
+			c.sessionEnergy = value.(float64)
+		}
 	case easee.LIFETIME_ENERGY:
 		c.totalEnergy = value.(float64)
+		if c.sessionStartEnergy == nil {
+			f := c.totalEnergy
+			c.sessionStartEnergy = &f
+		}
 	case easee.IN_CURRENT_T3:
 		c.currentL1 = value.(float64)
 	case easee.IN_CURRENT_T4:
@@ -335,7 +344,18 @@ func (c *Easee) ProductUpdate(i json.RawMessage) {
 	case easee.DYNAMIC_CHARGER_CURRENT:
 		c.dynamicChargerCurrent = value.(float64)
 	case easee.CHARGER_OP_MODE:
-		c.opMode = value.(int)
+		opMode := value.(int)
+
+		// New charging session pending, reset internal value of SESSION_ENERGY to 0, and its observation timestamp to "now".
+		// This should be done in a proper way by the api, but it's not.
+		// Remember value of LIFETIME_ENERGY as start value of the charging session
+		if c.opMode <= easee.ModeDisconnected && opMode >= easee.ModeAwaitingStart {
+			c.sessionEnergy = 0
+			c.obsTime[easee.SESSION_ENERGY] = time.Now()
+			c.sessionStartEnergy = nil
+		}
+
+		c.opMode = opMode
 
 		// startup completed
 		c.startDone()



Test patch:
diff --git a/charger/easee_test.go b/charger/easee_test.go
index 68e23f39..15dab35f 100644
--- a/charger/easee_test.go
+++ b/charger/easee_test.go
@@ -61,13 +61,30 @@ func TestProductUpdate_IgnoreOutdatedProductUpdate(t *testing.T) {
 	assert.Equal(t, 2, e.opMode)
 }
 
-func TestProductUpdate_InitialStateCheck(t *testing.T) {
-	now := time.Now().UTC().Truncate(0) //truncate removes sub nanos
+func TestProductUpdate_IgnoreZeroSessionEnergy(t *testing.T) {
+	e := newEasee()
+
+	now := time.Now().UTC().Truncate(0)
+	e.ProductUpdate(createPayload(easee.SESSION_ENERGY, now, easee.Double, "20"))
+
+	assert.Equal(t, now, e.obsTime[easee.SESSION_ENERGY])
+	assert.Equal(t, float64(20), e.sessionEnergy)
+
+	t2 := time.Now().UTC().Truncate(0)
+	e.ProductUpdate(createPayload(easee.SESSION_ENERGY, t2, easee.Double, "0.0"))
 
+	//expect observation timestamp updated, value however not
+	assert.Equal(t, t2, e.obsTime[easee.SESSION_ENERGY])
+	assert.Equal(t, float64(20), e.sessionEnergy)
+}
+
+func TestProductUpdate_LifetimeEnergyAndSessionStartEnergy(t *testing.T) {
 	e := newEasee()
 
 	assert.False(t, e.optionalStatePresent())
 
+	now := time.Now().UTC().Truncate(0) //truncate removes sub nanos
+
 	tc := []struct {
 		obsId           easee.ObservationID
 		dataType        easee.DataType