Mercedes Me Component

The SOC was at 68% when I tried. Turning the heater on and off worked well in the official app.

Please let me know if there is anything I can do to assist with debugging.

Hi @ReneNulschDE
very appreciate for the integration, itā€™s really cool if I can call siri to unlock my car.
I tried 2 days to configure the Mercedes Me 2020 integration but failed.
I donā€™t know if this is because my region is China.
I installed it from HACS, and then configuration- integration - add integration.
And I put my client ID and secret which I get from Mercedes Benz developer, also put my PIN from MB app.But after reboot HA,I still cannot find any devices or sensors or switchā€¦
By the way, I can use MB mobile app to lock/unlock my car.
Is it because my region is China?
Very appreciate if someone can reply meā€¦
many many thanks.


image

Hi Jenny,

the component MBAPI2020 does not support China currently. This is in the making but not working yet.

Take a look on this repo: GitHub - gnep88/mbapi2020: Custom Component to integrate MercedesME devices into Home-Assistant
The user has adopted the component for the Chinese market. (Use the europe region in the config flow)

Hint: You have to use your mb-email address not the client-id, keys. Check the readme again.

Hi Rene,

thanks for the hint regarding the VIN, hadnā€™t considered this and edited now.
The formatting solved the problem, now the pre-heating and -cooling is working, thank you very much.

Have you faced issues with using Siri voice commands for locking and unlocking the car?
Using the Apple Home app locking and unlocking works well, but when using the Siri voice command for it (still in the HomeKit environment) sometimes it seems to switch the functions (trying to lock when command was to unlock and vice versa).

Best regards

David Scheffler

Hi David,

Iā€™m not using Siri so often, but will it try it in the next daysā€¦ so no valid input from my side - maybe someone else has input.

BR
Rene

Very Appreciateļ¼Œ
Iā€™ll try it right now~

Hi Rene,

still no device or entities at all :sob:
I installed the integration you gave me ,selected Europe
1.install the integration
2.fill my mb-email address
3.fill pincode received by email
4.restart HA
Should I add any code into my configuration?

Hi @ReneNulschDE , @Giorgio_Ravera ,
So, I didnā€™t do any extra configuration. I installed HACS and added mbapi2020 integration, used my MB-login and thatā€™s it. Lock/Unlock works from mbapi2020 on Homeassistant.
Then I added the Domains and Entities in HASS Bridge. But I canā€™t even see anything in Home app.

Hi,

did you try to set a correct country? I cannot remember in detail what I did when installing, but in fact I changed also the country code and the locale.

so for me its (configuration button for the integration)
Country Code: DE
Locale: de-DE

As far as I remember I also needed to change that. Furthermore have you enabled ā€œnew added entitiesā€ with the option menu? (three dots)

And make sure you connected your phone app with the car before. Not sure about your model and year of the car. But in my E Class I can see the Me symbol for my user on the screen. You can also check on the website of Mercedes if your account is linked to Mercedes Me.

EDIT: did you clean your browser chache as well?

Hi Jenny,

did you a restart of HA after the installation (P1)? I propose that you resetup the integration:

  1. Remove the integration in the HA, Devices& Services page
  2. Stop HA
  3. Delete the folder custom_integrations/mbapi2020
  4. delete the file .mercedesme-token-cache in your ha-config folder
  5. Redownload the ā€œChinaā€ customized package from GitHub - gnep88/mbapi2020: Custom Component to integrate MercedesME devices into Home-Assistant and copy the folder custom_components in your HA config folder
  6. Start HA
  7. Refresh your Browser with a full reload (Ctrl-F5 in Chrome)
  8. Add the integration via HA devices&services

If this does not work, you can in get contact with the developer of this integration via an issue in my repo. The user Gnepp88 is reading the thread.

I have no access to any Chinese car and canā€™t help so much here. If you would like to share your car-data with me, send me a private message.

BR
Rene

BR
Rene

Hi @ReneNulschDE

Is there a way to see if preconditioning schedule is active and when itā€™s planned to start?
I currently have a button in my dashboard to start preconditioning and a input_time to schedule it, but Iā€™d like some way to confirm itā€™s scheduled.
Also would be nice to display this somehow.

image
The bottom 2 Tiles were for debugging purposes. If you want the big button on the right to correctly display preconditioning is running, you need to check both precondNow (on if triggered by button) and precondActive (on if triggered by timer).

Hi @DezeStijn,

currently this not available as a sensor or attribute. (but delivered from MB-side)

As the data structure for these weekly profiles is quite complex, I could do the following:

  1. Add a new sensor ā€œdepartureTimeā€ - shows the next planned departure time (unknown if not set)
  2. Add a attribute ā€œdepartureTimeWeekdayā€ to the sensor - shows the (next) weekday for the planned departureTime (Value is a number between 0 and 6, 0=Monday, 6=Sunday)
  3. Add a attribute ā€œprecondAtDepartureā€ - shows True or False
  4. Around 3-5min after the last planned departure date/time the new one will show up.

Would this help?

BR
Rene

New release: v0.8.2 - Statistics, DepartureTime, Token Deletion

New Sensor:

DepartureTime - Shows the next planned Departure Time (relevant for Preheating)

  • Attributes: departureTimeWeekday (0=Monday, ā€¦, 6 = Sunday)

Other Changes:

  • The ā€œConfigureā€-dialog has an option to delete the existing token file
  • The DoorsLock Service has a optional field for the Security-PIN
  • The Odometer Sensor has a new attribute ā€œserviceintervaldistanceā€
  • The consumption sensors are supporting long term statistics

New release: v0.8.4 - Fix Config_flow

Bugfix:

  • Fix Error in Config Flow ā€œNameError: name ā€˜_LOGGERā€™ is not definedā€

Hi @ReneNulschDE

Iā€™ll check out v0.8.2 to see how it looks like now.
But wouldnā€™t make it more sense to expose e.g. a nextDeparture sensor that provides the next (planned) departure time as yyyy-mm-ddThh:mm (UTC or localised with timezone)? That can easily be parsed in HA using strptime() into whatever data the user needs (data, time, weekday, ā€¦).

Hi All,

I was wondering if i could get some help with setting up charging Scheduling (by setting the max charging limit) via homeassistant and Mercedes Me integration for my EQA. Firstly, is it possible to do this through Mercedes me?

Iā€™ve looked in to what is available and can see ā€œmaxSocLowerLimit: 50ā€ ā€¦ However, this doesnā€™t seem to be in line with the app. when i change the charge percentage in the app it doesnā€™t update here. I also wasnā€™t able to update the value. This is the first time iā€™ve ever tried to set the value of an entity (outside of the basics) via home assistant so i may be doing something wrong.

Any help would be greatly appreciated.

Thanks
Asim

Hi Asim,

you canā€™t set the maxSocLowerLimit with this component currently. However the maxSoc can be configured with HA Service ā€œMercedesME 2020: battery_max_soc_configureā€

Thatā€™s exactly what i was looking for! Thanks

See Manage Mercedes EV battery charge target from Home Assistant :: Sequr for an example.

I have however noticed that mbapi2020.battery_max_soc_configure wonā€™t update the maxSocLowerLimit attribute of sensor.licenseplate_state_of_charge. So that part of my automation doesnā€™t fully function yet.

2 Likes

For some reason tankLevelAdBlue is not showing up as a sensor. All other info is visible. Any one can help me?
(and yes, my car has adblue)