Mercedes Me Component

Hi, Can you switch on the debug log and check what messages the MB API gives back when you switch on the preconditioning? I have no access to an EQV - it was tested with EQA, EQC and EQE only (and the hybrid-cars like GLCe). Feel free to share it via private message or email (mbdev.forum [at] nulsch.de)

Looks like the chargingPower and chargingactive attributes are misbehaving again.
At random the attribute would go missing, causing my templates to fail/become unavailable (“fixed” now by setting default to 0 in float(0)).
But I’ve noticed my Energy dashboard didn’t show any energy consumption for my car in May even though I did charge it.

My setup to monitor EV energy consumption is as follows:

template:
  - binary_sensor:
    - name: Car Charging Active
      unique_id: car_charging_active
      device_class: battery_charging
      state: "{{ state_attr('sensor.mycar_range_electric', 'chargingactive') }}"
      # This attribute below is redundant
      attributes:
        chargingPower: >
          {{ states("sensor.car_charging_power") }}
      
  - sensor:
    - name: Car Charging Power
      unique_id: car_charging_power
      unit_of_measurement: kW
      device_class: power
      icon: mdi:ev-plug-type2
      state: >-
        {%- if is_state('binary_sensor.car_charging_active', 'on') -%}
          {{ state_attr("sensor.mycar_range_electric", "chargingPower") | float(0) }}
        {%- else -%}
          0
        {% endif %}
    - name: Car Charging Power Home
      unique_id: car_charging_power_home
      unit_of_measurement: kW
      device_class: power
      icon: mdi:ev-plug-type2
      state: >-
        {%- if is_state('device_tracker.mycar_device_tracker', 'home') -%}
          {{ states("sensor.car_charging_power") | float(0) }}
        {%- else -%}
          0
        {% endif %}

sensor:
  - platform: integration
    name: Car Charging Energy
    unique_id: car_charging_energy
    source: sensor.car_charging_power_home
    method: left
    unit_time: h
    round: 2

Has anyone figured out what the different values of “Car” mean? Mine seem to go through random states all by itself… Some when I’m driving it and some when its just sitting there while I’m asleep.

Hi @devpeeps ,

The sensor shows the count of full data updates received from the MB servers since HA restart. Yes, totally senseless for a normal user and the attributes of this sensor are more important. I just had no idea what to show when I created this sensor. I just wanted to store the results of Service calls like door unlock. I have an automation in my dev environment that gives me an alarm if the sensor does not change after 4 hours as an indicator that something is wrong with MB-Servers or my code.

BR
Rene

Ok Great. that makes sense and is a good idea…

Looking into what the values are for windowsClosed:
attributes:
windowstatusrearleft, windowstatusrearright, windowstatusfrontright, windowstatusfrontleft

I can tell you that so far it seems that 2 is closed. If it follows suite with locks I will bet there are states for all opened, all closed, partially (open/closed)… I am going to experiment but I’m hoping someone else already figured it out and we can update the README.

For the attributes:
* Window open state front left
* 0: “window in intermediate position”
* 1: “window completely opened”
* 2: “window completely closed”
* 3: “window airing position”
* 4: “window intermidiate airing position”
* 5: “window currently running”

Reference:

did sensor.g_xxx_odometer attribute “serviceintervaldays” change into “serviceintervaldistance” ?

Looks like the chargingPower entity has gone haywire again. Happens every now and then, but as a result I lose my monitoring of the car’s power consumption at home.
image

And looking at the sensor’s history, it’s been broken for quite some time

Just tried to set this up, it sends the pin code to my email no problem but then I just get an error.

Logger: custom_components.mbapi2020.oauth
Source: custom_components/mbapi2020/oauth.py:105
Integration: MercedesME 2020 (documentation, issues)
First occurred: 11:09:21 (2 occurrences)
Last logged: 11:09:25

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')

Reinstall fixed it :slight_smile:

1 Like

Hi @Mobiledude ,

I can’t see this behavior in my data. But we had it in the past that the servicesdata was not provided or wrongly provided via the MB API. I propose you check it again after restart of HA.

BR
Rene

Hello,
I just noticed that the sensor.oil_level is no longer available for me.
Does anyone else have this problem?

Hi,

Yes, this is the case currently. The MB Api does not provide the value currently or anymore. See this GitHub issue too

Hi,
I’m trying to create toggle switch for the PreCondion,
I managed to create a simple switch -

switch:
  - platform: template
    switches:
      preheat:
        friendly_name: "*"
        turn_on:
          service: mbapi2020.preheat_start
          data:
            vin: W**4
        turn_off:
          service: mbapi2020.preheat_stop
          data:
            vin: W**4```

how do i combine those?
And now i want it to be dependet on the sensor, so if the precond is active the switch will be on and if not it will be off


platform: state
entity_id:
  - sensor.w*4_range_electric
attribute: precondActive
from: "false"
to: "true"

Also, installed the Dwains - getting only partial
image

edit - I’ve changed some, and getting more but sitll missing low_coolant level - guess since it doesnt exist on electric vechile - anyone changed it to something else?

image

Will this announcement affect our integration? I assume it will :frowning:

Since June 2020, we have been offering you the opportunity to access selected data from your own Mercedes-Benz vehicle with the #BringYourOwnCar initiative.

During this time, the underlying technology has changed significantly and the BYOCAR infrastructure no longer meets our current technical requirements. Therefore, we have to shut down all BYOCAR data products by August 31, 2023. Due to technical conditions, we will start the stepwise sundown on 28.08.2023 already.

We thank all users for their commitment to BYOCAR in the past. Of course we are working on a new solution to experiment with your own Mercedes-Benz and will keep you informed via this news section and our newsletter.

Thank you for your understanding.

This change will not directly effect this integration. I do not use the BYOCAR here. The component simulates the MobileApp.

However, it could be that MB changes the MobileApp stack too… Lets see - We have adopted to multiple changes in the last years :slight_smile:

1 Like

Ist there a way to use the Google Home card to unlock the car?

It says “No PIN set. You can set a PIN in the partner’s app.”

Unlocking with HA works perfectly.


Can you share your card configuration? and do you have set the pin in the options of the MB integration dialog?