Evcc Binding [4.0.0;5.0.0)

So do I understand it correctly that it works with “old” 0.205.0 AND latest evcc that has the API changes?

Yes

1 Like

Hi,I have tried the update (deleted things, removed binding, reinstall and rediscover things). Same issue unfortunately, the Site Thing comes back with a JSON Null error. Is there anything I may do wrong ? Or is this because of the wrong Java version with OK 4.3.x ?

Do you have access to the console?
If so, please type these commands:
bundle:list
→ prints a list of all bundles, note the ID of the evcc Binding
bundle:update [id]
→ without square brackets

And try again.

Good call, the bundle ID is

323 │ Active │ 80 │ 4.3.7.202508131249 │ openHAB Add-ons :: Bundles :: evcc Binding

bundle:update 323
Error executing command: Error reading bundle content.

so there is something odd, isn’t it ?

I noticed that when entering the console, I get:

SLF4J(W): No SLF4J providers were found.
SLF4J(W): Defaulting to no-operation (NOP) logger implementation
SLF4J(W): See SLF4J Error Codes for further details.
SLF4J(W): Class path contains SLF4J bindings targeting slf4j-api versions 1.7.x or earlier.
SLF4J(W): Ignoring binding found at [jar:file:/usr/share/openhab/runtime/system/org/apache/karaf/org.apache.karaf.client/4.4.6/org.apache.karaf.client-4.4.6.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J(W): See SLF4J Error Codes for an explanation.

and later

Failed to load native library:jansi-2.4.1-b5f039bf53bc515a-libjansi.so. osinfo: Linux/arm
java.lang.UnsatisfiedLinkError: /var/lib/openhab/tmp/jansi-2.4.1-b5f039bf53bc515a-libjansi.so: /var/lib/openhab/tmp/jansi-2.4.1-b5f039bf53bc515a-libjansi.so: cannot open shared object file: No such file or directory

So there is definitely something wrong with my installation, isn’t it. Need to investigate. Any of this relate to the ECVV binding ?

ok, the first is a wrong dependency in karaf.client. ChatGPT tells me this error is harmless (no output on the console). [https://github.com/openhab/openhab-core/issues/4283\]

Checking the other one.

I think the problems with my jansi lib is not the reason too. I cleaned even the …/tmp/… area to get a fresh start, but the problem persists. There is a bit of news though:

If EVCC is not started yet correctly (my token was expired), then the Site Thing works, I do see channels, etc. It stops working if one creates the Site Thing with a running EVCC. Does this ring any bell ?

Does the parsing of the EVCC info go wrong ?how do I generate the info from my EVCC so we see where it goes wrong ?

Very interesting :thinking:
Maybe there is a difference in the response of evcc…
Can you run the following command for both conditions:
curl http://hostname:port/api/state

If nothing abnormal occurs, I will create a special version for you to narrow down the issue.

This is what I get with EVCC working correctly:

curl http://192.168.124.9:7070/api/state

{“aux”:[ ],“availableVersion”:“0.207.2”,“battery”:\[{“power”:494,“energy”:0.2,“capacity”:0,“soc”:74,“controllable”:false}\],“batteryCapacity”:1,“batteryDischargeControl”:false,“batteryEnergy”:0.2,“batteryGridChargeActive”:false,“batteryMode”:“unknown”,“batteryPower”:494,“batterySoc”:74,“bufferSoc”:0,“bufferStartSoc”:0,“currency”:“EUR”,“eebus”:false,“ext”:[ ],“forecast”:{},“greenShareHome”:1,“greenShareLoadpoints”:1,“grid”:{“power”:-2,“energy”:1695.7,“currents”:\[0.8,0.30000000000000004,0.7000000000000001\]},“gridConfigured”:true,“hems”:{},“homePower”:492,“influx”:{“url”:“”,“database”:“”,“token”:“”,“org”:“”,“user”:“”,“password”:“”,“insecure”:false},“interval”:30,“loadpoints”:\[{“batteryBoost”:false,“chargeCurrents”:\[0,0,0\],“chargeDuration”:0,“chargePower”:0,“chargeTotalImport”:0.155,“chargedEnergy”:0,“chargerFeatureHeating”:false,“chargerFeatureIntegratedDevice”:false,“chargerIcon”:“”,“chargerPhases1p3p”:true,“chargerSinglePhase”:false,“chargerStatusReason”:“unknown”,“charging”:false,“connected”:false,“connectedDuration”:2147483647,“disableDelay”:180,“disableThreshold”:0,“effectiveLimitSoc”:100,“effectiveMaxCurrent”:25,“effectiveMinCurrent”:6,“effectivePlanId”:0,“effectivePlanSoc”:0,“effectivePlanTime”:null,“effectivePriority”:0,“enableDelay”:60,“enableThreshold”:0,“enabled”:false,“limitEnergy”:0,“limitSoc”:0,“maxCurrent”:25,“minCurrent”:6,“mode”:“minpv”,“offeredCurrent”:0,“phaseAction”:“inactive”,“phaseRemaining”:0,“phasesActive”:3,“phasesConfigured”:0,“planActive”:false,“planEnergy”:0,“planOverrun”:0,“planPrecondition”:0,“planProjectedEnd”:null,“planProjectedStart”:null,“planTime”:null,“priority”:0,“pvAction”:“inactive”,“pvRemaining”:0,“sessionCo2PerKWh”:null,“sessionEnergy”:0,“sessionPrice”:null,“sessionPricePerKWh”:null,“sessionSolarPercentage”:0,“smartCostActive”:false,“smartCostLimit”:null,“smartCostNextStart”:null,“smartFeedInPriorityActive”:false,“smartFeedInPriorityLimit”:null,“smartFeedInPriorityNextStart”:null,“title”:“KEBA-at-Home”,“vehicleClimaterActive”:null,“vehicleDetectionActive”:false,“vehicleLimitSoc”:0,“vehicleName”:“”,“vehicleOdometer”:0,“vehicleRange”:0,“vehicleSoc”:0,“vehicleTitle”:“”,“vehicleWelcomeActive”:false}\],“messaging”:false,“modbusproxy”:null,“mqtt”:{“broker”:“”,“user”:“”,“password”:“”,“clientID”:“”,“insecure”:false,“caCert”:“”,“clientCert”:“”,“clientKey”:“”,“topic”:“evcc”},“network”:{“schema”:“http”,“host”:“evcc.local”,“port”:7070},“prioritySoc”:50,“pv”:\[{“power”:0,“energy”:4411.2300000000005}\],“pvEnergy”:4411.23,“pvPower”:0,“residualPower”:0,“siteTitle”:“EVCC-at-Home”,“smartCostAvailable”:false,“smartCostType”:null,“smartFeedInPriorityAvailable”:false,“sponsor”:{“name”:“trial”,“expiresAt”:“2025-08-20T10:00:00Z”,“expiresSoon”:true},“startup”:true,“statistics”:{“30d”:{“avgCo2”:0,“avgPrice”:0,“chargedKWh”:0,“solarPercentage”:0},“365d”:{“avgCo2”:0,“avgPrice”:0,“chargedKWh”:0,“solarPercentage”:0},“thisYear”:{“avgCo2”:0,“avgPrice”:0,“chargedKWh”:0,“solarPercentage”:0},“total”:{“avgCo2”:0,“avgPrice”:0,“chargedKWh”:0,“solarPercentage”:0}},“telemetry”:false,“vehicles”:{},“version”:“0.207.1”}

This is what happens if EVCC is not running (token taken out):

curl http://192.168.124.9:7070/api/state

{“availableVersion”:“0.207.2”,“eebus”:false,“fatal”:[{“class”:“charger”,“device”:“wallbox4”,“error”:“[wallbox4] cannot create charger ‘wallbox4’: cannot create charger type ‘template’: cannot create charger type ‘keba-modbus’: sponsorship required, see https://docs.evcc.io/docs/sponsorship"},{“class”:“loadpoint”,“device”:“lp-1”,“error”:"\[lp-1\] charger: not found: wallbox4”}],“hems”:{},“influx”:{“url”:“”,“database”:“”,“token”:“”,“org”:“”,“user”:“”,“password”:“”,“insecure”:false},“interval”:30,“loadpoints”:,“messaging”:false,“modbusproxy”:null,“mqtt”:{“broker”:“”,“user”:“”,“password”:“”,“clientID”:“”,“insecure”:false,“caCert”:“”,“clientCert”:“”,“clientKey”:“”,“topic”:“evcc”},“network”:{“schema”:“http”,“host”:“evcc.local”,“port”:7070},“sponsor”:{“name”:“”,“expiresAt”:“0001-01-01T00:00:00Z”},“startup”:true,“telemetry”:false,“version”:“0.207.1”}
1 Like

Sweet I think I’ve found the root cause.
Fix will follow as soon as possible

Nevermind…
I will add debug messages and create a new jar for you.

Please use code fences for readability of your posts.

Thanks to this I’ve found the issue. PR will follow soon, in the meantime you can use the jar uploaded here: evcc jar

Hi, just got around testing this now. Unfortunately neither the jar nor the updated binding in the store works for me:

2025-08-15 20:53:06.719 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.initialize()' on 'org.openhab.binding.evcc.internal.handler.EvccSiteHandler@19bad7b': JsonNull
java.lang.UnsupportedOperationException: JsonNull
	at com.google.gson.JsonElement.getAsString(JsonElement.java:187) ~[bundleFile:?]
	at org.openhab.binding.evcc.internal.handler.EvccSiteHandler.lambda$0(EvccSiteHandler.java:87) ~[?:?]
	at java.util.Optional.ifPresent(Optional.java:178) ~[?:?]
	at org.openhab.binding.evcc.internal.handler.EvccSiteHandler.initialize(EvccSiteHandler.java:77) ~[?:?]
	at jdk.internal.reflect.GeneratedMethodAccessor106.invoke(Unknown Source) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:569) ~[?:?]
	at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:147) [bundleFile:?]
	at org.openhab.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
	at java.lang.Thread.run(Thread.java:840) [?:?]
2025-08-15 20:53:06.726 [ERROR] [core.thing.internal.ThingManagerImpl] - Exception occurred while initializing handler of thing 'evcc:site:b40e2a6891:site': JsonNull
java.lang.UnsupportedOperationException: JsonNull
	at com.google.gson.JsonElement.getAsString(JsonElement.java:187) ~[bundleFile:?]
	at org.openhab.binding.evcc.internal.handler.EvccSiteHandler.lambda$0(EvccSiteHandler.java:87) ~[?:?]
	at java.util.Optional.ifPresent(Optional.java:178) ~[?:?]
	at org.openhab.binding.evcc.internal.handler.EvccSiteHandler.initialize(EvccSiteHandler.java:77) ~[?:?]
	at jdk.internal.reflect.GeneratedMethodAccessor106.invoke(Unknown Source) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:569) ~[?:?]
	at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:147) [bundleFile:?]
	at org.openhab.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
	at java.lang.Thread.run(Thread.java:840) [?:?]your code goes here

Hmmm, I used your api response to verify that the bug has been fixed. Is the bundle:list command showing today’s date for the binding?

Yes, here it is

327 │ Active │  80 │ 4.3.7.202508151005    │ openHAB Add-ons :: Bundles :: evcc Binding

Up-to-date state via curl:

{"aux":[],"availableVersion":"0.207.3","battery":[{"power":637,"energy":19.22,"capacity":0,"soc":39,"controllable":false}],"batteryCapacity":1,"batteryDischargeControl":false,"batteryEnergy":19.22,"batteryGridChargeActive":false,"batteryMode":"unknown","batteryPower":637,"batterySoc":39,"bufferSoc":0,"bufferStartSoc":0,"currency":"EUR","eebus":false,"ext":[],"forecast":{},"greenShareHome":0.973,"greenShareLoadpoints":0,"grid":{"power":18,"energy":1702.25,"currents":[0.9,0.4,1]},"gridConfigured":true,"hems":{},"homePower":655,"influx":{"url":"","database":"","token":"","org":"","user":"","password":"","insecure":false},"interval":30,"loadpoints":[{"batteryBoost":false,"chargeCurrents":[0,0,0],"chargeDuration":0,"chargePower":0,"chargeTotalImport":0.155,"chargedEnergy":0,"chargerFeatureHeating":false,"chargerFeatureIntegratedDevice":false,"chargerIcon":"","chargerPhases1p3p":true,"chargerSinglePhase":false,"chargerStatusReason":"unknown","charging":false,"connected":false,"connectedDuration":2147483647,"disableDelay":180,"disableThreshold":0,"effectiveLimitSoc":100,"effectiveMaxCurrent":25,"effectiveMinCurrent":6,"effectivePlanId":0,"effectivePlanSoc":0,"effectivePlanTime":null,"effectivePriority":0,"enableDelay":60,"enableThreshold":0,"enabled":false,"limitEnergy":0,"limitSoc":0,"maxCurrent":25,"minCurrent":6,"mode":"minpv","offeredCurrent":0,"phaseAction":"inactive","phaseRemaining":0,"phasesActive":3,"phasesConfigured":0,"planActive":false,"planEnergy":0,"planOverrun":0,"planPrecondition":0,"planProjectedEnd":null,"planProjectedStart":null,"planTime":null,"priority":0,"pvAction":"inactive","pvRemaining":0,"sessionCo2PerKWh":null,"sessionEnergy":0,"sessionPrice":null,"sessionPricePerKWh":null,"sessionSolarPercentage":0,"smartCostActive":false,"smartCostLimit":null,"smartCostNextStart":null,"smartFeedInPriorityActive":false,"smartFeedInPriorityLimit":null,"smartFeedInPriorityNextStart":null,"title":"KEBA-at-Home","vehicleClimaterActive":null,"vehicleDetectionActive":false,"vehicleLimitSoc":0,"vehicleName":"","vehicleOdometer":0,"vehicleRange":0,"vehicleSoc":0,"vehicleTitle":"","vehicleWelcomeActive":false}],"messaging":false,"modbusproxy":null,"mqtt":{"broker":"","user":"","password":"","clientID":"","insecure":false,"caCert":"","clientCert":"","clientKey":"","topic":"evcc"},"network":{"schema":"http","host":"evcc.local","port":7070},"prioritySoc":50,"pv":[{"power":0,"energy":4451.4400000000005}],"pvEnergy":4451.44,"pvPower":0,"residualPower":0,"siteTitle":"EVCC-at-Home","smartCostAvailable":false,"smartCostType":null,"smartFeedInPriorityAvailable":false,"sponsor":{"name":"trial","expiresAt":"2025-08-20T10:00:00Z","expiresSoon":true},"startup":true,"statistics":{"30d":{"avgCo2":0,"avgPrice":0,"chargedKWh":0,"solarPercentage":0},"365d":{"avgCo2":0,"avgPrice":0,"chargedKWh":0,"solarPercentage":0},"thisYear":{"avgCo2":0,"avgPrice":0,"chargedKWh":0,"solarPercentage":0},"total":{"avgCo2":0,"avgPrice":0,"chargedKWh":0,"solarPercentage":0}},"telemetry":false,"vehicles":{},"version":"0.207.1"}

Sorry, I used the given response and everything is working as expected.
I get the expected values and all things have been initialized correctly.

I’m pretty sure that the binding has not been refreshed.
Can you restart your openHAB instance and try again?

Or try bundle:refresh 327 first.

I tried, unfortunately without success:

  • remove things, uninstall EVCC binding, restart openhab, install EVCC binding, create things → Error
  • remove things, uninstall EVCC binding, stop openhab, remove /var/lib/openhab/tmp/kar/openhab-addons-4.3.6/org/openhab/addons/bundles/org.openhab.binding.evcc/4.3.6/org.openhab.binding.evcc-4.3.6.jar , start openhab, install binding, create things → error
  • remove things, in consolde bundle:refresh 329 (!!!) → the EVCC binding didn’t give me the server, restart openhab, reinstall EVCC, create server and site → error

I think the error somehow is still there, maybe at a different place with my combination of PV+charger+… ?

Well the API response should not be different. And the Json Null Error that is displayed in the log points towards the code where I did the Bugfix.
I will recreate the jar file for the 4.3.x version and reupload it. I will ping you when I’m done.
Thank you for your patience!

I’ve updated the jar file.
Please try again.

Hi, the one in the market place says August 15, 2025 12:17 PM ?

==> Ha, works !!! Super, thank you very much, playing with the additional information right now.