Evcc Binding [4.0.0.0;6.0.0.0)

Good to hear :slight_smile:

Hi everybody,

yesterday I was updating my openhab-installation to current release (5.0.1). Before I was using the evcc-plugin from the marketplace, after the upgrade evcc-binding did not work anymore. Also I was not able to install it again from marketplace, it ist not there anymore.

Could you please check?

I was able to fix my plugin using the jar, that you provided.

Regards,

Florian

Thanks for the hint. I will check it right now.

Hi everyone,

I’m running openHAB 5.0.1 and noticed that the evcc binding doesn’t work with evcc version 0.207.5. The error shown is:

COMMUNICATION_ERROR: Request failed

Is this issue related to the recent breaking changes in the evcc API, or should support for the new API already be included in openHAB 5.0.1?

Thanks!

I guess you have to wait for 5.0.2 or 5.1.0.
Or you can use the jar file provided here, but then you need to reconfigure your items.

Today I will release an updated version of the jar file.
But this will be in a couple of hours.

Understand, thanks for the clarification. I think I can wait. :slight_smile:

Sorry, I didn’t point out that everyone has to reconfigure his items when switching from 5.0.x to 5.1.0.

Continuing the discussion from [Evcc Binding 4.0.0;5.0.0):

same for me, a new install is not possible from the marketplace version, which works before with 5.0.0 and evcc 0.207.x

where can I found the updated version of the jar file? On the marketplace?

Should be in the market place or at the top of this thread.
Nevertheless you can also find the jars here:

ok, sorry for my ignorance, but I am using the stable version (5.0.1) from openhab, and in the github folder I can only found 4.x and 5.1.x so which one I should use?

I am also on stable version 5.0.1, installed via docker. For me this is not working. I get an error:

Could not resolve module: org.openhab.binding.evcc [338]
Unresolved requirement: Import-Package: com.google.gson; version=“[2.13.0,3.0.0)”

I think with switching to json you added version requirements for a to high version.

Could you add assets for 5.0.1 since it is the current stable version? and

Could you add the version number (0.8, 0.9, .. 1.2) to the jar files?

Thanks for the nice work. :+1:

So to point it out:

  • openHAB versions prior 5.0.2 are incompatible to the latest evcc versions → you need to install the addon from the marketplace or download the jar file from my GitHub repository and place it within the addons folder of your instance. Make sure to use the 4.3.7-SNAPSHOT jar since this is compatible to the openHAB versions.
  • openHAB version 5.1.0 and later can install the integrated addon.

Unfortunatly if I try 4.3.7-SNAPSHOT I get:

Status: UNINITIALIZED

HANDLER_MISSING_ERROR

in the UI. So this is not working ever. At the moment I see no possible way to make evcc 0.207.5 and org.openhab.binding.evcc work together.

I will check in the evening. And will provide a working jar file.

Thanks a lot :folded_hands:

Just want to give the information, that using 4.3.7 snapshot works for me on my 5.0.1 openhab version, but I have to clean the caches and Tmp folder of my openhab installation first.

sudo systemctl stop openhab
sudo openhab-cli clean-cache
sudo systemctl start openhab

How do I do that within docker?

First stop your docker container with:

docker stop <container_id_or_name>

Then run this command:

docker run --rm -it \
  -v openhab_addons:/openhab/addons \
  -v openhab_conf:/openhab/conf \
  -v openhab_userdata:/openhab/userdata \
  openhab/openhab:latest \
  openhab-cli clean-cache

This command will start a new container, mount your actual data to it, cleans the cache and removes the container afterwards. Then you can run your normal container again with a cleaned cache.

Unfortunatly it’s not working. I get “bash: openhab-cli: command not found”

For more info, my setup and what I tried:

I run openHAB with a portainer stack:

services:
  openhab:
    container_name: openhab
    image: "openhab/openhab:latest"
    restart: always
    network_mode: host
    ports:
      - ${OPENHAB_HTTP_PORT}:8080
      - ${OPENHAB_HTTPS_PORT}:8443
    cap_add:
      - NET_ADMIN
      - NET_RAW
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /etc/timezone:/etc/timezone:ro
      - ${DOCKER_BASE}/openhab_addons:/openhab/addons
      - ${DOCKER_BASE}/openhab_conf:/openhab/conf
      - ${DOCKER_BASE}/openhab_userdata:/openhab/userdata
      - ${DOCKER_BASE}/openhab_cont-init.d:/etc/cont-init.d

