Thx. I’ll try that this evening.
Yes, it came up immediately. Thanks for the help!
Looks I’m doing something wrong. I get an 401 Unauthorized error. Should the path and VIN include the XXX- and -XXX or not?
What is the sonsor car? I just saw in my logg that this sensor changes a lot.
I haven’t seen this in the log befor…
The sensor is named
Hi Vincent,
please start the service “mbapi2020.refresh_access_token” before you start the download command. This makes sure that the access token is uptodate.
Sorry, missed this in my answer.
BR
Rene
Ah, missed that one. Thanks!
I guess that for me, as a “normal” user, I can disable this sensor without braking anything?
Yes. No problem - Its an diagnostic sensor and the values are not recorded.
Does anybody know where I can find the days/kilometers till service?
It’s an attribute of the odometer. Attribute name: “Serviceintervaldays” (if available for your car…) - serviceintervaldistance is not delivered by the api (at least for my cars) and thatswhy removed
For my car I receive an attribute called “serviceintervaldistance” in the messages folder.
"serviceintervaldistance": {
"timestamp": "1675113718",
"int_value": "10535",
"timestamp_in_ms": "1675113718000",
"display_value": "10535",
"distance_unit": "KILOMETERS",
"service_ids": [
505
]
},
This is the data I get. display_value
and int_value
are equal to my data in the mercedes me app and the in car data.
Edit: Just changed in const.py
& car.py
all the results serviceintervaldays
to serviceintervaldistance
. Now the data is shown under odometer.
Ok, thanks for sharing. I’ll add it in the next release.
Hi,
Now it seems to be connecting and all but I can’t find the downloaded file anywhere.
It seems to me that the download isn’t done.
Regards,
Vincent
Ok. Found the zip-file. What other views are possible to download?
Regards,
Vincent
Can this component track the energy consumption while charging?
I’ve seen the chargePower attribute (in kW), but I’d like to get the total energy consumption (in kWh) for each charging session so I can use it in the Energy Dashboard and other energy monitoring dashboards.
OK, that’s what I did in the end.
But I was kinda hoping the car would report this from itself.
However, I did add a small workaround as I noticed chargingPower
is not set after a HA reboot until the next charge.
template:
- sensor:
- name: car_charging_power
unit_of_measurement: "kW"
device_class: "power"
icon: mdi:ev-plug-type2
state: >
{% if is_state_attr("sensor.plate_range_electric", "chargingactive", true) -%}
{{ state_attr("sensor.plate_range_electric", "chargingPower") }}
{%- else -%}
0
{%- endif %}
sensor:
- platform: integration
name: car_charging_energy
unique_id: car_charging_energy
source: sensor.car_charging_power
method: left
unit_time: h
round: 2
You could also another check to the car_charging_power
template that checks if the car is “home” so you only measure charging sessions at home.
Hi,
please take a look on the Vehicle Image API - Mercedes–Benz /developers – The API platform by Mercedes-Benz
I don’t drive a Mercedes yet, but did someone already find a way to use the MBUX Smart Home Integration to command their Home Assistant instances?
It looks like they only partner with Bosch, Hue, SmartThings and tp-link at the moment, but possibly someone clever has found a way to use one of these as an entry point to HA?