Same for me.
Please try to reload the component. I had multiple errors in the last days, where the MB Servers blocked the connection. (Maybe in relation to a change rolled out on Monday/Tuesdays - MB disconnects the websocket after 15min now - was 2-4 hours before…)
Error was: HTTP429 - Too many requests (per account - main account was blocked, dev account worked fine)
@ReneNulschDE (Mercedes Me Component - #2165 by ReneNulschDE)
Indeed, “Geobasierte Online-Informationen für Fahrfunktionen” and “Individuelle Verbrauchsanzeige” were set inactive. I do not know, if they have been in an inactive state before, but I activated them now. Especially that they are part of the “Sicherheit und Service” package, for which I already have payed for the full 3 years.
And, after reactivating both Services, I get the GPS data again as expected. It’s pretty cheeky when services are simply deactivated, even though they are part of a paid package. Thanks for your hint!
Hi,
Sorry if this is a silly question, been a while since I’ve used HA.
I’ve installed this integration via HACS, restarted my HA instance and browser… but at which point do I get prompted to login? Or where exactly should I configure my credentials?
- …
- Use the “Add Integration” in Home Assistant, Settings, Devices & Services and select “MercedesME 2020”.
- ???
- Use your MB-login email address. Your will receive a 6-digit code via email (valid for 15min)
EDIT: Nvmmmmm, found it. I still had to click “Add integration” once it got installed via HACS
Go to: Home Assistant, Settings, Devices & Services
Click on the plus sign in the lower right corner.
Search for mbapi2020
In case you can’t find the integration, refresh your browser window
Hi,
First of all, thank you very much for this great integration.
With my EQV I cannot start the preclimate (Vorklimatisierung) in HA.
The current status is displayed correctly in HA, but when you start the air conditioning in HA, the button switches back after a few seconds and the vehicle does not receive the command.
Any idea what I can set differently?
Try to use the service (I think it’s now called “Action”) from the Developer tools directly: mbapi2020.preheat_start
.
If it doesn’t work, try mbapi2020.auxheat_start
.
Thanks for the quick reply.
I have already tested three options (Preclimate start, auxhead and Vorklimatisierung). Unfortunately, the preclimate does not start.
an EQV does not have a auxheater. So please start again the service preclimate_start (this is the same like the switch “Vorklimatisierung”). Then check the sensor “car” - this one has some attributes with the result of the last service call or enable the debug logging and check the homeassistant log.
According to the protocol, the preclimate starts, but end itself after a minute. And in reality, it doesn’t start at all.
Please enable the debug log:
start the service,
wait 30 seconds,
stop the debug logging.
A textfile is downloaded.
Send this file and a diagnostic report to [email protected]
and, please check if this is working in your official MB app.
Hi,
my MercedesMe app still thinks the car is at work (I’ve definitively driven the car home earlier).
Needless to say, the Mercedes integration failed to set up.
Anyone else have the same outage? Is Mercedes fiddling with the API?
Could you check your homeassistant.log and search for 429 (means too many requests) This is an error that I get the last days and I still have no solution for it.
Currently, I just stop the integration for 12 hours…
Feel free to send me your ha-log via email.
I have the same problem. Sometimes the integration disconnects and I no longer have the car’s data. I just restarted HA and the integration, but it won’t restart. I’m posting the log below. Last week, I logged into the dashboard on the Mercedes website and I was asked to set a password. Now, to access it, I no longer receive a code by email, but I have to enter the password. Could this be related?
Questo errore ha avuto origine da un’integrazione personalizzata.
Registratore: custom_components.mbapi2020.websocket
Fonte: custom_components/mbapi2020/websocket.py:229
Integrazione: MercedesME 2020 (documentazione, problemi)
Prima occorrenza: 23:30:49 (3 occorrenze)
Ultima registrazione: 23:43:59
Other error 429, message=‘Invalid response status’, url=‘wss://websocket.emea-prod.mobilesdk.mercedes-benz.com/v2/ws’
Questo errore ha avuto origine da un’integrazione personalizzata.
Registratore: custom_components.mbapi2020.client
Fonte: custom_components/mbapi2020/client.py:263
Integrazione: MercedesME 2020 (documentazione, problemi)
Prima occorrenza: 23:30:49 (3 occorrenze)
Ultima registrazione: 23:43:59
Error with the websocket connection (retry counter: 0):
Registratore: homeassistant.config_entries
Fonte: config_entries.py:635
Prima occorrenza: 23:31:19 (3 occorrenze)
Ultima registrazione: 23:44:30
Error setting up entry [email protected] (Region: Europe) for mbapi2020
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/config_entries.py”, line 635, in __async_setup_with_context
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/config/custom_components/mbapi2020/init.py”, line 207, in async_setup_entry
raise HomeAssistantError(
homeassistant.exceptions.HomeAssistantError: No car information registered for this account. Check the MB website with the same account. Giving up…
Without having a solution, does anyone have an automation ready as a workaround to detect if the connection failed? Something like “if a sensor hasn’t been updated in X hours” or “some actual error has been logged”?
I love using the preclimate function exposed from HA to HomeKit, and whenever the connection fails I don’t experience any issues in HomeKit, but enter a non-airconditioned car later. Having a way to inform me of an issue would help to manually restart HA or something as a workaround.
Hi,
here is an automation that detects the error:
alias: MBAPI2020-Detect-HTTP429
description: ""
triggers:
- trigger: event
event_type: system_log_event
conditions:
- condition: template
value_template: "{{\"Other error 429\" in trigger.event.data.message[0]}}"
actions:
- action: persistent_notification.create
metadata: {}
data:
message: "MB-API access blocked. HTTP 429"
mode: single
Make sure that you enable the correct config for your logger in the configuration.yaml and restart HA:
system_log:
fire_event: true
However, I do not know how long we have to wait until we can reload the integration. I’m still testing the API behavior.
A reload can be done with
action:
service: homeassistant.reload_config_entry
data:
entry_id: ***
Since 2 days i have the same problem with the 429 error and would like to implement the detection and an automatic restart.
The first part with creating the automation is easy, but i am struggeling with the second part:
How do i have to do this?
Do i just have to copy those 2 lines of code in the configuration.yaml or what do i have to do?
Sorry, i am a beginner
My question to the third step is: Where can i find the number for the “entry_id”?
Regards,
Stefan
Yes. Just copy this two lines in your configuration.yaml. In case you have the line system_log:
aleady in the file, just add fire_event: true
.
As I said, we have to wait until we/I understood the issue. An automated reload makes no sense. I’m still working on it.