Mercedes Me Component

@ReneNulschDE Thank you for this component! I have everything except for the Aux Heat working on my EQC. I have added an issue on GitHub too, but thought I’d mention it here in case anybody else has this working and can tell me what I am doing wrong. Unlocking the doors and getting info is no problem, but the Aux heat switch (which should work as aux cool in the summer) is not doing anything.

How do you have it set up? You know it’s a service call I presume. Here’s a simple on/off on lovelace:

  - type: picture-elements
    elements:
      - type: service-button
        title: Deactivate
        service: mbapi2020.preheat_stop
        service_data:
          vin: xxx
        target: {}
        style:
          top: 80%
          left: 80%
      - type: service-button
        title: Activate
        service: mbapi2020.preheat_start
        service_data:
          vin: xxx
        target: {}
        style:
          top: 20%
          left: 20%

I’m only trying to use it with the switch in untouched Lovelace so far:

Edit: Btw is it possible to get opening of the hatch in there too? That would be great, I could put a photo sensor connected via an ESP32 for the Pi that I have in the car so I could use it as it’s done with cars that come with keyless entry (mine has keyless go, not entry). And do you know how much data this integration uses? I’m considering connecting a separate Pi with only this integration and MQTT to an 4G USB modem, so I can use that for opening and locking the car until I get a permanent solution that uses the CAN Bus (which is probably half a year away since the most likely candiate, AutoPi is unavailable for some months).

Hi @Mastiff ,

for the EQC (or other hybrids) you have to use the preheat_start/stop instead of auxheat_start/stop. (auxiliary heating is a secondary combustion heating)

BR
Rene

I do not know a way to do this via API. Is this possible in your MB-App?

BR
Rene

The MB Server Api will send every 15 seconds a data packet of ~100 Bytes. The rest is depended on the usage of your car. If the car has a status change of one of the sensors, the MB Server will send a data packet of ~500 Bytes. A connection refresh happens every 4 hours → 2 KB. Each HA startup will produce around 500KB (depending on the amount of cars)

Hope this helps
BR
Rene

Thanks for the tip! That worked! So I have to create my own switch for that, or can I change the integration to use that instead?

Ah, sorry. I thought it was possible to open the hatch from the app, it seems it’s not…

And I see, that’s data that I used way back in the days of my USRobotics Sportster modem, so that shouldn’t eat too much, thanks!

Hi @iHaveAstream ,

What do you do to get in working again? The sensors are unavailable until the component is loaded and should not take longer then 30seconds depending on region and car capabilities. (note to myself: try to understand and implement the restorestate functionality of HA)

BR
Rene

I use a lovelace button or automation (depending on weather, calendar and battery state) to call the service (see the example from Richard or the others in this thread). A switch will make this topic complicated because you have 3-4 status values.

I see. :slight_smile: OK, thanks a lot for the help! I guess I’ll build a separate page for the car in Lovelace with the stuff I want, like I’ve done for my home theater, garage and boat.

1 Like

Hi @ReneNulschDE ,
the custom component as well as the Integration (under Integrations) itself are fine and ready.
Just my Lovelace Cards and their Entities aren’t.

I would have to remove the the Integration and to re-add incl re-auth it etc to make it work again.

Here a screenshot of my Lovelace after a reboot of HA. Before, it used to be available.

@ReneNulschDE I have thought a bit more about this setup, and it turns out that the Huawei E3372h is supposed to work out of the box with a Pi, so it may be easier than I thought. I think I can manage with a separate Pi for this, not connected to the main Pi. I’ll set it up with UFW (Uncomplicated FireWall) and block every port except for what the MercedesMe integration uses, and also all addresses that aren’t used for that. Can you please tell me what ports I need to keep open for that? Is it the standard 80 and 443 websocket ports? And what’s the address it connects to? I tried to look for it in the integration files, but I didn’t see it. Probably because my wife says I can’t find my earplugs even if I’m wearing them…

Take a look in the const.py and search for URL.

Thanks! But do you mean URI? So the id and the bff addresses, and the rest in that group? Because the only URL in that file is “SERVICE_REFRESH_TOKEN_URL”

OK, this seems to be working now.
I re-added the integration and re-configured from scratch. Now it seems to be fine even after restart(s) of HA. I’m gonna keep an eye on it, but I think it’s fine now.

@ReneNulschDE
The VIN of my car is available in the Mercedes me app of course and I’ve also added it to a custom HA widget to switch my Aux Heat on or off.
When I save the widget and test it, I get a green “check mark” but immediately in the HA logs it tells:

I checked the VIN multiple times, it does not contain a typo.
With the original MB app I can switch my aux heat correctly.

Any idea? Shall I enable debug logs? Thanks!

What is your home region? Europe, Asia, US? Based on google, I assume it is Europe:

Are you sure that you have a aux-heater and not the PreClimate/PreHeat function? Just check the preheat_start service.

Normally, Aux Heater = Standheizung and I have one built-in.
Here are the config options:

I’m gonna try the PreHeat as well.

Error message for both, aux heat and preheat is similar. I think it’s something related to the VIN.

Here’s an example of the error message for aux heat:

grafik

Please try to disable the capabilities check in the integration options. Restart HA - and try again. Standheizung=AuxHeat so you are right. And please use the exact writing of the VIN - this is case-sensitive.

Many thanks!
Seems that the capabilities check = disable did the trick!
I can now toggle the aux heating and even faster than with the Mercedes me app :slight_smile:

Awesome!