Evcc Binding [5.0.0.0;6.0.0.0)

With openHAB 5.2.0, the official binding works again with the current evcc version.

Thanks a lot to the developer! :slightly_smiling_face:

I tried to add the forecast Things for “grid” and “feeding” prices today. Unfortunately the discovered Things do not have any Channels. Do I have to add them manually?

version: 1
things:
  evcc:forecast:api:grid:
    bridge: evcc:server:api
    label: Forecast Grid
    config:
      subType: grid

No, they should be automatically added when the forecasts has been detected within the API response.

Hm, for “solar” it is working. for the other it does not. How can I find out what is wrong?

My response from evcc API looks very similar to what is added to the bindings test code.

Do you got any messages in the log for this binding?

Only when setting log level to DEBUG or TRACE. But nothing related to the forecast stuff except for the EvccDiscoveryService.

@mGoerentz There is another upcoming breaking change in the evcc API:

Yep already worked on the fix + on top you will get a websocket connection to your server instance. → No more polling from openHAB to evcc, evcc will direclty communicate changes to openHAB :slight_smile:

You can find the PR here: Pull requests · openhab/openhab-addons

I will drop compatibility to openHAB 4.x, since the 5.x is out long enough.

Thanks for the new release.
just installed it from the marketplace. It’s Sept 4th, so should be 1.6, right?
I noticed the following error.

log
2026-09-05 07:00:08.663 [WARN ] [internal.handler.EvccWsBridgeHandler] - Listener evcc:loadpoint:evcc_server:wallbox failed to process EVCC update
java.lang.NullPointerException: Cannot invoke "com.google.gson.JsonArray.get(int)" because the return value of "com.google.gson.JsonObject.getAsJsonArray(String)" is null
	at org.openhab.binding.evcc.internal.handler.EvccLoadpointHandler.initializeThingFromLatestState(EvccLoadpointHandler.java:128)
	at org.openhab.binding.evcc.internal.handler.EvccWsBridgeHandler.onFullState(EvccWsBridgeHandler.java:151)
	at org.openhab.binding.evcc.internal.api.EvccWebSocketClient.handleMessage(EvccWebSocketClient.java:187)
	at org.openhab.binding.evcc.internal.api.EvccWebSocketAdapter.onMessage(EvccWebSocketAdapter.java:55)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at org.eclipse.jetty.websocket.common.events.annotated.CallableMethod.call(CallableMethod.java:70)
	at org.eclipse.jetty.websocket.common.events.annotated.OptionalSessionCallableMethod.call(OptionalSessionCallableMethod.java:68)
	at org.eclipse.jetty.websocket.common.events.JettyAnnotatedEventDriver.onTextMessage(JettyAnnotatedEventDriver.java:301)
	at org.eclipse.jetty.websocket.common.message.SimpleTextMessage.messageComplete(SimpleTextMessage.java:69)
	at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.appendMessage(AbstractEventDriver.java:67)
	at org.eclipse.jetty.websocket.common.events.JettyAnnotatedEventDriver.onTextFrame(JettyAnnotatedEventDriver.java:287)
	at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.incomingFrame(AbstractEventDriver.java:152)
	at org.eclipse.jetty.websocket.common.WebSocketSession.incomingFrame(WebSocketSession.java:326)
	at org.eclipse.jetty.websocket.common.extensions.ExtensionStack.incomingFrame(ExtensionStack.java:202)
	at org.eclipse.jetty.websocket.common.Parser.notifyFrame(Parser.java:225)
	at org.eclipse.jetty.websocket.common.Parser.parseSingleFrame(Parser.java:259)
	at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onFillable(AbstractWebSocketConnection.java:459)
	at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onFillable(AbstractWebSocketConnection.java:440)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
	at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)
	at java.base/java.lang.Thread.run(Thread.java:1583)

I wasn’t able to catch the debug log but I’ll try if that helps.
And is it intended that you cannot set the log level in the UI?

Hey, thanks for the fast response.

You should be able to set the log level via UI.
If it doesn’t work then there’s something else wrong.

Regarding the captured log message I will investigate and create a fix as soon as possible.

Except of the message the binding is working correctly?

so far it looks good.
After rebooting openhab there seems to be a little race condition: The car didn’t come online, only after deactivating and activating it turned green again.
I tried to reproduce but this time it didn’t happen.

Regarding setting the debug level in the UI: I don’t get the binding configuration. It’s just empty. I rechecked other bindings but they work normally.

Hi, I’ve updated the binding (same release version). Please reinstall and check if the race condition still reappears.

@mGoerentz
Hi, the marketplace add-on is still from Sept. 4th and in the GitHub release there is no jar. Could you add it please?

Sorry, binary is uploaded now.

One warning with a Java stacktrace

