Mercedes Me Component

I would like to add my thanks to all involved in this brilliant integration!

We have just bought a C220 - our first Merc - and was very pleased to come across this HA interface. My efforts are not that aesthetically pleasing as yet so intend to use Dwains Dashboard with the yaml to get it looking much better. Please note that the entities in my case do not have the licence number as the unique identifier but the vehicles VIN.

Thanks again and especially for the comment from my wife: “How did you get all that info about the car??”!

1 Like

Is there a way to change the frequency the device tracker component updates? I’m trying to use the car as a trigger for a zone I set up. It seams to update every couple of mins.

Hi @yestrdave ,

this is not possible. The HA-location gets updated whenever the MB-System sends an update. (its push and not pull). I see an update every 1.5-2min (sometimes 5) in my environment.

BR
Rene

Can the geofencing from the ME app be used in HA?
That way the car could still be used to trigger “coming home” automations.

HEADS-UP

MB has changed the API endpoints again and adding the component does not work currently. I’m on it.

Update 1:
I have published a pre-release v0.7.0b2. Would be great if someone can test this too. (Esp. US/Asia - as have no cars in that regions)

See the message below for the actual status:…

4 Likes

Hi,

I have published Bugfix Release v0.7.0 to handle the API Url and some OAuth changes.

Feedback esp. from US/Asia Users is welcome.

BR
Rene

1 Like

Hi @DezeStijn ,

the master branch on github contains the code with a new sensor “geofence violation”. It will show the last event (Enter, Leave) for a car and the zone + time in the attributes. This is a pull-sensor and the integration asks the MB-API every 30 seconds for an update.

This will work for primary accounts only. So for cars where your account is a secondary driver, the integration can not access the data. (This is a MB api limitation)

I’ll not publish this as a new version in the next days as the MB-API change handled in v0.7.0 will produce some noise for sure. Feel free to test and share your feedback.

BTW: I’m not able to create geofence zones in the IOS MB-me app currently. Just the android version works for me.

1 Like

Hallo,
searching for this step amlost 3 days (so happy that I found it!), I would appreachiate to have that added to the documentation!

Thank you a lot!

Martin

@ReneNulschDE, looks like you created an amazing component and you are providing a great support for your users!

My name is Alex and I am fairly new to HA. Today is the first time I installed HACS and I came across your Mercedes Me Component. I would love to try it but I have to admit I seem to miss something. (it is a bit embarrassing, I am new to HA but I have a technical background, I feel like I should not have to write this message in the first place, but looks like I have to).

I have the latest HA running on a RasPi 4 with the latest HACS. I found your component and installed it via the HACS integration store as stated in the “Configuration” section of your HowTo. The very next line says I should use my MB-login to get a 6 digit code. Now this is where I am stuck. I do not get challenged to enter any credentials. There is no Mercedes Me in the side panel that I could click on. When I go to HACS/Integrations I see two entries, one is HACS and one is “Mercedes Me 2020”. If I click on “Mercedes Me 2020” I get to the “HowTo” page. I just can’t figure out where to enter any MB login credentials.
I also checked settings/system/logs but there are no error messages.

I am sure this is a dumb question but can you help me out, please?

Thanks,
Alex

Hi Alex,

Make sure that you restart your HA environment and refresh your browser window. Then go to HA, Settings, Devices&Services and click on Add Integration in the lower right corner. Search for MB and move on…

BR
René

Hi René,

thanks for not only helping me out in the middle of the night but also for confirming that I was right, this was a pretty dumb question. For all the other noobs like me out there: the solution was to first download the component via HACS and then to install just like any “regular” extension via “integrations”.

Works like a charm at first glance. Will definitely play with it more over the holidays.

Thanks again,
Alex

Hello
First of all I just want to say thanks and congratulate Rene for this integration. Wonderful job, especially for someone like me completely new to this world.
I was wondering if anyone else got any issues with the connection today. Everything was working fine for me until yesterday, but today (after a HA reboot) I seem to have lost connection with Mercedes API.
With the following error:

Can’t connect to MB APIs; Retrying in background

3:52:59 PM – (WARNING) MercedesME 2020 (custom integration) - message first occurred at 2:23:25 PM and shows up 71 times

Config entry ‘mbapi2020’ for mbapi2020 integration not ready yet; Retrying in background

2:23:25 PM – (WARNING) config_entries.py

I’m in Europe and running the following HA:
Home Assistant 2022.12.7
Supervisor 2022.11.2
Operating System 9.4
Frontend 20221213.1 - latest

Is this something from Mercedes side, or something that I’m doing wrong? Sorry if the question is dumb but again, I’m really new to all of this! :slight_smile:
Thanks!
Best regards

1 Like

Hi,

Please make sure that you installed the latest update of this component. You need v0.7.0.

However:
yes, I see this too. The lovely HTTP 418 Teapot Error is back. Let me check.

BR
Rene

Hi Rene
Wow, wasn’t expecting such a short answer :slight_smile: Thanks for the help.
Yes I have the latest version, I believe I even made the update fairly recently after the notification, so it must be what you are saying, and if you are experiencing the same at least I know I’m not doing anything wrong. :slight_smile:
Ok, I will be around. As said I’m really basic but if you need me to test something just say that I will try it.
Thanks!
Best Regards

Bugfix Release v0.7.1

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:

  • HTTP Teapot Error for REST MB-API Calls

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
  • As always, its not tested in the US/APAC region
3 Likes

Thanks, Could you check the new release v0.7.1?

Done!
It is fully working now!
Thanks a lot Rene, and Thomas55555.
Wonderful Christmas for everyone.

1 Like

Thanks to Rene for your quick processing
Unfortunately it doesn’t work for me either with v0.7.1.

Logger: custom_components.mbapi2020.oauth
Source: custom_components/mbapi2020/oauth.py:135
Integration: MercedesME 2020 (documentation, issues)
First occurred: 18:11:43 (9 occurrences)
Last logged: 18:13:43 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’)

What is your region?

My region is Germany