Mercedes Me Binding

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

Works out as expected. Many thanks for this quick adaptation.

I installed the MerdedesMe Binding via Marketplace in OH 3.3 (stable). The items are also updated. Except for the range channels (range-fuel, radius-fuel, fuel-remain and fuel-open), these are not updated and remain unchanged at “NULL”. If I read it correctly, these are automatically calculated when specifying the “fuelCapacity” in the configuration.
Is there a reason this isn’t working for me?

I think you need to manually set the capacity in the vehicle thing properties to make that work.

Thing combustion w246 “Mercedes B-Klasse” [ vin=“XXXXXXXXXXXXXXXX”, refreshInterval=1, background=true, night=true, cropped=false, roofOpen=false, format=“webp”, fuelCapacity=55.0]

I did it too. So I’m surprised it doesn’t work???

@weymann just for my understanding can you please explain what part of the car are the following? I think it is a kind of Deutsch-lish so its not clear in English…

  • ‘deck-lid’
  • ‘flap’

Even if you try to directly translate it into German it is unclear.
I believe it is the two thingies covering the charging plug.
I can’t verify at the moment because it’s online but the car is not sending data. As usual. Unfortunately all this remote stuff only works when you don’t need it…

1 Like

I checked it again with the openhab log viewer. The car sent the data for “fuel-level”. The value of the item has also changed. I could see this in the log viewer. But in the log viewer you can also see that the values ​​for the items “range-fuel, radius-fuel, fuel-remain and fuel-open” are not updated or calculated. Neither a changed nor an error message can be seen. As things stand, I’d say the binding doesn’t do the computation. Does anyone have an idea why this might be? I had specified the fuel capacity in the config of the vehicle.