log
2026-09-08 13:00:00.423 [WARN ] [internal.handler.EvccWsBridgeHandler] - Listener evcc:vehicle:evcc_server:a6-e-tron failed to process EVCC update
java.lang.NullPointerException: Cannot invoke "com.google.gson.JsonObject.getAsJsonObject(String)" because the return value of "com.google.gson.JsonObject.getAsJsonObject(String)" is null
	at org.openhab.binding.evcc.internal.handler.EvccVehicleHandler.initializeThingFromLatestState(EvccVehicleHandler.java:83)
	at org.openhab.binding.evcc.internal.handler.EvccWsBridgeHandler.onFullState(EvccWsBridgeHandler.java:151)
	at org.openhab.binding.evcc.internal.api.EvccWebSocketClient.handleMessage(EvccWebSocketClient.java:187)
	at org.openhab.binding.evcc.internal.api.EvccWebSocketAdapter.onMessage(EvccWebSocketAdapter.java:55)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at org.eclipse.jetty.websocket.common.events.annotated.CallableMethod.call(CallableMethod.java:70)
	at org.eclipse.jetty.websocket.common.events.annotated.OptionalSessionCallableMethod.call(OptionalSessionCallableMethod.java:68)
	at org.eclipse.jetty.websocket.common.events.JettyAnnotatedEventDriver.onTextMessage(JettyAnnotatedEventDriver.java:301)
	at org.eclipse.jetty.websocket.common.message.SimpleTextMessage.messageComplete(SimpleTextMessage.java:69)
	at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.appendMessage(AbstractEventDriver.java:67)
	at org.eclipse.jetty.websocket.common.events.JettyAnnotatedEventDriver.onTextFrame(JettyAnnotatedEventDriver.java:287)
	at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.incomingFrame(AbstractEventDriver.java:152)
	at org.eclipse.jetty.websocket.common.WebSocketSession.incomingFrame(WebSocketSession.java:326)
	at org.eclipse.jetty.websocket.common.extensions.ExtensionStack.incomingFrame(ExtensionStack.java:202)
	at org.eclipse.jetty.websocket.common.Parser.notifyFrame(Parser.java:225)
	at org.eclipse.jetty.websocket.common.Parser.parseSingleFrame(Parser.java:259)
	at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onFillable(AbstractWebSocketConnection.java:459)
	at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onFillable(AbstractWebSocketConnection.java:440)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
	at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)
	at java.base/java.lang.Thread.run(Thread.java:1583)

Anything else I should provide?

Hmmm this should not happen anymore. I need to dig deeper.

let me check first one more time that I didn’t mix logs.

Here the correct latest log:

log
2026-09-08 22:09:34.901 [WARN ] [internal.handler.EvccWsBridgeHandler] - Listener evcc:loadpoint:evcc_server:wallbox failed to process EVCC update
java.lang.NullPointerException: Cannot invoke "com.google.gson.JsonArray.get(int)" because the return value of "com.google.gson.JsonObject.getAsJsonArray(String)" is null
	at org.openhab.binding.evcc.internal.handler.EvccLoadpointHandler.initializeThingFromLatestState(EvccLoadpointHandler.java:128)
	at org.openhab.binding.evcc.internal.handler.EvccWsBridgeHandler.onFullState(EvccWsBridgeHandler.java:151)
	at org.openhab.binding.evcc.internal.api.EvccWebSocketClient.handleMessage(EvccWebSocketClient.java:187)
	at org.openhab.binding.evcc.internal.api.EvccWebSocketAdapter.onMessage(EvccWebSocketAdapter.java:55)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at org.eclipse.jetty.websocket.common.events.annotated.CallableMethod.call(CallableMethod.java:70)
	at org.eclipse.jetty.websocket.common.events.annotated.OptionalSessionCallableMethod.call(OptionalSessionCallableMethod.java:68)
	at org.eclipse.jetty.websocket.common.events.JettyAnnotatedEventDriver.onTextMessage(JettyAnnotatedEventDriver.java:301)
	at org.eclipse.jetty.websocket.common.message.SimpleTextMessage.messageComplete(SimpleTextMessage.java:69)
	at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.appendMessage(AbstractEventDriver.java:67)
	at org.eclipse.jetty.websocket.common.events.JettyAnnotatedEventDriver.onTextFrame(JettyAnnotatedEventDriver.java:287)
	at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.incomingFrame(AbstractEventDriver.java:152)
	at org.eclipse.jetty.websocket.common.WebSocketSession.incomingFrame(WebSocketSession.java:326)
	at org.eclipse.jetty.websocket.common.extensions.ExtensionStack.incomingFrame(ExtensionStack.java:202)
	at org.eclipse.jetty.websocket.common.Parser.notifyFrame(Parser.java:225)
	at org.eclipse.jetty.websocket.common.Parser.parseSingleFrame(Parser.java:259)
	at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onFillable(AbstractWebSocketConnection.java:459)
	at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onFillable(AbstractWebSocketConnection.java:440)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
	at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)
	at java.base/java.lang.Thread.run(Thread.java:1583)
2026-09-08 22:09:35.588 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception: 
java.lang.NullPointerException: Cannot invoke "com.google.gson.JsonObject.getAsJsonObject(String)" because the return value of "com.google.gson.JsonObject.getAsJsonObject(String)" is null
	at org.openhab.binding.evcc.internal.handler.EvccVehicleHandler.initializeThingFromLatestState(EvccVehicleHandler.java:83)
	at org.openhab.binding.evcc.internal.handler.EvccWsBridgeHandler.register(EvccWsBridgeHandler.java:169)
	at org.openhab.binding.evcc.internal.handler.EvccWsBridgeHandler.lambda$5(EvccWsBridgeHandler.java:175)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1583)
2026-09-08 22:09:35.589 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception: 
java.lang.NullPointerException: Cannot invoke "com.google.gson.JsonObject.getAsJsonObject(String)" because the return value of "com.google.gson.JsonObject.getAsJsonObject(String)" is null
	at org.openhab.binding.evcc.internal.handler.EvccVehicleHandler.initializeThingFromLatestState(EvccVehicleHandler.java:83)
	at org.openhab.binding.evcc.internal.handler.EvccWsBridgeHandler.register(EvccWsBridgeHandler.java:169)
	at org.openhab.binding.evcc.internal.handler.EvccWsBridgeHandler.lambda$5(EvccWsBridgeHandler.java:175)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1583)

I think, its fixed now.
Please reinstall and try again to trigger the issue.

The log error is gone :confetti_ball:
But the race condition is still happening and it’s mostly/always the cars that apparently try to get connected too soon.
Do you need a trace-log?