Mercedes Me Binding

My current assumption:
The Mercedes Me binding is now an official part of openHAB. Especially the members who installed the Marketplace binding before are facing suspicious errors, after update to new Milestone. Root cause seems to be conflicting bundle versions between Marketplace installation and Milestone release.
As said this is an assumption but it matches with a parallel discussion of conflicting bindings.

Please check via this thread if you
a) have 2 times a mercedes bundle with different version and
b) if you can resolve this conflict with the below description

This is caused by an API breaking change introduced in 3.4M2:

So the binding needs to be compiled after this change, i.e. it must be at least as new. To make matters worse, unfortunately this change introduced a regression which has also been fixed, but only after M2:

So if you are able to update to latest snapshot (both core and the binding), everything should be fine. This fix will be included in 3.4M3.

Please let me know if you are seeing anything similar to this after upgrading to latest version.

1 Like

Great support, thanks for this. Works out again.

1 Like

Got it to work with the code that I posted.
I did a clear cache after having also issues with some other items, and it also fixed this issue.

1 Like

Hi regarding my earlier post… i have tried different things with no luck.

updating binding From “old” jar → newest Jar → binding from openhab control panel.

Things file updated with:
batteryCapacity
fuelCapacity

New things file:

Bridge mercedesme:account:7000   "MercedesMe" [clientId="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", clientSecret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", imageApiKey="xxxxxxxxxxxxxxxxxxxxxxxxxx", callbackIP="192.168.0.101", callbackPort=8090, odoScope=true, vehicleScope=true, lockScope=true, fuelScope=true, evScope=true] {
         Thing hybrid A250e      "Mercedes A250e" [vin="xxxxxxxxxxxxxxxxxxxx", refreshInterval=5, background=false, night=false, cropped=false, roofOpen=false, format="webp", batteryCapacity=12.5, fuelCapacity=35.0] 

Updated openhab from 3.3 to 3.4M2 its the same 21-22min between updates and EVERY time starts with and error, after that callback works

2022-09-27 08:04:48.354 [INFO ] [esme.internal.handler.VehicleHandler] - Mercedes A250e:payasyoudrive Error getting data java.io.EOFException: HttpConnectionOverHTTP@1b31c54::DecryptedEndPoint@1f18980{l=/192.168.0.101:47210,r=api.mercedes-benz.com/159.122.71.196:443,OPEN,fill=-,flush=-,to=1283619/0}
2022-09-27 08:04:48.731 [DEBUG] [esme.internal.handler.VehicleHandler] - Mercedes A250e:payasyoudrive Fallback Response 200 [{"odo":{"value":"32247","timestamp":1664257993000}}]
2022-09-27 08:26:13.475 [INFO ] [esme.internal.handler.VehicleHandler] - Mercedes A250e:payasyoudrive Error getting data java.io.EOFException: HttpConnectionOverHTTP@a4d466::DecryptedEndPoint@8b1693{l=/192.168.0.101:48932,r=api.mercedes-benz.com/159.122.71.196:443,OPEN,fill=-,flush=-,to=1283740/0}
2022-09-27 08:26:13.918 [DEBUG] [esme.internal.handler.VehicleHandler] - Mercedes A250e:payasyoudrive Fallback Response 200 [{"odo":{"value":"32247","timestamp":1664257993000}}]
2022-09-27 08:47:28.357 [INFO ] [esme.internal.handler.VehicleHandler] - Mercedes A250e:payasyoudrive Error getting data java.io.EOFException: HttpConnectionOverHTTP@11fdc3d::DecryptedEndPoint@475b7e{l=/192.168.0.101:50652,r=api.mercedes-benz.com/159.122.71.196:443,OPEN,fill=-,flush=-,to=1273408/0}
2022-09-27 08:47:28.825 [DEBUG] [esme.internal.handler.VehicleHandler] - Mercedes A250e:payasyoudrive Fallback Response 200 [{"odo":{"value":"32247","timestamp":1664257993000}}]
2022-09-27 09:08:43.234 [INFO ] [esme.internal.handler.VehicleHandler] - Mercedes A250e:payasyoudrive Error getting data java.io.EOFException: HttpConnectionOverHTTP@139d1ef::DecryptedEndPoint@18a63e0{l=/192.168.0.101:52354,r=api.mercedes-benz.com/159.122.71.196:443,OPEN,fill=-,flush=-,to=1273352/0}
2022-09-27 09:08:43.914 [DEBUG] [esme.internal.handler.VehicleHandler] - Mercedes A250e:payasyoudrive Fallback Response 200 [{"odo":{"value":"32247","timestamp":1664257993000}}]
2022-09-27 09:30:08.362 [INFO ] [esme.internal.handler.VehicleHandler] - Mercedes A250e:payasyoudrive Error getting data java.io.EOFException: HttpConnectionOverHTTP@15d13ab::DecryptedEndPoint@14130b7{l=/192.168.0.101:54064,r=api.mercedes-benz.com/159.122.71.196:443,OPEN,fill=-,flush=-,to=1283553/0}
2022-09-27 09:30:08.688 [DEBUG] [esme.internal.handler.VehicleHandler] - Mercedes A250e:payasyoudrive Fallback Response 200 [{"odo":{"value":"32247","timestamp":1664257993000}}]
2022-09-27 09:51:23.234 [INFO ] [esme.internal.handler.VehicleHandler] - Mercedes A250e:payasyoudrive Error getting data java.io.EOFException: HttpConnectionOverHTTP@1b34df::DecryptedEndPoint@147875a{l=/192.168.0.101:55802,r=api.mercedes-benz.com/159.122.71.196:443,OPEN,fill=-,flush=-,to=1273628/0}
2022-09-27 09:51:23.685 [DEBUG] [esme.internal.handler.VehicleHandler] - Mercedes A250e:payasyoudrive Fallback Response 200 [{"odo":{"value":"32247","timestamp":1664257993000}}]

After Milestone update it seems some users end up to have the mercedes binding installed with different versions. Can you check this

So first step is to have only one version installed, preferably the 3.4.0.M2 version.
Afterwards perform the steps mentioned in previous post

Hi weymann

sorry i forgot to mention that i already check this, but this i what i got.

image

I followed the instructions (at least that’s what I believe) and I manage to authenticate (at least the gateway thing and the car thing are green).
However, items are empty and setting log level to trace shows an HTTP500:

2022-10-04 22:45:35.357 [TRACE] [esme.internal.handler.VehicleHandler] - B250e Odo scope not activated
2022-10-04 22:45:35.358 [TRACE] [esme.internal.handler.VehicleHandler] - B250e Electric Status scope not activated
2022-10-04 22:45:35.358 [TRACE] [esme.internal.handler.VehicleHandler] - B250e Fuel scope not activated
2022-10-04 22:45:35.510 [TRACE] [esme.internal.handler.VehicleHandler] - B250e:vehiclestatus Response 500
            {"errorMessage": "Internal Server Error", "statusCode": "500"}

2022-10-04 22:45:35.511 [TRACE] [esme.internal.handler.VehicleHandler] - B250e Lock scope not activated

I tried various things inluding clean-cache, at no avail.
I deactivated all APIs except the vehicle status to reduce the scope for config / compatibility errors.
I’m a bit at the end of my wits.
I did notice that the json file in the jsondb folder does not exist. But why?
Does anybody have an idea where to look next? I presume that something is wrong with the API requests due to some misconfiguration. Is there a possibility to log the http requests?
Any help would be highly appreciated.

For me the binding stopped working on Thursday 29.09.2022 for unknown reason. Both, account and car are “Online”. Authorization status using the callback URL is “OK”.

Continuing the discussion from Mercedes Me Binding:

I have the same issue. No update since 30/9. The MercedesMe app shows current data but the binding does not update. Things are ONLINE, and no error messages in the logs. Binding is latest version (3.4.0.202208181041).

Glad to hear that I’m not the only one. I can confirm that my app gets data.
@weymann: shall I file an issue on github?

@dk8pn @pune2001 @ulij
I also thought it’s just a problem in my system, but I see it’s a general problem. If you switch on TRACE level I assume you’ll see Internal Server Error 500 for all API calls.

I raised already an issue ~~ towards Mercedes–Benz /developers – The API platform by Mercedes-Benz but I don’t have feedback yet

Feedback:

1 Like

It takes them weeks to respond, let’s be patient :roll_eyes:

Thanks for the update; and for dealing with Mercedes support. And also thanks to mercedes to come back quickly.
Highly appreciated. Let’s see when they will bring that up again. I’ll turn off trace logging then…

The binding is working again here.

Here as well, gently filling with data now :slight_smile:
Many thanks to Bernd for his quick action!

Have received an email from Mercedes-Benz today. They are going to introduce API changes which require action of users on 2nd of November latest. Credentials need to be updated. They will advise more details if the date comes closer.

I received this message too. The description looks pretty straight forward Mercedes–Benz /developers – The API platform by Mercedes-Benz

  1. re-create credentials
  2. change server addresses
  3. adjust scopes
  4. handle JWT token

While1-3 looks quite easy I’m struggling with 4). I contacted Mercedes but there’s no test environment and even no JWT test token available to check the new behavior in beforehand.

I fear I’ve to check after migration how this shall work. To be honest I cannot tell how long it takes to bring the binding to work after migration on Nov. 2th

Changed my credentials. Account and car are “Online”. But i get the following errors in openhab.log:

2022-11-02 11:07:50.104 [INFO ] [esme.internal.handler.VehicleHandler] - Mercedes Benz WN-PW 360:fuelstatus Error getting data org.eclipse.jetty.client.HttpResponseException: HTTP protocol violation: Authentication challenge without WWW-Authenticate header
2022-11-02 11:07:50.245 [INFO ] [esme.internal.handler.VehicleHandler] - Mercedes Benz WN-PW 360:vehiclestatus Error getting data org.eclipse.jetty.client.HttpResponseException: HTTP protocol violation: Authentication challenge without WWW-Authenticate header
2022-11-02 11:07:50.389 [INFO ] [esme.internal.handler.VehicleHandler] - Mercedes Benz WN-PW 360:vehiclelockstatus Error getting data org.eclipse.jetty.client.HttpResponseException: HTTP protocol violation: Authentication challenge without WWW-Authenticate header

Old Authentication worked for me the whole day so I was able to test the Migration steps in parallel.
Now it seems to run => Version 1.1 contains all necessary changes

Steps I performed

1 Like