Looks like the MB Engineers cleaned up their API Gateway configuration. The good thing is that its more consistent now. The bad thing: I had to implement the cleanup in my code too. Unfortunately, I was in the middle to prepare the christmas present and therefore you get new features in this release too. Thanks to @Thomas55555 for the PR
Bugfix:
Error on Integration Setup (MB API Headers Change)
New features:
New Sensor Geofencing Violations
Multiple New Sensors that have been extended attributes in the past (Thanks to @Thomas55555)
Open Topics:
Readme is not up-to-date with the new sensors from Thomas
Hello,
Unfortunately, it gives me the same. The country is Luxembourg, my application works, the PIN is also set.
They have the cars, who lists the two cars, but does not fill them.
Can't connect to MB APIs; Retrying in background
8:59:21 PM – (WARNING) MercedesME 2020 (custom integration) - message first occurred at 8:57:24 PM and shows up 9 times
Config entry 'mbapi2020' for mbapi2020 integration not ready yet; Retrying in background
8:59:15 PM – (WARNING) config_entries.py - message first occurred at 8:57:45 PM and shows up 2 times
Config entry 'mbapi2020' for mbapi2020 integration not ready yet; Retrying in background
8:57:24 PM – (WARNING) config_entries.py
I deleted everything, mercedes me token too, reinstalled everything but the error is the same. The code is also good, now I will change it to another one in the mobile app.
Can't connect to MB APIs; Retrying in background
10:50:45 AM – (WARNING) MercedesME 2020 (custom integration) - message first occurred at 10:50:06 AM and shows up 4 times
Config entry 'mbapi2020' for mbapi2020 integration not ready yet; Retrying in background
10:50:06 AM – (WARNING) config_entries.py
Error handling request
10:50:01 AM – (ERROR) MercedesME 2020 (custom integration)
ClientError requesting data from https://id.mercedes-benz.com/as/token.oauth2: 400, message='Bad Request', url=URL('https://id.mercedes-benz.com/as/token.oauth2')
10:50:01 AM – (ERROR) MercedesME 2020 (custom integration)
But the error is the same, I broke the MB2020 integration, I also deleted the token: .config/mercedesme-token-cache. I restarted HA. I reinstalled the integration, re-entered the data. He finds the account, who gives me the two available cars, I set the country code to LU in the configuration panel, I don’t mind the language en-GB, I enter the security pin.
2022-12-22 11:26:12.398 WARNING (MainThread) [custom_components.mbapi2020] Can't connect to MB APIs; Retrying in background
2022-12-22 11:26:22.402 INFO (MainThread) [custom_components.mbapi2020.client] WSL not detected - running in rlock mode
2022-12-22 11:26:22.402 DEBUG (MainThread) [custom_components.mbapi2020.oauth] Start async_get_cached_token()
2022-12-22 11:26:22.402 DEBUG (MainThread) [custom_components.mbapi2020.oauth] Start async_get_cached_token()
2022-12-22 11:26:23.541 DEBUG (MainThread) [custom_components.mbapi2020] VIN not found in masterdata. Used FIN WDD2229861A3xxxx instead.
2022-12-22 11:26:23.541 DEBUG (MainThread) [custom_components.mbapi2020.oauth] Start async_get_cached_token()
2022-12-22 11:26:23.644 DEBUG (MainThread) [custom_components.mbapi2020.oauth] Start async_get_cached_token()
2022-12-22 11:26:23.857 DEBUG (MainThread) [custom_components.mbapi2020] RCP supported for car WDD2229861Axxxxxx: False
2022-12-22 11:26:23.857 DEBUG (MainThread) [custom_components.mbapi2020] Init - car added - WDD2229861A366609
2022-12-22 11:26:23.857 DEBUG (MainThread) [custom_components.mbapi2020] VIN not found in masterdata. Used FIN WDD2220571Axxxxx instead.
2022-12-22 11:26:23.857 DEBUG (MainThread) [custom_components.mbapi2020.oauth] Start async_get_cached_token()
2022-12-22 11:26:23.963 DEBUG (MainThread) [custom_components.mbapi2020.oauth] Start async_get_cached_token()
2022-12-22 11:26:24.183 DEBUG (MainThread) [custom_components.mbapi2020] RCP supported for car WDD2220571A0xxxx: False
2022-12-22 11:26:24.184 DEBUG (MainThread) [custom_components.mbapi2020] Init - car added - WDD2220571Axxxxx
2022-12-22 11:26:24.184 DEBUG (MainThread) [custom_components.mbapi2020.oauth] Start async_get_cached_token()
2022-12-22 11:26:24.264 DEBUG (MainThread) [custom_components.mbapi2020.api] Traceback (most recent call last):
File "/config/custom_components/mbapi2020/api.py", line 89, in _request
resp.raise_for_status()
File "/usr/local/lib/python3.10/site-packages/aiohttp/client_reqrep.py", line 1004, in raise_for_status
raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 403, message='Forbidden', url=URL('https://bff.emea-prod.mobilesdk.mercedes-benz.com/v1/vehicle/WDF447813134xxxx/capabilities/commands')
2022-12-22 11:26:24.265 WARNING (MainThread) [custom_components.mbapi2020] Can't connect to MB APIs; Retrying in background
do you have ordered a new car or have a car without the communication module? (chip-shortage)
Please go to the option dialog of the component and add the VIN WDF447813134xxxx to the exclusion list.
The security code is not relevant here.
There is a car registered in your account where we can’t get the capabilities. I heard this once when the comms-module was not available when they build the car. (is an open bug in the github repo)
I have seen this multiple times. Sometimes this value is not delivered via the API on startup of HA. Could you restart your HA and check if it gets reported again? Sometime a restart after 24h brings the value back. I have not found a solution for this (or better I create the sensors only on startup and have no option to create sensors whenever the data comes available later on)
BR
Rene
PS: Few people have reported this for the starter_battery too (when the car was not moved for 3-4 days)
This was the solution, I put it in the exclusion list. It works now! Thank you very much. That little Bus wasn’t properly credited to my account, but that’s okay. That’s how it works now. Thanks again.
this is solved in the master branch now and will be part of the next release. I just ignore the error and write an info into the log that “Disabling of the capability check” is needed to use the car related services.
Thanks for reporting - however I do not get your “little Bus” statement.
do you have ordered a new car or have a car without the communication module? (chip-shortage):
I wrote there that there is a car in my system that was not properly entered under my account. It’s a company transporter, but I don’t need it. VIN WDF447813134xxxx - this is a company car, they wanted to put it under my account, but they didn’t complete the process at the Mercedes center. It’s not interesting anyway.
Hi Rene since I live in South Korea and my family really used well with your component, so thankful! however when its updated to 0.7.4, I can only see one device (there was 2 devices including all sensors). Would you plz check why the other device is not pop up?
to evaluate this, please enable the debug log for this component. Restart HA and share the log via private message or email (mbdev.jayjung (at) nulsch [.] de)
To enable the debug log, you have to add/change your ha configuration.yaml: