Mercedes Me Component

Hi,

and you downloaded the “Master”-branch via HACS? What is the reported version in the diagnostic data download?

Please check your car capabilities too. Download the diagnistic report and check if the capability “CHARGE_PROGRAM_CONFIGURE” is true for your car.

I have created a Beta Version 0.11.0-beta.2 now. Maybe you can check again.

Hi Rene. I am new to github so unsure how to create a new issue. I will look into it though as it is something I definitely need to learn. A quick note, I uninstalled and reinstalled again and everything was working for a few days but now it is not working again and all of the entities are showing unavailable. I am getting the ‘failed to setup’ error again.

1 Like

Good Morning,

yes, i redownloaded the Master-Branch. Then Beta.1

Reported Version: v0.11.0-beta.1
CHARGE_PROGRAM_CONFIGURE is true.
I have 2 cars connected. Only one support this (Diagnostic: 1x false, 1x true).
Update to Beta.2:
Works perfect! :slight_smile: Thanks a lot!

1 Like

I have published a new version v0.11.1:

New:

  • Sensor: lastParkEvent (datetime), Attributes parkEventType (area of the car where the incident happened), parkEventLevel (level of the incident (low,medium,high) (see readme for int translation)
  • Sensor: Interior Protection (int), 0 and 1 = Not active, 2 = Active
  • Add “_last_full_message” to diagnostic log (contains the original MB data)
  • Experimental: New Service Charge_Program_Configure to select the active charge_program 0=default, 2=Home, 3=Work

Fixes:

  • Smart cars are available again
  • AuxHeat switch is back

Other:

  • Protos updated to latest Google Protobuf version
1 Like

In case you get errors in your log like:

2024-02-22 09:45:50.209 INFO (MainThread) [custom_components.mbapi2020.websocket] Connecting to wss://websocket.emea-prod.mobilesdk.mercedes-benz.com/ws
2024-02-22 09:45:50.351 ERROR (MainThread) [custom_components.mbapi2020.websocket] Could not connect to wss://websocket.emea-prod.mobilesdk.mercedes-benz.com/ws, retry in 10 seconds...
2024-02-22 09:45:50.351 DEBUG (MainThread) [custom_components.mbapi2020.websocket] 429, message='Invalid response status', url=URL('wss://websocket.emea-prod.mobilesdk.mercedes-benz.com/ws')

or your mobile phone is in the same network line HA and the MB app is not working anymore.

Looks like MB has activated some request throttling this morning and only one connection per is possible.

Update: Its working again for my instances.

I am seeing those two errors after the upgrade. It can´t login anymore. For me it looks like it has difficulties with my second Mercedes which is an old CLK convertible that does not support Mercedes ME functions ?!?!

Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht

Logger: custom_components.mbapi2020.webapi
Source: custom_components/mbapi2020/webapi.py:109
Integration: MercedesME 2020 (documentation, issues)
First occurred: 20:14:13 (6 occurrences)
Last logged: 20:17:38

Error requesting: https://bff.emea-prod.mobilesdk.mercedes-benz.com/v1/vehicle/WDB208xxxxxxx/capabilities - 403 - 0 -
Error requesting: https://bff.emea-prod.mobilesdk.mercedes-benz.com/v1/vehicle/WDB208xxxxxxx/capabilities/commands - 403 - 0 -```


**[u]and this one[/u]**

Logger: homeassistant.config_entries
Source: config_entries.py:444
First occurred: 20:14:13 (3 occurrences)
Last logged: 20:17:38

Error setting up entry [email protected] (Region: Europe) for mbapi2020
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 444, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/mbapi2020/__init__.py", line 107, in async_setup_entry
    for feature in capabilities.get("commands"):
                   ^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get'

i removed the CLK from Mercedes ME and now the integration works.

1 Like

Thx. You could add the Vin to the exclude list in the configure dialog of the integration too.

1 Like

Might be a little off-topic, but maybe not: did anyone manage to integrate the current Mercedes Wallbox (EVBox) into HA since there are no entities available in this component?

Hi Sven, this component does not currently have Mercedes Wallbox integration, as I don’t have such a box nor access to one. As far as I know, evcc.io has a EVBox integration and has HA-integration too.

Looks like the EvBox is using OCPP and there is a OCPP integration available for HA via HACS. GitHub - lbbrhzn/ocpp: Home Assistant integration for electric vehicle chargers that support the Open Charge Point Protocol (OCPP).

Best
Rene

Don’t have one, but according to the manual, the EVBox Livo has OCPP 2 support. I think evcc has OCP support, as well as HA integration.

1 Like

Bit of a weird one. Not sure if homeassistant issue or component issue…

I’ve renamed my device to “car” from the vehicle registration number (a bit more intuitive) and I ticked the “update entity IDs” option, however I’ve noticed that quite a few of the entity IDs do not update to the new “car” name but retain the old reg number format…

I’ve had to reinstall the component quite a few times recently, which means updating the device name each time to “car” so my automations/dashboards still work, then I have to go, one-by-one, and update those entity IDs that do not re-name.

Any ideas? Does what I’ve written make sense?!

Hi Matt,

hard to say what went wrong… If you like, you can send me core.entity_registry out of the .storage folder with some examples where the renaming went wrong and where it was successful. Then I can check for some component related problems.

email: [email protected]

please try to explain there scenarios where you need to delete, and rename.

Best
Rene

My integration is not working anymore with following error:


^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/mbapi2020/config_flow.py", line 128, in async_step_reauth
    self._reauth_entry = self.hass.config_entries.async_get_entry(self.context["entry_id"])
                                                                  ~~~~~~~~~~~~^^^^^^^^^^^^
KeyError: 'entry_id'

Any idea?

Hi @apfelklaus,

this is a bug in the current release and fixed in the master branch on github. You have 2 options:

  • Download the master branch (HACS, three dots on the mbapi integration, redownload, select master), Restart HA

or

  • Delete the integration, Restart HA, Add the integration
1 Like

Both is not working sadly - hacs is downloading forever :frowning:
Any idea ?

Lets try the following:

  • Go to Developer tools, Services
  • Select the service: “Update: Install update”
  • Click on “Choose entity” and select “MercedesME 2020 update”
  • Put: v0.11.2-beta.1 in the version field
  • Click update
  • After a few seconds a “Restart” task is created, See Settings page (a Repair popup should be visible)

Question of the day: Does your mbapi2020.Sunroof Service to open or close the sunroof works? Its not working for my car with a general MB-error. In the official app it is also not available.

I tried to configure OCPP but was not successful. Even though the Wallbox is in my network, the OCPP HA integration gets no connection to the Wallbox. I think you need to setup OCPP in the Wallbox configuration first.

EvBox offers 2 apps in this regard:

  • EvBox Install (that I successfully used for Wallbox FW update)
  • EvBox Connect (that is not working since it only connects via Bluetooth on the setup and the Mercedes EvBox does not support Bluetooth)

As far as I am informed, you can only configure OCPP with EvBox Connect.

The Mercedes me app is a joke in regards to the Wallbox options. It does not offer any configuration.

I will check evcc next.

Answer of the day:
Jup, I can open and close the sunroof (via your mbapi2020 integration, as well as with the MercedesMe app).
EQS, Europe

1 Like