evcc icon indicating copy to clipboard operation
evcc copied to clipboard

Charge session not showing complete energy usage

Open FrankvdAa opened this issue 2 weeks ago • 4 comments

Describe the bug

I've been testing with a Peblar Home charger and started a very short session at 17.37h with authentication disabled.

I then enabled RFID authentication on the charger and started a session at 17.45h that finished at 20.10h, but around 18.56h I temporarily stopped the charging until 18.58h by scanning the RFID tag on the charger.

I kept the charger connected to the car and now the session only shows the energy consumed between 17.45h and 18.56h.

However, the exported CSV file does show that the meter stopped at 7.7kWh, but somehow the session doesn't show the full 7.4kWh but only 4kWh.

I've added the debug logs and CSV export.

session-2025-12.csv charge.log

Steps to reproduce

  1. Connect charger cable to car
  2. Start charging session by scanning RFID tag
  3. After some time, scan RFID tag to stop charging, but keep cable connected
  4. Resume charging by scanning RFID tag
  5. Eventually finish charging by scanning RFID tag and disconnect cable

Configuration details

# open evcc at http://evcc.local:7070
network:
  schema: https
  host: localhost # .local suffix announces the hostname on MDNS
  port: 7070

log: debug
levels:
  cache: error

# unique installation id
plant: ...

interval: 30s # control cycle interval

meters:
  - type: template
    template: dsmr
    usage: grid
    host: x.x.x.x
    port: 6000
    name: grid1
  - name: envoy_grid
    type: custom
    power:
      source: mqtt
      topic: enphase/envoy/stream
      jq: ( [ ."net-consumption"[].p | tonumber ] | add )
      timeout: 10s
    currents:
    - source: mqtt
      topic: enphase/envoy/stream
      jq: if ((."net-consumption"["ph-a"] | length ) > 1 ) then ."net-consumption"["ph-a"].i else 0 end
      timeout: 10s
    - source: mqtt
      topic: enphase/envoy/stream
      jq: if ((."net-consumption"["ph-b"] | length ) > 1 ) then ."net-consumption"["ph-b"].i else 0 end
      timeout: 10s
    - source: mqtt
      topic: enphase/envoy/stream
      jq: if ((."net-consumption"["ph-c"] | length ) > 1 ) then ."net-consumption"["ph-c"].i else 0 end
      timeout: 10s
  - name: envoy_pv
    type: custom
    power:
      source: mqtt
      topic: enphase/envoy/stream
      jq: ( [ ."production"[].p | tonumber ] | add )
      timeout: 10s
    currents:
    - source: mqtt
      topic: enphase/envoy/stream
      jq: if ((."production"["ph-a"] | length ) > 1 ) then ."production"["ph-a"].i else 0 end
      timeout: 10s
    - source: mqtt
      topic: enphase/envoy/stream
      jq: if ((."production"["ph-b"] | length ) > 1 ) then ."production"["ph-b"].i else 0 end
      timeout: 10s
    - source: mqtt
      topic: enphase/envoy/stream
      jq: if ((."production"["ph-c"] | length ) > 1 ) then ."production"["ph-c"].i else 0 end
      timeout: 10s

site:
  title: Site name
  meters:
    grid: grid1
    pv: envoy_pv

tariffs:
  currency: EUR # (default EUR)
  grid: # grid consumption price
    type: fixed
    price: 0.246 # EUR/kWh
    zones:
      - days: Mon-Fri
        hours: 7-21
        price: 0.244
  feedin: # feed-in revenue
    type: fixed
    price: 0.115 # EUR/kWh (positive values = income)
  solar:
    - type: template
      template: forecast-solar # open-meteo
      lat: xx.xx        # Latitude
      lon: xx.xx        # Longitude
      dec: 15           # Decline, 0 = horizontal, 90 = vertical
      kwp: 0.915        # Maximum generator power (kWp)
      az: 65            # Azimuth, -180 = north, -90 = east, 0 = south, 90 = west, 180 = north
    - type: template
      template: forecast-solar # open-meteo
      lat: xx.xx        # Latitude
      lon: xx.xx        # Longitude
      dec: 45           # Decline, 0 = horizontal, 90 = vertical
      kwp: 3.955        # Maximum generator power (kWp)
      az: 155           # Azimuth, -180 = north, -90 = east, 0 = south, 90 = west, 180 = north
    - type: template
      template: forecast-solar # open-meteo
      lat: xx.xx        # Latitude
      lon: xx.xx        # Longitude
      dec: 15           # Decline, 0 = horizontal, 90 = vertical
      kwp: 0.915        # Maximum generator power (kWp)
      az: 245           # Azimuth, -180 = north, -90 = east, 0 = south, 90 = west, 180 = north