with these Environment variables:

CRYPTO_POLICY=unlimited
EXTRA_JAVA_OPTS=-Duser.timezone=Europe/Berlin
OPENHAB_HTTP_PORT=10800
OPENHAB_HTTPS_PORT=10443
DOCKER_BASE=/opt/containers/openhab

What I tried:

I stoped the container and cleared the folders:

/opt/containers/openhab/openhab_userdata/cache/ and 
/opt/containers/openhab/openhab_userdata/tmp/

Started the container again and set the Add-on log settings to Trace.

here the openhab.log from the last start:

2025-09-04 08:47:57.141 [INFO ] [org.openhab.core.Activator          ] - Starting openHAB 5.0.1 (Release Build)
2025-09-04 08:47:57.405 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Time zone set to 'Europe/Berlin'.
2025-09-04 08:47:57.410 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Location set to 'xxx,xxx'.
2025-09-04 08:47:57.412 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Locale set to 'de_DE'.
2025-09-04 08:47:57.412 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Measurement system set to 'SI'.
2025-09-04 08:47:58.097 [WARN ] [.transport.servlet.ServletController] - Can't find the request for http://xxx:8080/rest/events's Observer
2025-09-04 08:48:00.384 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'evcc.items'
...
2025-09-04 08:48:00.708 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'system.items'
...
2025-09-04 08:48:00.854 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'mysql.persist'
2025-09-04 08:48:01.000 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'home.sitemap'
2025-09-04 08:48:01.066 [INFO ] [el.core.internal.ModelRepositoryImpl] - Validation issues found in configuration model 'home.sitemap', using it anyway:
Linkable widget should contain either only frames or none at all
2025-09-04 08:48:01.079 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'evcc.sitemap'
2025-09-04 08:48:01.090 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'test.sitemap'
2025-09-04 08:48:01.097 [INFO ] [el.core.internal.ModelRepositoryImpl] - Validation issues found in configuration model 'test.sitemap', using it anyway:
Sitemap should contain either only frames or none at all
...
2025-09-04 08:48:01.212 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'evcc.things'
2025-09-04 08:48:03.960 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'marketbinding.rules'
...
2025-09-04 08:48:59.870 [WARN ] [core.karaf.internal.FeatureInstaller] - The ui add-on 'grafana' does not exist - ignoring it.
2025-09-04 08:49:01.935 [INFO ] [persistence.jdbc.internal.JdbcMapper] - JDBC::openConnection: Driver is available::Yank setupDataSource
2025-09-04 08:49:02.106 [INFO ] [persistence.jdbc.internal.JdbcMapper] - JDBC::formatTableNames: Nothing to migrate.
2025-09-04 08:49:02.108 [INFO ] [persistence.jdbc.internal.JdbcMapper] - JDBC::checkDBSchema: Rebuild complete, configure the 'rebuildTableNames' setting to 'false' >
2025-09-04 08:49:02.745 [INFO ] [e.automation.internal.RuleEngineImpl] - Rule engine started.
2025-09-04 08:49:22.711 [INFO ] [ore.model.script.marketbinding.rules] - Starting Market Binding Script
2025-09-04 08:49:53.042 [INFO ] [ore.model.script.marketbinding.rules] - Starting Market Binding Script
2025-09-04 09:14:55.365 [DEBUG] [ab.binding.evcc.internal.EvccHandler] - Running refresh job ...
2025-09-04 09:14:55.367 [TRACE] [ab.binding.evcc.internal.api.EvccAPI] - GET http://xxx:7070/api/state - 
{
    "authProviders": {
    },
    "aux": [
    ],
    "battery": [
        {
            "power": -4294,
            "capacity": 0,
            "soc": 69.9,
            "controllable": false
        }
    ],
    "batteryCapacity": 1,
    "batteryDischargeControl": false,
    "batteryEnergy": 0,
    "batteryGridChargeActive": false,
    "batteryMode": "unknown",
    "batteryPower": -4294,
    "batterySoc": 69.9,
    "bufferSoc": 0,
    "bufferStartSoc": 0,
    "currency": "EUR",
    "eebus": false,
    "ext": [
    ],
    "forecast": {
    },
    "greenShareHome": 1,
    "greenShareLoadpoints": 0,
    "grid": {
        "power": 18
    },
    "gridConfigured": true,
    "hems": {
    },
    "homePower": 633,
    "influx": {
        "url": "",
        "database": "",
        "token": "",
        "org": "",
        "user": "",
        "password": "",
        "insecure": false
    },
    "interval": 6,
    "loadpoints": [
        {
            "batteryBoost": false,
            "chargeCurrents": [
                0,
                0,
                0
            ],
            "chargeDuration": 9684,
            "chargePower": 0,
            "chargeRemainingDuration": 0,
            "chargeRemainingEnergy": 10727.942,
            "chargeTotalImport": 740.06,
            "chargeVoltages": [
                235.0699921,
                234.2799988,
                236.1399994
            ],
            "chargedEnergy": 8309.998,
            "chargerFeatureHeating": false,
            "chargerFeatureIntegratedDevice": false,
            "chargerIcon": null,
            "chargerPhases1p3p": true,
            "chargerSinglePhase": false,
            "chargerStatusReason": "unknown",
            "charging": false,
            "connected": true,
            "connectedDuration": 0,
            "disableDelay": 180,
            "disableThreshold": 0,
            "effectiveLimitSoc": 100,
            "effectiveMaxCurrent": 24,
            "effectiveMinCurrent": 6,
            "effectivePlanId": 0,
            "effectivePlanSoc": 0,
            "effectivePlanTime": null,
            "effectivePriority": 0,
            "enableDelay": 60,
            "enableThreshold": 0,
            "enabled": false,
            "limitEnergy": 0,
            "limitSoc": 0,
            "maxCurrent": 24,
            "minCurrent": 6,
            "mode": "pv",
            "offeredCurrent": 0,
            "phaseAction": "inactive",
            "phaseRemaining": 0,
            "phasesActive": 1,
            "phasesConfigured": 1,
            "planActive": false,
            "planEnergy": 0,
            "planOverrun": 0,
            "planPrecondition": 0,
            "planProjectedEnd": null,
            "planProjectedStart": null,
            "planTime": null,
            "priority": 0,
            "pvAction": "inactive",
            "pvRemaining": 0,
            "sessionCo2PerKWh": null,
            "sessionEnergy": 8309.998,
            "sessionPrice": 0.915,
            "sessionPricePerKWh": 0.11,
            "sessionSolarPercentage": 89.627,
            "smartCostActive": false,
            "smartCostLimit": null,
            "smartCostNextStart": null,
            "smartFeedInPriorityActive": false,
            "smartFeedInPriorityLimit": null,
            "smartFeedInPriorityNextStart": null,
            "title": "Carport",
            "vehicleClimaterActive": false,
            "vehicleDetectionActive": false,
            "vehicleLimitSoc": 0,
            "vehicleName": "ev1",
            "vehicleOdometer": 51104,
            "vehicleRange": 265,
            "vehicleSoc": 79.155,
            "vehicleTitle": "XXX",
            "vehicleWelcomeActive": false
        }
    ],
    "messaging": false,
    "modbusproxy": null,
    "mqtt": {
        "broker": "XXX:1883",
        "user": "",
        "password": "",
        "clientID": "",
        "insecure": false,
        "caCert": "",
        "clientCert": "",
        "clientKey": "",
        "topic": "evcc"
    },
    "network": {
        "schema": "http",
        "host": "XXX",
        "port": 7070
    },
    "prioritySoc": 100,
    "pv": [
        {
            "power": 2862
        },
        {
            "power": 2047
        }
    ],
    "pvEnergy": 0,
    "pvPower": 4909,
    "residualPower": 0,
    "siteTitle": "Eltern",
    "smartCostAvailable": false,
    "smartCostType": "pricestatic",
    "smartFeedInPriorityAvailable": false,
    "sponsor": {
        "name": "",
        "expiresAt": "0001-01-01T00:00:00Z",
        "fromYaml": true
    },
    "startup": true,
    "statistics": {XXX},
    "tariffFeedIn": 0.08,
    "tariffGrid": 0.367,
    "tariffPriceHome": 0.08,
    "tariffPriceLoadpoints": 0.367,
    "telemetry": false,
    "vehicles": {
        "ev1": {
            "title": "XXX",
            "icon": "car",
            "capacity": 52,
            "repeatingPlans": [
            ]
        }
    },
    "version": "0.207.5"
}
2025-09-04 09:14:55.367 [TRACE] [ab.binding.evcc.internal.api.EvccAPI] - API Response >> same as above

I removed unimportant stuff and pretty-printed the json. I checked the sha256 of the jar file, it’s the same as evcc binding - Version 1.2 . The API response looks good. Slowly I am at a lost.