Mercedes Me Component

I found an interesting way Mercedes handles Mercedes Me accounts (if one has changed their user e-mail address affiliated with the account).

I had a car under my company account and couple of months ago moved the Mercedes Me account to my personal account (ie. essentially changed the master user e-mail address). My iOS app showed that the account was indeed under the personal e-mail account.

Signing in to the component with my personal e-mail address, it did not show any cars. When I signed in with my company e-mail address (one that was not affiliated with my acct according to the iOS app + online service), I was greeted with my car. It seems that Mercedes does not migrate the attachment from the original e-mail address. Just a heads up if someone encounters the same issue as I was not able to find this in the forum.

Thanks Rene for your work, much appreciated.

Great component! Works perfekt with my E220d 4-matic in Sweden.

I’m kind of new to all this with HA.
I’ve managed create an automation that turns on the auxheater.
So right now I have 5 automations that turns on the auxheater depending on the outdoor temperature.
But Mercedes have some automation in the car, that turns on the auxheater at the right time when I set a departure time.
Is it possible from HA to set the auxheater timer?
Every monday, wenesday and friday I leave home att 07:30 and tuseday and thursday I leave at 07:00
In my car I have Auxheater timer 1 set at 07:30 and auzheater timer set at 07:00, and that works perfect. At least if I remember to activate the timer.
This morning it was -21 degreas C, and last night I forgot…

So preferbly I would like to check at about 06:00 if the temperature is below 0, the activate the the timer for the coresponding day.

I know I can see the the attributes for what timer that is set, and I can see the attribute for what time each timer i set to.

Is it possible to sent updates to these attributes to my car?

Greatful for any answer or direction wher I can learn more…

///Peter!

Hi @pethson,

not sure if I understand the problem in total. Here is an example to start the heating on Mo, Tu, Th, FR at 7am if the outside temp is below 10.

alias: 'Start Auxheat (mo, tu, th, fr) outside below 10'
description: ''
trigger:
  - platform: time
    at: '07:00'
condition:
  - condition: time
    weekday:
      - mon
      - tue
      - thu
      - fri
  - condition: numeric_state
    entity_id: sensor.dark_sky_temperature
    below: '10'
action:
  - service: mbapi2020.auxheat_start
    data:
      vin: Wxxxxxxxxxxxxxx
mode: single

BR
Rene

HI all, I have been able to successfully add my car to HA - thanks to the excellent work you have done.

I only have one newby question about the sensor.PLATE-NUMBER_car apparently not documented and with a lot of variable values in the day/night, even with the car parked and locked (example below - numbers from 1 to 10...)

thanks 
Rob

![image|534x176](upload://a1LhZswUjV2j2qw9LrSIuHU0iKy.png) 

Hi @rcampice,

this the sensor shows the received messages from the server. This is not optimal - I know but I had no better idea what I could take as the primary sensor value. Let me know if you have ideas.

For this sensor the attributes are more important…

BR
Rene

1 Like

Thank you @ReneNulschDE for your answer.

Thats about what I figured out my self.
But thiis starts the auxheater at 07:00 which is OK when I leave at 07:30

My question was more if it was possible to activate the preset timer for the auxheater.
I already have one set to 07:00 and one to 07:30, and I forget to activate it every now and then.

The workaround is to set up a sensor that checks the outside temeperure and depending set up different automations thats start the auxheater at different times to get the car warm before I leave.

If I could activate the preset timers, they will automaticly start the auxheater in time to get the car warm.

By starting the auxheater manualy I probebly will start the heater to early and by that drain the battery more then necessery.

So my question is more like if you can change the attributes for the auxheater, or is that read only?

///Peter!

I have an GLC, and have the same problem only mbapi2020.preheat_start_departure_time that works.
Found any solution?

is it possible to use input_number or input_datetime in service data field?
Ex;

vin: Wxxxxxxxxxxxxxx
time: ‘input_datetime.departure_time’

Hi @Jurgmaister,

the input for “time” is minutes after midnight. You can calculate this based input date_time. Here an easy example:

Minutes after midnight {{ now().minute + now().hour * 60 }}.

If you use a input_datetime sensor than divide the time by 60 (assuming has_date: false)

{{ (state_attr('input_datetime.i_datetime', 'timestamp') / 60) | round }}

See here on how to use templates in the service-call dialog

image

Hope this helps, if not try to reformulate your question.

1 Like

Hi @pethson,

I can implement this configuration service, but i have not seen a reason yet. I assumed that everyone would use a temperature sensor to decide if I would like to start the AUX_HEAT (based on my travel calendar of course).

Let me check over the weekend, if I can implement the configuration service. I have no access to a car with AUX_HEAT, thatswhy its not so easy.

BR
Rene

1 Like

Perfect! Thanks so much

Let me know, I would love to be a test pilot.

///Peter!

Hi @pethson,

I have updated the repo (no new release yet) with a first test version of the AUXHEAT_Configure service. As written, I had no chance to test it.

I hope the parameters & description are enough. Let me know your results.

Cool, I’m so happy mbapi is being continued. I’m missing the fuel range sensor though (n km autonomy left).

Can I place this feature request here @ReneNulschDE? I’m confident this sensor is exposed for A180 2019 built in Europe.

sry, +1 sensor request: I also miss average fuel consumption (l/100km)

how can I get “car_service_days”?

I don’t found service_days in my states

hi @inganyoyo, welcome in this thread.

The odometer has an attribute “serviceintervaldays”. The visibility depends on your car/account/region.

Take a look here to get an idea how to create a special sensor for an attribute.

Hi @andilge,

the sensor odometer has these as attributes named rangeliquid and liquidconsumptionstart or liquidconsumptionreset.

The visibility depends on your car/account/region.

Take a look here to get an idea how to create a special sensor for an attribute.

yup, found it. tnx for this swift Erklärung, @ReneNulschDE

Sorry I was to bussy this weekend, but I will give it a try to night…

Tanks a lot in advance!