circuits:
  - name: main
    title: "Main circuit"
    maxCurrent: 25
    meter: grid1

loadpoints:
  - title: Driveway
    charger: peblar_charger
    mode: now
    circuit: main

mqtt:
  broker: x.x.x.x:1883
  topic: evcc
  user: xxxx
  password: xxxx


chargers:
  - name: peblar_charger
    type: template
    template: peblar

    # Modbus TCP
    modbus: tcpip
    id: 1
    host: x.x.x.x # Hostname
    port: 502 # Port

# trial token, valid until 2025-12-11
sponsortoken: ...

Log details

See attached file

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

Linux

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

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

Version

evcc version 0.211.0

FrankvdAa avatar Dec 10 '25 20:12 FrankvdAa

Please check the log. Do the energy readings match?

andig avatar Dec 11 '25 08:12 andig

Grabbed from the logs:

Dec 09 18:55:42 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 18:55:42 charge total import: 4.233kWh
Dec 09 18:55:42 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 18:55:42 charger status: C
Dec 09 18:56:12 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 18:56:12 charge total import: 4.262kWh
Dec 09 18:56:12 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 18:56:12 charger status: C
Dec 09 18:56:12 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 18:56:12 charge total import: 4.262kWh
Dec 09 18:56:12 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 18:56:12 charger status: C
Dec 09 18:57:12 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 18:57:12 charge total import: 4.271kWh
Dec 09 18:57:12 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 18:57:12 charger status: B
Dec 09 18:57:42 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 18:57:42 charge total import: 4.271kWh
Dec 09 18:57:42 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 18:57:42 charger status: B
Dec 09 18:58:12 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 18:58:12 charge total import: 4.272kWh
Dec 09 18:58:12 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 18:58:12 charger status: C
Dec 09 18:58:42 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 18:58:42 charge total import: 4.299kWh
Dec 09 18:58:42 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 18:58:42 charger status: C
Dec 09 18:59:12 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 18:59:12 charge total import: 4.328kWh
Dec 09 18:59:12 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 18:59:12 charger status: C

Not sure if charge total import relates to the session or globally, but as you can see it increases again after the charger status changes from B to C again.

FrankvdAa avatar Dec 11 '25 10:12 FrankvdAa

charge total import is the total value of the charge meter. Check the logs for session energy and/or charged energy

VolkerK62 avatar Dec 11 '25 18:12 VolkerK62

Okay, I've checked for session energy and that only shows until I stop the session by scanning the RFID and charger status goes from C to B.

When I then scan the RFID again and the charger status goes from B to C, it never shows session energy anymore.

