Mercedes Me Component

Hi @Pedroz84 ,

error_code 4202 means “Can’t execute action - reason: IgnitionStateOn”

The service is blocked by the backend when the engine is on.

Based on this comment in some old sample code, the following prechecks are done by the backend:

    /// Preconditions:
    /// * Vehicle must be parked
    /// * doors must be locked and closed
    /// * ignition off.

Hi!

I hope you had wonderful christmas?
I have a question to preclimate / auxheat:
What’s the difference here? I guess my car has both, preclimate and auxheat. When i’m turning on the preclimate via the Integration, the Phone App states “aux heat&preclimate” is on, the sensor in HA says auxheat “off”. The same with auxheat, preclimate in ha HA is “off” and the Phone App states “aux heat&preclimate” is on. The car model is a c300d.

Thanks in advance!

Hi everyone, I released a new edition of the card… :tada:
This release introduces exciting new features, including section order customization, enhanced map functionality with address display, and support for picture templates in button configurations, fix and redesigned minimap popup…

Enjoy the new features and improvements! :rocket:



benz-map-anim

2 Likes

Hi @LongDong ,

preclimate (aka pre-entry climate control aka pre-heat) is used to heat/cool the car before you enter the car (for example to a given departure time) and the battery is used → afaik available for eq* and hybrid cars only.
Sensor in mbapi2020 component: preclimateStatus

auxheat (aka Auxiliary heat aka secondary heater aka “Standheizung” in German) is a sendary combustion engine to heat the car when the engine is not running. → afaik available for gasoline and hybrids only and most often a paid extra.
Sensor in mbapi2020 component: auxheatstatus

In case this is different for your car, please send me a diagnostic report via email to [email protected] and we can check this.

1 Like

I just installed this integration and lovelace card for my 2015 C220 D and it works flawlessly. I don’t subscribe to any paid MB services but I was surprised by how much useful telematic data was exposed through the integration. I’ve owned the car for almost 10 years and I didn’t appreciate this was always possible! Many thanks to the developers :grinning:

2 Likes

Hi,

I have a SmartEQ, and unfortunately, since 01/01/25, the official app has been discontinued, and the custom SmartEQ integration no longer works.

With this Mercedes ME integration, I get an error in the “Charging Power” value, and the “Charging active” and “Precond active” statuses are missing, which were present in the custom SmartEQ integration.

The last time I used the custom SmartEQ integration (about a year ago), the “Charging Power” value was indicated correctly.

Link JSON file for debugging: https://pastebin.com/mCj7WFP2


I hope this helps! If you need any further assistance, feel free to ask.

Hi @drd4x , was the diagnostic report created while the car was charging?

Hi,
no, the diagnostic report was done with the car not charging. However, even when it is charging, the “Charging Power” error is displayed.
If you need, I can also perform the diagnostic report with the car charging.

yes, please. thx

I checked one of my Test Smart Cars and charging power gets reported. The “err” when not charging is a bug and will get fixed…

So please check again when your car is charging.

image

Thank you for your interest!
The car is currently charging, but it still shows: Charging Power Error kW.
Here is the diagnostic report with the car during charging: https://pastebin.com/1uxz8PLW

Ok, based on this dataset charging_power is not delivered by the api for your car.

Next try:

  1. Go to the “Configure”-dialog of this component and activate “Debug only: Enable save…”, click “Submit”
  2. Make sure the car is charging.
  3. Wait 15min
  4. Go to the “Configure”-dialog of this component and deactivate “Debug only: Enable save…”, click “Sumbit”

Compress all files of the folder %HA-ConfigFolder%/custom_components/mbapi2020/messages. Send the zip-file to [email protected]

Hi, I’ve sent you the email with the logs attached.

Thanks for the logs. I have sent you an answer. For visibility for other Smart users:

The MBAPI does not deliver any charging_power information for this Smart anymore. However, I have seen at least one other Smart in the last 24 hours with the data available. I do not know why some Smarts are affected and some others not.

@VietNgoc What are you using to reverse geocode the map address? The locations on my map (UK) sometimes don’t make a lot of sense as the city or town isn’t shown.

it fetch from nominatim api service
https://nominatim.org/release-docs/develop/api/Reverse/

All right, thank you for your availability. I can manage without the “charging_power” value, but is it possible to include “Charging active”? It would be very useful for my automations to have information about whether charging is active or not.

Also, the “charging_status” value is not delivered by the API for your Smart. As a workaround: Setup an automation that sets a helper sensor when the soc-value increased for example x-times in a row in y minutes. (check your soc history to find a good value for x and y)

Ah, ok. It would be clearer if it had the city as well as a lot of the time I don’t recognise the neighbourhood names it uses.

You can try this url through the browser, fill in the lat lon… and see what data is returned to you. When I created this method, I used only my own data, maybe in the UK it will be different… In the case of the card, there is sometimes a substitution of City for Suburb, if it is in the data…

https://nominatim.openstreetmap.org/reverse?lat=<value>&lon=<value>&format=jsonv2

Looking into it more, it’s very complicated for the UK! The common local designations are different depending on the size of locality - village, town or city.

For my location it comes up with

<neighbourhood>Primrose</neighbourhood>
<suburb>Moorlands</suburb>
<city>Lancaster</city>

No one here would use Primrose or Moorlands to describe where they live, just the city name. Your card is showing the suburb but not the city. I’ve noticed that in other locations as well.

OSM’s own example is

<village>Wylde Green</village>
<town>Sutton Coldfield</town>
<city>City of Birmingham</city>

Locals would use the village name or Sutton Coldfield - and may say Birmingham to describe the wider area.

Another example are the BBC offices in Manchester:

<office>BBC</office>
<neighbourhood>MediaCityUK</neighbourhood>
<suburb>Salford Quays</suburb>
<town>Eccles</town>
<city>Salford</city>

It’s known as MediaCityUK. People may use Salford Quays or just Salford but never Eccles.

Finally - to complicate things even more - there are only 76 cities in the UK so you don’t always get a city tag:

<road>Station Hill</road>
<suburb>Caversham</suburb>
<town>Reading</town>
<state>England</state>

How about showing suburb, city, or suburb, town if no city?