Skip to content

Keba modbus template needs additional code to stop charging, when the charging is stopped by the car #31680

Description

@Postmann-x

Description

I have an Keba P30 x-series with a Keba S10 and use the keba template with a Sponsor token.

I want to charge "offline cars". So the cars are not linked in EVCC and EVCC doesn`t know the SoC of the cars.

So when I am charging the cars, they stop the charging when the defined charging limit in the car is reached. EVCC doesn`t know to handle with this, when the car stops the charging. Charger Status B is shown, but EVCC maintains sending charge commands.

What is now happening:

The Keba wallbox wants to start the charging and emmidiatly the car says no. The Wallbox makes a loud clicking sound every few minutes: ON, OFF, ON, OFF..

Then I contacted the manufactor Keba what to do and Keba said, there is a problem with EVCC and gives me a Workaround.

Here is the log, while the car stops the charging:

lp-1 ] DEBUG 2026/06/18 15:11:06 charge power: 0W
[lp-1 ] DEBUG 2026/06/18 15:11:06 charge currents: [0 0 0]A
[site ] DEBUG 2026/06/18 15:11:06 grid power: -3470W
[site ] DEBUG 2026/06/18 15:11:06 grid powers: [-1450 -1000 -1010]W
[site ] DEBUG 2026/06/18 15:11:06 grid currents: [-6.52 -4.58 -4.84]A
[site ] DEBUG 2026/06/18 15:11:06 pv power: 3720W
[site ] DEBUG 2026/06/18 15:11:06 site power: -3220W
[lp-1 ] DEBUG 2026/06/18 15:11:06 session energy: 12.495kWh
[lp-1 ] DEBUG 2026/06/18 15:11:06 charge total import: 7544.030kWh
[lp-1 ] DEBUG 2026/06/18 15:11:06 charger status: B
[lp-1 ] DEBUG 2026/06/18 15:11:06 charge final energy: 12.495kWh
[lp-1 ] INFO 2026/06/18 15:11:06 stop charging <-
[lp-1 ] DEBUG 2026/06/18 15:11:06 charge total import: 7544.030kWh
[lp-1 ] DEBUG 2026/06/18 15:11:06 !! plan: plan time zero
[lp-1 ] DEBUG 2026/06/18 15:11:06 pv charge current: 14A = 0A + 14A (-3220W @ 1p)
[lp-1 ] DEBUG 2026/06/18 15:11:06 set charge current limit: 14A
[site ] DEBUG 2026/06/18 15:11:36 ----

And here is the answer from Keba:

"The wallbox itself has no setting to 'ignore Modbus commands once the vehicle has finished charging.' This behavior is by design: when an external energy manager takes control (with Modbus TCP active), the wallbox follows the commands. The solution must therefore be implemented on the EVCC side: EVCC should monitor the charger status. If the status switches to 'B' (vehicle connected but not charging), EVCC should stop sending charging commands. Your log clearly shows this sequence: charger status: B → stop charging → but then immediately pv charge current: 14A and set charge current limit: 14A. Check your EVCC configuration: EVCC allows you to configure behavior for status B. Check if you can set a parameter—such as minSoc or an enable/disable threshold—to prevent commands from being sent after the vehicle has stopped charging. Workaround using Modbus register 5004: You could incorporate a script into EVCC that writes a value of 0 to register 5004 when status B is detected and maintains that value until the vehicle requests charging again."

I hope you can include the workaround in the keba template:

Thx.

Steps to Reproduce

  1. start charging vehicle as "offline car"
  2. The car stops itself the charging because of reaching charging limit in the car.
  3. EVCC can`t handle the "stop charging" command an tries to charge
  4. the wallbox is clicking ON, OFF, ON, OFF...

⚠️ RETURN TO EVCC TAB → COPY STEP 2 → PASTE HERE

Version

v0.311.0

System

linux/arm64, CEST +02:00

Metadata

Metadata

Assignees

No one assigned

    Labels

    devicesSpecific device supportstaleOutdated and ready to close

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions