Mercedes Me Component

I have published a bugfix release v0.30.2:

:lady_beetle: Fixes

  • Login failed or Relogin after 429 failed: Acceptance of legal terms is required. (fix: #379)
1 Like

I have published an important bugfix release v0.30.4

Security Fix
A security vulnerability has been addressed in the MBAPI2020 component. Previously, sensitive authentication credentials could be exposed in plaintext within diagnostic reports.

Details

Affected Versions: v0.27.0 (2025.07) through v0.30.2
Issue: User passwords were potentially included in diagnostic output in cleartext
Impact: Users who shared diagnostic reports for troubleshooting could inadvertently expose their authentication credentials
Discovery: This vulnerability was identified during internal review (aka me)
Resolution: Diagnostic data is now properly sanitized to exclude

Recommendation
Users on affected versions (v0.27.0 - v0.30.2) who may have shared diagnostic reports should consider rotating their password as a precautionary measure. (I have deleted all links to the files on GitHub issues but I can’t guarantee that the files are not stored somewhere else…)


There was a non working version v0.30.3 available for some minutes… I have deleted this release

1 Like

Hi I’m new to HA and trying trying to find my way. I’ve got the MercedesME 2020 and custom vehicle info card installed on HA. I’ve followed the steps outline in the documentation and took particular note of not getting my account blocked so went ahead and created a co-user for HA purposes only.

After many hours to scratching my head as to my custom vehicle card was not really showing my much info at all, I looked at the integration elements and noticed only 8 entities are being pulled through in the hub

Out of interest, I decided to delete the hub and add a new instance, however, this time signing in with primary Mercedes Me user account and was surprised to see 48 entities and now my Custom vehicle Card is showing similar information as the documentation. I don’t want my primary account terminated so I’m really interested if:

  1. Others have experienced the same issue
  2. How have / can you overcome this issue

Hi @D_A_H ,

welcome in the HA rabbit hole…

The secondary user has access to all sensors/actions besides the geofencing data (geofence are defined in the MB-App and is not related to the HA device tracker)

I would propose that you login with your secondary account in the MB and check if you see the data and to make sure that the linking process was successful. (Sometimes this is not working well in the MB Portal) - In case you don’t see the data in the MB-App, just delete the linking and reinvite the account.

Btw: The account blocking is normal and will happen every 18h - this gets solved by the component automatically. So at least currently, you could use your primary account with this component too… (The hint for the secondary account was more relevant in 2024 and until July 2025)

Have fun

1 Like

@ReneNulschDE Thank you, I’ll give that a go. Indeed I’m truly in the rabbit hole of HA - so much to learn, and so much inspiration from the HA community too.

Best,
David

Hi Thomas,

I’ve tried numerous ways to get the python script to download the images, when that didn’t work I’ve tried the HA terminal - this did generate an json output of all the imageIds for my VIN. However, when I’ve attempted in as many ways as I can to download an image the saved file is 1kb and no data. I checked on Postman and keep getting a 500 error. Wondered if I’m doing something wrong if there is an issue with the API service.

Would appreciate any help/guidance. Ideally I would of liked to used the python script to cycle through and download all the images for me. I supposed I better caveat, I’m very new to all this and fumbling my way through online forums, help videos to try and make sense of it all.

Best,
David

The python script is not from me, it’s from @VietNgoc and it predates my tutorial.
But nowadays, you can use the integration from @ReneNulschDE to download the images by using the action mbapi2020.download_images.
Easiest way is via Developer tools → Actions of Home Assistant.

2 Likes

Hello @ReneNulschDE - thanks a lot for writing and maintaining this component! I recently obtained a new Mercedes CLA and I was happy to see I can connect it to Home Assistant!

I was wondering if there is a way to see (e.g. sensor) when the last communication was with the car. My car is sometimes going into limited communication mode (maybe due to coverage) and I would like to find out when that happens. Since you are probably talking to the same API as the mobile app, that would at least give me some pointers. (My car didn’t want to pre-heat the last few days in the snow - nice eh… :))

Thanks!

Hey @TheAutomator ,

as far as I know there is no valid sensor to monitor this out-of-the-box (I have not seen any api value for this too). The odometer sensor has an attribute vehicleDataConnectionState (bool) but this will go to false some minutes after you locked your switched-off car.

One idea:
Create an automation and call the service/action mbapi2020.windows_close every 10 minutes. Check then the attribute “last command state” of the sensor “car” if it was successful.

You should check if the car is in the right zone, the windows are closed before you execute the command for security reasons to make sure that no pet/human will loose a part of the body…

If the command is successful after 2min a valid connection can be assumed. In case you get an error the connection is poor or the starter battery/battery is state yellow/red…

Keep in mind that it will drain your battery…

Thanks for the tip Rene! Hmm that’s a bit tricky indeed. Also getting the timestamp of when the MB integration was able to get data from the car would also suffice for now. Is there a sensor that provides that info?

The sensor “car” has an attribute “Last message received” - internal name “last_message_received”

1 Like

Perfect, that was it! Thank you! I created a template sensor for it and added it to my dashboard. Would be interesting to have this sensor as part of the integration under diagnostics as others might be looking for it too.

I recently noticed that the car’s Internet connection is sometimes lost.

There are twonways I see this. First is that it keeps ‘optimising’ my route without ever reaching the final trajectory (incl. eg charging stops), and secondly I don’t get new data fed into this component, even when the car is parked at home and could connect to the house WiFi (to be checked if parking spot has an effect).

Am I the only one noticing?

Keep up the good work Rene!