ConnectedCar Binding myAudi, Volkswagen, VW ID, Skoda, Enyaq, Seat, Ford, WeCharge

No!! i will do it with a rule, don’t worry!!

thanks for ur work!!

Hello Mr. Pechmann,
thanks for the updates in describing the behavior.
Now I see Updates after I locked the car (it seems to send then an Update to WeConnect).
In the next 15min (default) Update Cycle, this data gets fetched and displayed in the binding.
I have not managed to trigger an extra fetch by the Switch “Control_UpdateVehicleStatus”.
It doesn’t seem to trigger anything on my side. How do you operate it? Is there a Timing to meet ?
During Charging, I could not see any updates. Connect, Currents, ChargingTime, and so one,
nothing updated – this would correspond to your failure log.

Best regards
funcarver72

As you might saw @cweitkamp provided a fix. Please try the updated build

Check the log:

2021-10-22 11:43:21.313 [DEBUG] [nectedcar.internal.api.ApiHttpClient] - WVWZZZE1ZNP000000: HTTP 207 Response: {  "data": {    "batteryStatus": {      "carCapturedTimestamp": "2021-10-22T09:43:20Z",      "currentSOC_pct": 69,      "cruisingRangeElectric_km": 257    },    "chargingStatus": {      "carCapturedTimestamp": "2021-10-22T09:43:20Z",      "remainingChargingTimeToComplete_min": 245,      "chargingState": "charging",      "chargeMode": "manual",      "chargePower_kW": 1.5,      "chargeRate_kmph": 7    },    "chargingSettings": {      "carCapturedTimestamp": "2021-10-22T09:42:49Z",      "maxChargeCurrentAC": "maximum",      "autoUnlockPlugWhenCharged": "permanent",      "targetSOC_pct": 80    },    "chargeMode": {      "preferredChargeMode": "manual",      "availableChargeModes": [        "invalid"      ]    },    "plugStatus": {      "carCapturedTimestamp": "2021-10-22T09:42:49Z",      "plugConnectionState": "connected",      "plugLockState": "locked"    },    "climatisationStatus": {      "carCapturedTimestamp": "2021-10-22T09:42:48Z",      "remainingClimatisationTime_min": 0,      "climatisationState": "off"    },    "climatisationSettings": {      "carCapturedTimestamp": "2021-10-22T09:42:48Z",      "targetTemperature_C": 21,      "targetTemperature_F": 70,      "unitInCar": "celsius",      "climatisationWithoutExternalPower": true,      "climatizationAtUnlock": true,      "windowHeatingEnabled": false,      "zoneFrontLeftEnabled": false,      "zoneFrontRightEnabled": false,      "targetTemperature_K": 294.15    },    "windowHeatingStatus": {      "carCapturedTimestamp": "2021-10-22T09:42:48Z",      "windowHeatingStatus": [        {          "windowLocation": "front",          "windowHeatingState": "off"        },        {          "windowLocation": "rear",          "windowHeatingState": "off"        }      ]    },    "rangeStatus": {      "carCapturedTimestamp": "2021-10-22T09:43:20Z",      "carType": "electric",      "primaryEngine": {        "type": "electric",        "currentSOC_pct": 69,        "remainingRange_km": 257      },      "totalRange_km": 257    },    "capabilityStatus": {      "capabilities": [        {          "id": "automation",          "status": [            1004          ],          "expirationDate": "2024-10-07T23:59:59Z",          "userDisablingAllowed": true        },        {          "id": "batteryColdWarning",          "status": [            1008          ],          "userDisablingAllowed": false        },        {          "id": "batterySupport",          "status": [            1008          ],          "userDisablingAllowed": false        },        {          "id": "cdisDigitalKey",          "status": [            1008          ],          "userDisablingAllowed": false        },        {          "id": "charging",          "expirationDate": "2024-10-07T23:59:59Z",          "userDisablingAllowed": true        },        {          "id": "chargingStations",          "expirationDate": "2024-10-07T23:59:59Z",          "userDisablingAllowed": true        },        {          "id": "climatisation",          "expirationDate": "2024-10-07T23:59:59Z",          "userDisablingAllowed": true        },        {          "id": "dealerAppointment",          "status": [            1008          ],          "userDisablingAllowed": false        },        {          "id": "destinations",          "status": [            1004          ],          "expirationDate": "2024-10-07T23:59:59Z",          "userDisablingAllowed": true        },        {          "id": "fuelStatus",          "expirationDate": "2024-10-07T23:59:59Z",          "userDisablingAllowed": false        },        {          "id": "ignition",          "status": [            1004          ],          "expirationDate": "2024-10-07T23:59:59Z",          "userDisablingAllowed": false        },        {          "id": "mapUpdate",          "expirationDate": "2024-10-07T23:59:59Z",          "userDisablingAllowed": true        },        {          "id": "measurements",          "status": [            1008          ],          "userDisablingAllowed": false        },        {          "id": "onlineSpeech",          "expirationDate": "2024-10-07T23:59:59Z",          "userDisablingAllowed": true        },        {          "id": "parkingBrake",          "status": [            1008          ],          "userDisablingAllowed": false        },        {          "id": "parkingInformation",          "expirationDate": "2024-10-07T23:59:59Z",          "userDisablingAllowed": true        },        {          "id": "parkingPosition",          "status": [            1008          ],          "userDisablingAllowed": false        },        {          "id": "personalizationOnline",          "status": [            1008          ],          "userDisablingAllowed": false        },        {          "id": "plugAndCharge",          "status": [            1008          ],          "userDisablingAllowed": false        },        {          "id": "poiSearch",          "status": [            1008          ],          "userDisablingAllowed": false        },        {          "id": "privateEmergencyCall",          "status": [            1008          ],          "userDisablingAllowed": false        },        {          "id": "readiness",          "userDisablingAllowed": false        },        {          "id": "roadExperienceManagementLocalization",          "status": [            1008          ],          "userDisablingAllowed": false        },        {          "id": "roadExperienceManagementLocalizationUpload",          "status": [            1008          ],          "userDisablingAllowed": false        },        {          "id": "roadsideAssistant",          "status": [            1008          ],          "userDisablingAllowed": false        },        {          "id": "routing",          "expirationDate": "2024-10-07T23:59:59Z",          "userDisablingAllowed": true        },        {          "id": "state",          "status": [            1008          ],          "userDisablingAllowed": false        },        {          "id": "trafficInformation",          "expirationDate": "2024-10-07T23:59:59Z",          "userDisablingAllowed": true        },        {          "id": "vehicleHealth",          "status": [            1008          ],          "userDisablingAllowed": false        },        {          "id": "vehicleHealthInspection",          "status": [            1008          ],          "userDisablingAllowed": false        },        {          "id": "vehicleHealthWarnings",          "status": [            1008          ],          "userDisablingAllowed": false        },        {          "id": "vehicleLights",          "status": [            1008          ],          "userDisablingAllowed": false        },        {          "id": "vehicleWakeUpTrigger",          "status": [            1008          ],          "userDisablingAllowed": false        },        {          "id": "webRadio",          "status": [            1004          ],          "expirationDate": "2024-10-07T23:59:59Z",          "userDisablingAllowed": true        }      ]    }  },  "error": {    "lvBatteryStatus": {      "code": 4112,      "message": "The capability for the requested operation is missing",      "group": 2,      "info": "Internal error, please try again later. If the problem persists, please contact our support."    }  }}

The call returns HTTP 207. This SHOULD be handled by the binding.

I see
“error”: { “lvBatteryStatus”: { “code”: 4112,
“message”: “The capability for the requested operation is missing”, “group”: 2,
“info”: “Internal error, please try again later. If the problem persists, please contact our support.” }

Not sure if that is ignored.

Best would be to provde credentials and I could debug it. Send a PM.

try latest build

Let’s start with Mercedes. I uploaded the first build handling login and authentication.
https://github.com/markus7017/myfiles/blob/master/connectedcar/ccmercedes-3.2.0.ALPHA.jar?raw=true

  • copy the jar into the addons folder
  • enable TRACE logging on the OH console: log:set TRACE org.openhab.binding.connectedcar
  • add a Mercedes Account Thing
  • enter your e-mail addresse used for the MercedesMe Account (password not required)
  • Save thing config. The Thing will go into status CONFIG_PENDING
  • You should receive an e-mail with a TAN. Edit thing config and insert the TAN, click Save
  • No the Account Thing should go online - you need to do this only once

Once the thing gets online I need the extract starting with “Mercedes: accessToken was created, valid for 5760sec” and the following " Mercedes: HTTP 200 Response" + Body and headers. With this information I could create the vehicle thing in the Inbox.

3 Likes

Hello,

after restarting my OH3 System yesterday I got the message : Thing ‘connectedcar:myaudi:Etron1’ changed from UNKNOWN to OFFLINE (COMMUNICATION_ERROR): API call failed
I’m having an Audi- Etron - does anybody has an idea what went wrong?

I have already uninstall / install the binding - but it’s still the same.

same same
seems to be a general problem

login to the portal, maybe you need to give a consent to updated T&Cs, update to the latest binding version should bring up a proper error message

logged in at portal, but nothing to accept :-o

changed from carnet 3.1.0 to latest org.openhab.binding.connectedcar-3.2.0-SNAPSHOT.
First try produced same result.
Second try brought the bridge online and found the two cars.
When I started to create the car things, the channels did not populate.
Re-started the bridge and now it’s offline again:

2021-10-24 17:20:29.037 [DEBUG] [nectedcar.internal.api.ApiHttpClient] - Audi: HTTP GET https://app-api.live-my.audi.com/myaudiappidk/v1/openid-configuration
2021-10-24 17:20:29.145 [DEBUG] [nectedcar.internal.api.ApiHttpClient] - Audi: HTTP 404 Response: service not found:- /myaudiappidk/v1/openid-configuration
2021-10-24 17:20:29.147 [DEBUG] [dcar.internal.handler.AccountHandler] - Audi: Initialization failed: API call failed

Hi @markus7017

At one point the binding was working with Audi USA (I did some testing with you over a year ago). It seems broken now?

Mike

@MFI-Net @MikeTheTux
try updated build

@rubensanty any update? Does that build fixes your issue?

@DPL any update? Does that build fixes your issue?

that must be almost 2yr ago. Initially, when only Audi was supported.

The US uses the old style token flow, somewhen VW consolidated the platforms in EU, which means there is no dedicated brand tolken anymore, just access_token and id_token. I could look into this, but you need to share your credentials and support testing. Send me a PM.

still the same… but dont worry, i do it with a rule, dont break your head!!
i will still testing all the params!

thanks so much for your work!

@MFI-Net @MikeTheTux
try updated build

build from this morning works
big thanks!
:slight_smile:

Hi Markus,

I did some test and could reproduce the issue:
Not sure if it could help but maybe there are higher changes in the values required between each request to update the Item Value in OH.
If it will not help, I will send my credential by PN.

In case no update of Item Values in OH3.1 UI:
Car is charging with low Power (1,3 KW)

  • no big changes of reportet Values from VW-Server between the requests
    eg. cruisingRangeElectric_km changes only by 1 each request/15min (256,257,258)
    currentSOC_pct only change by 1 after three requests

In case of regular Item Value updates
Car is charging with min. 3,6 KW

  • differences between reportet Values from VW-Server are higher

the follow error are not effect the result.

“error”: { “lvBatteryStatus”: { “code”: 4112,
“message”: “The capability for the requested operation is missing”, “group”: 2,
“info”: “Internal error, please try again later. If the problem persists, please contact our support.” }

Kind regrads

Juergen

yes, thanks !!!

I was running the binding (previous Build from Oct 4) with a Cupra (Seat) Formentor. Everything was working fine so far except the climater control. When I turn on the item, I get the following error:

12:40:24.186 [DEBUG] [car.internal.handler.ThingBaseHandler] - VSSXXXXXXXXXX0123: Channel climater received command ON
12:40:24.195 [DEBUG] [ctedcar.internal.api.carnet.CarNetApi] - VSSXXXXXXXXXX0123: Sending action request for rclima_v1.P_START_CLIMA_EL, reqSecToken=false, contentType=application/vnd.vwg.mbb.ClimaterAction_v1_0_2+json
12:40:24.207 [DEBUG] [nnectedcar.internal.api.ApiHttpClient] - VSSXXXXXXXXXX0123: HTTP POST https://fal-3a.prd.eu.dp.vwg-connect.com/fs-car/bs/climatisation/v1/VW/ES/vehicles/VSSXXXXXXXXXX0123/climater/actions
12:40:24.215 [TRACE] [nnectedcar.internal.api.ApiHttpClient] -   Headers:
Accept-Encoding: gzip
User-Agent: okhttp/3.11.0
X-App-Name: SEATConnect
X-App-Version: 1.1.29
Content-Type: application/vnd.vwg.mbb.ClimaterAction_v1_0_2+json
Accept: application/json, application/vnd.vwg.mbb.ChargerAction_v1_0_0+xml,application/vnd.volkswagenag.com-error-v1+xml,application/vnd.vwg.mbb.genericError_v1_0_2+xml,application/vnd.vwg.mbb.RemoteStandheizung_v2_0_0+xml,application/vnd.vwg.mbb.genericError_v1_0_2+xml,application/vnd.vwg.mbb.RemoteLockUnlock_v1_0_0+xml,application/vnd.vwg.mbb.operationList_v3_0_2+xml,application/vnd.vwg.mbb.genericError_v1_0_2+xml,*/*
Accept-Charset: UTF-8
Authorization: Bearer eyJraWQiOiJNQkIwMSIsImFsZyI6IlJTMjU2In0.eyJzY3AiOlsi22FsIl0sInN1YiI2InVxVkNtZHXzM0lKY3FpMTRDWEpMWjhpeUFnTxxXInZlciI6IjEiLCJjb3IiOiJERSIsImlzcyx6IlZXR01CQjAxREVMSVYxIi0IjoiOWRjYzxwZjAtOGU3OS00xjNhLWEzZmEtNDA2NWQ5OTA4OGI0IiwiY2NoIjoiYXBwIiwidHlwIjoiQVQiLCJzeXMiOiJYSURfQVBQX1NFQVQiLCJzdHlwIjoiVDIiLCJhdWQiOiJtYWwucHJkLmVjZS52d2ctY29ubmVjdC5jb20iLCJ0bnQiOiJTZWF0LERFRkFVTFQiLCJleHAiOjE2MzUyNDYyMTYsImlhdCI6MTYzNTI0MjYxNiwicnQtaWQiOiJjZDZlNGFkMy0zN2I3LTQ3NzItOTc1Yi1hNGQzNzJiNzVlNDMiLCJqdGkiOiJlNTNmY2IzMC03MWNjLTRmY2ItOTY5Yi1jMzQyM2ZmY2FjNWQifQ.Dk4NuzlMf3zSuVXfQ7L33WLBFn1GM05y45xfWGldECHuRwBjwGUQBnvcAhOT4VQwDrHIuWdtMCfydR46ODoYwm8OR-w64fe10qKT2ZpzwI5XHvVJLVChw-Wh-w38ZFbGnRWXiyQD--syWZBal0oI1sCfjlnM2L9oLHAS44ywWgz9OfDZOaQLx6LWasuQ3vVhZL1NFahCMAfU5IKu8DBBcERNO9LGeO__AHlr4zQO_hx-kZJWjlnIpDy0pTOVSFHwhDLgIZpR_WM6JPUduI1QGduBV0zwF8qYWZykDLhNsOsXNW96BPURVpce9E3YreAUrQzEKC-5X3a4Hn_w2YiRPg
Host: msg.volkswagen.de
Content-Length: 134


12:40:24.228 [TRACE] [nnectedcar.internal.api.ApiHttpClient] -   Body/Data: {"action": {"settings": {"climatisationWithoutHVpower": "without_hv_power", "heaterSource": "electric"}, "type": "startClimatisation"}
12:40:24.313 [DEBUG] [nnectedcar.internal.api.ApiHttpClient] - VSSXXXXXXXXXX0123: HTTP 400 Response: {"error":{"errorCode":"gw.error.validation","description":"Invalid payload"}}
12:40:24.321 [TRACE] [nnectedcar.internal.api.ApiHttpClient] -   Headers:
X-FS-Tracking-ID: eab3c0cf-3dff-4faf-844e-9938c35cbfd3
X-FS-Error-Code: GW400
Content-Type: application/json
Content-Length: 77
Date: Tue, 26 Oct 2021 10:40:01 GMT
Connection: close
Server: www


12:40:24.330 [INFO ] [car.internal.handler.ThingBaseHandler] - VSSXXXXXXXXXX0123: Status from service rclima_v1.P_START_CLIMA_EL: API call failed POST https://fal-3a.prd.eu.dp.vwg-connect.com/fs-car/bs/climatisation/v1/VW/ES/vehicles/VSSZZZKMZNR000123/climater/actions (HTTP 400 Bad Request), result = {"error":{"errorCode":"gw.error.validation","description":"Invalid payload"}}
12:40:24.341 [DEBUG] [internal.handler.CarNetVehicleHandler] - VSSXXXXXXXXXX0123: Action startClimater submitted, initial status=rejected

Then I updated the binding to the latest build from yesterday, but now I cannot even connect to the Car Thing:

13:36:48.729 [WARN ] [car.internal.handler.ThingBaseHandler] - VSSXXXXXXXXXX0123: General Error: class org.openhab.core.library.types.QuantityType cannot be cast to class org.openhab.core.library.types.DecimalType (org.openhab.core.library.types.QuantityType and org.openhab.core.library.types.DecimalType are in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @2e4ea2)
java.lang.ClassCastException: class org.openhab.core.library.types.QuantityType cannot be cast to class org.openhab.core.library.types.DecimalType (org.openhab.core.library.types.QuantityType and org.openhab.core.library.types.DecimalType are in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @2e4ea2)
        at org.openhab.binding.connectedcar.internal.api.carnet.CarNetServiceStatus.serviceUpdate(CarNetServiceStatus.java:177) ~[?:?]
        at org.openhab.binding.connectedcar.internal.api.ApiBaseService.update(ApiBaseService.java:88) ~[?:?]
        at org.openhab.binding.connectedcar.internal.handler.ThingBaseHandler.updateVehicleStatus(ThingBaseHandler.java:456) ~[?:?]
        at org.openhab.binding.connectedcar.internal.handler.ThingBaseHandler.lambda$1(ThingBaseHandler.java:400) ~[?:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
        at java.lang.Thread.run(Thread.java:829) [?:?]
13:36:48.816 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing 'connectedcar:cnvehicle:CupraBridge:VSSXXXXXXXXXX0123' changed from UNKNOWN: Initializing to OFFLINE (COMMUNICATION_ERROR): General Error: class org.openhab.core.library.types.QuantityType cannot be cast to class org.openhab.core.library.types.DecimalType (org.openhab.core.library.types.QuantityType and org.openhab.core.library.types.DecimalType are in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @2e4ea2)

I removed the old things, shut down OH, deleted the build, then cleared the OH cache, copied the new build and started OH again.
Have I done something wrong?

@markus7017
Tested the new build and the problem with dynamic state options seems to be fixed (luckily the connected car binding got initialised BEFORE the other ones), so that looks fine!

Is there someone with a PEHV and electric pre heater? For me it seems not to work (AUDI/VW CarNet).

I guess :control#climater should do the job but it doesn’t at least for me. But control#targetTemperature seems to work because it shows me the current temperature setup in the app.