Dec 09 17:45:12 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 17:45:12 charger status: B
Dec 09 17:45:42 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 17:45:42 session energy: 0.020kWh
Dec 09 17:45:42 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 17:45:42 charger status: C
Dec 09 17:46:12 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 17:46:12 session energy: 0.049kWh
Dec 09 17:46:12 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 17:46:12 charger status: C
Dec 09 17:46:42 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 17:46:42 session energy: 0.077kWh
Dec 09 17:46:42 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 17:46:42 charger status: C
Dec 09 17:47:12 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 17:47:12 session energy: 0.106kWh
Dec 09 17:47:12 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 17:47:12 charger status: C
Dec 09 17:47:42 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 17:47:42 session energy: 0.134kWh
...
Dec 09 18:50:42 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 18:50:42 charger status: C
Dec 09 18:51:12 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 18:51:12 session energy: 3.719kWh
Dec 09 18:51:12 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 18:51:12 charger status: C
Dec 09 18:51:42 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 18:51:42 session energy: 3.747kWh
Dec 09 18:51:42 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 18:51:42 charger status: C
Dec 09 18:52:12 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 18:52:12 session energy: 3.776kWh
Dec 09 18:52:12 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 18:52:12 charger status: C
Dec 09 18:52:42 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 18:52:42 session energy: 3.804kWh
Dec 09 18:52:42 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 18:52:42 charger status: C
Dec 09 18:53:12 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 18:53:12 session energy: 3.833kWh
Dec 09 18:53:12 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 18:53:12 charger status: C
Dec 09 18:53:42 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 18:53:42 session energy: 3.862kWh
Dec 09 18:53:42 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 18:53:42 charger status: C
Dec 09 18:54:12 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 18:54:12 session energy: 3.890kWh
Dec 09 18:54:12 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 18:54:12 charger status: C
Dec 09 18:54:42 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 18:54:42 session energy: 3.917kWh
Dec 09 18:54:42 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 18:54:42 charger status: C
Dec 09 18:55:12 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 18:55:12 session energy: 3.947kWh
Dec 09 18:55:12 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 18:55:12 charger status: C
Dec 09 18:55:42 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 18:55:42 session energy: 3.974kWh
Dec 09 18:55:42 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 18:55:42 charger status: C
Dec 09 18:56:12 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 18:56:12 session energy: 4.004kWh
Dec 09 18:56:12 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 18:56:12 charger status: C
Dec 09 18:56:42 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 18:56:42 session energy: 4.012kWh
Dec 09 18:56:42 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 18:56:42 charger status: B
Dec 09 18:57:12 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 18:57:12 charger status: B
Dec 09 18:57:42 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 18:57:42 charger status: B
Dec 09 18:58:12 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 18:58:12 charger status: C
Dec 09 18:58:42 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 18:58:42 charger status: C
Dec 09 18:59:12 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 18:59:12 charger status: C
Dec 09 18:59:42 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 18:59:42 charger status: C
Dec 09 19:00:12 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 19:00:12 charger status: C
Dec 09 19:00:42 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 19:00:42 charger status: C
Dec 09 19:01:12 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 19:01:12 charger status: C
Dec 09 19:01:42 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 19:01:42 charger status: C
Dec 09 19:02:12 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 19:02:12 charger status: C
Dec 09 19:02:42 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 19:02:42 charger status: C
...
Dec 09 20:09:11 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 20:09:11 charger status: C
Dec 09 20:09:12 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 20:09:12 charger status: C
Dec 09 20:09:13 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 20:09:13 charger status: C
Dec 09 20:09:31 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 20:09:31 charger status: C
Dec 09 20:09:37 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 20:09:37 charger status: C
Dec 09 20:09:42 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 20:09:42 charger status: C
Dec 09 20:10:12 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 20:10:12 charger status: C
Dec 09 20:10:42 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 20:10:42 charger status: B
Dec 09 20:11:12 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 20:11:12 charger status: A
Dec 09 20:11:12 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 20:11:12 set session energy limit: 0
Dec 09 20:11:13 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 20:11:13 charger status: A
Dec 09 20:11:42 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 20:11:42 charger status: A
Dec 09 20:12:12 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 20:12:12 charger status: A
Dec 09 20:12:42 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 20:12:42 charger status: A
Dec 09 20:13:12 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 20:13:12 charger status: A
Dec 09 20:13:42 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 20:13:42 charger status: A
Dec 09 20:14:12 evcc evcc[310]: [lp-1  ] DEBUG 2025/12/09 20:14:12 charger status: A

The 4.012 kWh is also what I see for the session in the .csv export.

It doesn't show charged energy anywhere.

You should be able to see this from the charge.log and session-2025-12.csv that I attached in my original message.

FrankvdAa avatar Dec 11 '25 18:12 FrankvdAa

Performed a new test today and behaviour seems to be the same; once the charging is interrupted by scanning the RFID tag, but not disconnecting the cable, stops the session; this is to be expected. But, when I then resume the session by again scanning the RFID tag, charging resumes, time of the active session in EVCC increases, but not the 'charged' amount. I can see EVCC already saved a session that shows the data up to the point where I paused the charging.

I'm currently waiting for the session to finish and then I'll gather the logs and attach it here.

FrankvdAa avatar Dec 20 '25 13:12 FrankvdAa

Session details:

  • Connected cable at 12.26h and started charging by scanning RFID tag
  • Paused charging by scanning RFID tag at 14.06h
  • Resumed charging by scanning RFID tag at 14.09h
  • Finished charging at 14.58h

Observations:

  • Session energy increased to 5.715kWh, until charging was paused at 14.06h
  • When looking at charging sessions while paused, I could see the session showing 5.7kWh charged, with meter values of 20.1kWh (start) and 25.8kWh (end)
Image
  • When looking at charging sessions after resuming charging, I kept seeing the session from 12.26h with 5.7kWh and end timestamp of 14.06h, with meter values of 20.1kWh (start) and 25.8kWh (end)
  • When looking at the loadpoint status in EVCC, charging time kept increasing as if it the initial session was still running/continouing
Image
  • When looking at charging sessions when charging finished, the session from 12.26h was (and still is) showing 5.7kWh, but now with meter values of 20.1kWh (start) and 28.0kWh (end) and end time of 14.58h
Image

The way it works now, is not what is to be expected, because the total session was 7.9kWh, but it only shows the 5.7kWh that were consumed until the pause, but the meter values are correct.

In my opinion, there are two options to fix this:

  1. Finish the session when pausing charging (charger status going from C to B) and start a new session when charging is resumed (charger status going from B to C)
  2. Continue session even when charger status goes from C to B, as long as it doesn't go to A

I think option 1 would be the best and most logical to have.

I've attached a debug log of the entire session: evcc.log

FrankvdAa avatar Dec 20 '25 16:12 FrankvdAa