Mercedes Me Component

Thanks, much appreciated.

Thanks for a great component! I was wondering – has anyone made some work to generate trips from this data with distance/kwh/avg consumption for each trip/day etc? Perhaps with start and end locations? The data should be present in the HA db?

Ended up coding a small script that relies on HA rest api:

$ python eqb_log.py
2025-01-26 16:37-16:40   1.0km 0h03m  0.3kWh 34.3kWh/100km
2025-01-26 16:56-16:59   1.0km 0h03m  0.2kWh 18.6kWh/100km
2025-01-27 08:06-08:22  11.0km 0h15m  2.1kWh 19.1kWh/100km
2025-01-27 15:31-15:45   9.0km 0h14m  1.7kWh 19.1kWh/100km
2025-01-27 16:41-17:08  10.0km 0h26m  2.3kWh 22.7kWh/100km
2025-01-27 18:17-18:35   6.0km 0h17m  1.1kWh 17.6kWh/100km
2025-01-27 18:35-18:48   5.0km 0h13m  1.0kWh 19.3kWh/100km

Daily Summary:
2025-01-26:    2.0km, 0.5kWh,   26.5kWh/100km, 0h06m
2025-01-27:   41.0km, 8.0kWh,   19.5kWh/100km, 1h27m
Done EQB in 0.58 seconds.

Can you share?

Just got this error today:

Logger: custom_components.mbapi2020.webapi
Källa: custom_components/mbapi2020/webapi.py:119
integration: MercedesME 2020 (dokumentation, ärenden)
Inträffade först: 11:57:08 (8 händelser)
Senast loggade: 12:49:53

Error requesting: https://bff.emea-prod.mobilesdk.mercedes-benz.com/v2/vehicles - 418 - 0 -

We have multiple problems, MB has disabled the PIN auth and the minimum req version has changed too.
Please do not add additional “me too” comments. Just use the thumbs up…

Please don’t delete the integration or your auth settings…

I’m on it and have an idea already…

Further progress will be communicated here and in this forum

7 Likes

For all who have not deleted the integration or removed the auth settings: I have published a version v0.22.0 (please do not delete the integration as the re-authentication will not work)

for the others: please wait… It can take some days (Looks like that I will publish a solution for user with access to an device with MacOS first, Windows will follow later…)

Btw: Github has some major problems right now…

5 Likes

Unfortunately the upgrade to 0.22.0 stalled for me at 40%. Multiple times. And the old integration did not respond anymore. So I removed it, to then come here.

Thanks Mr. Nulsch. I’ll keep watching this thread.

I have published a beta release " v0.23.0-beta.1 - New authentication process"

MB has disabled the email/pin authentication process. This release brings a new way to add the needed login information.

Now the input of an Access- and Refreshtoken is required.

See here for help regarding the token creation. (Docs are work in progress)

3 Likes

Thanks for your efford.
Just a quick question: For windows, regarding the .NET Core 8 requirement: Do I need the SDK, or the runtime?

EDIT:
Firefox:

Beim Verbinden mit file.nulsch.de trat ein Fehler auf. Eine benötigte TLS-Funktion fehlt.

Fehlercode: MOZILLA_PKIX_ERROR_REQUIRED_TLS_FEATURE_MISSING

runtime should be enough

You can download the file from github too, Release v0.23.0-beta.1 - New authentication process · ReneNulschDE/mbapi2020 · GitHub

Edit: I have changed the wiki page, download from github now…

TLDR: You need the .NET Runtime 8.0.12 version.

On my installation (Windows 10 with apparently .NET 6 installed), downloading and installing the ASP.NET Core Runtime 8.0.12 was not the one required:

Architecture: x64
Framework: 'Microsoft.NETCore.App', version '8.0.0' (x64)
.NET location: C:\Program Files\dotnet\

The following frameworks were found:
  6.0.16 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

Learn about framework resolution:
https://aka.ms/dotnet/app-launch-failed

To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=8.0.0&arch=x64&rid=win10-x64

Following the link from the error message, and then clicking on the Run console apps led me to the dotnet-runtime-8.0.12-win-x64.exe, which seems to be the same as the file from the .NET Runtime 8.0.12 on the download site the Rene linked.

EDIT: Downloading the SDK works also.

Thomas

1 Like

On my Windows 11 the 8.0.12. version was already installed.
I generated the 2 tokens, updated to the beta and everything was working again.
Thank you so much for the quick fix. :heart_eyes:

I updated from 0.22.0 to the new beta, but I didn’t need to enter the generated tokens. Is that normal?

Yes, as long as you have valid auth settings.

the exe doesn’t launch a browser window here - I’m on Win 11 x64 (intel processor) and selected the net8 x64 zip, did I make a mistake there?

Start the exe from the command line/terminal and share the output, please

Fixed it - I had installed the core but also had to install the runtime.
Matter of misunderstanding the instructions I guess…

I have published a new release: v0.23.0 - New way of authentication

MB has disabled the email/pin authentication process. This release brings a new way to add the needed login information.

The input of an Access and Refresh Token is required, now.

See here for help regarding the token creation. (Docs are work in progress)

It is not needed to delete your integration/authentication on upgrade. The new procedure is needed only when you have to update your access tokens in case of failures…

Thanks to my sponsors and all the testers of the beta version + the new token tooling.

3 Likes

Guys, please help. I can’t see any entities in my integration, VIN is added.