evcc icon indicating copy to clipboard operation
evcc copied to clipboard

BMW/Mini api broken

Open Marc2480 opened this issue 2 years ago • 123 comments

Describe the bug

Just updated to 0.131.6 and the car shows as disconnected, didn't change anything in the yaml config, has been working seamlessly in many previous builds ...

Steps to reproduce

1. 2. 3. ...

Configuration details

vehicles:
- type: template
  template: bmw 
  title: BMW i4M50  
  user: ***** 
  password: ******
  vin: ****** 
  capacity: 80  
  name: ev2

Log details

[main ] INFO 2024/11/18 16:40:48 evcc 0.131.6
[main ] INFO 2024/11/18 16:40:48 using config file: /etc/evcc.yaml
[db ] INFO 2024/11/18 16:40:48 using sqlite database: /var/lib/evcc/evcc.db
[main ] INFO 2024/11/18 16:40:48 listening at :7070
[alfen ] DEBUG 2024/11/18 16:40:49 detected 1p alfen
[main ] ERROR 2024/11/18 16:40:49 creating vehicle ev2 failed: cannot create vehicle type 'template': cannot create vehicle type 'bmw': Client authentication failed (e.g., login failure, unknown client, no client authentication included or unsupported authentication method): unexpected status: 401 (Unauthorized)

What type of operating system are you running?

Linux

Nightly build

  • [X] I have verified that the issue is reproducible with the latest nightly build

Version

0.131.6

Marc2480 avatar Nov 18 '24 15:11 Marc2480

Same for me... Downgrade to 0.131.5 not helps in my case. Maybe some API change from BMW?

mikeungers avatar Nov 18 '24 16:11 mikeungers

also tried to downgrade ... no fix ...

logged in to my bmw garage to verify if my credentials are still ok, login is ok ...

Marc2480 avatar Nov 18 '24 16:11 Marc2480

also tried to downgrade ... no fix ...

Also hat BMW etwas geändert. Was? Funktionier ioBroker?

andig avatar Nov 18 '24 18:11 andig

Same for me with an i3. I updated on Saturday to 0.131.6 and then everything was fine. Today I restarted because of config change and now I get http 401 from BMW api.

sfranzis avatar Nov 18 '24 18:11 sfranzis

Same issues with our BMW i4. But it is not related to the EVCC update since 3 hours ago, it worked.

Home assistant integration reports the same error

Logger: bimmer_connected.api.authentication
Quelle: components/bmw_connected_drive/config_flow.py:60
Erstmals aufgetreten: 21:01:04 (2 Vorkommnisse)
Zuletzt protokolliert: 21:01:42

MyBMWAuthError due to HTTPStatusError: invalid_client - Client authentication failed (e.g., login failure, unknown client, no client authentication included or unsupported authentication method)

My BMW app works.

mfuchs1984 avatar Nov 18 '24 20:11 mfuchs1984

See https://github.com/bimmerconnected/bimmer_connected/issues/671

According to this and https://github.com/home-assistant/core/issues/128598#issuecomment-2483846381, a captcha is now needed for the first login. After this, a token can be used.

Was already needed for a while in North America https://github.com/home-assistant/core/pull/129667 https://github.com/bimmerconnected/bimmer_connected/pull/665

mfuchs1984 avatar Nov 18 '24 20:11 mfuchs1984

Ich habe auch nach dem Update auf. 0.131.6 Probleme mit unserem MINI. Downgrade hat ebenfalls nicht funktioniert.

SEFNSRL avatar Nov 19 '24 06:11 SEFNSRL

Ich habe auch nach dem Update auf. 0.131.6 Probleme mit unserem MINI. Downgrade hat ebenfalls nicht funktioniert.

Es liegt nicht am Update. BMW hat die API bzw den Login-Prozess geändert.

sfranzis avatar Nov 19 '24 06:11 sfranzis

Meine beiden, iX3 und Cooper SE, werden auch nicht mehr erkannt.

Seit kurzem erlaubt BMW bei den Autos mit OS7 das einrichten von Mitbenutzern, vorher ging nur ein Benutzer. Evtl. wurde daher der Login Vorgang angepasst.

Expalmi avatar Nov 19 '24 06:11 Expalmi

Ich habe auch nach dem Update auf. 0.131.6 Probleme mit unserem MINI. Downgrade hat ebenfalls nicht funktioniert.

Es liegt nicht am Update. BMW hat die API bzw den Login-Prozess geändert.

War bei mir wohl eher ein Zusammentreffen von 2 Ereignissen ich mache ein Update und BMW ändert die Anmeldung. Danke für die Rückmeldung.

SEFNSRL avatar Nov 19 '24 07:11 SEFNSRL

Bin auch schon auf 0.131.6, aber als ich eben evcc auf meinen iX2 umgestellt habe, hat evcc korrekt den SOC des Autos angezeigt.

[bmw ] TRACE 2024/11/19 09:15:53 POST https://customer.bmwgroup.com/gcdm/oauth/token
[bmw ] TRACE 2024/11/19 09:15:54 grant_type=refresh_token&redirect_uri=com.bmw.connected%3A%2F%2Foauth&refresh_token=*** -- {"gcid":"***,"token_type":"Bearer","access_token":"***","refresh_token":"***","scope":"smacc vehicle_data perseus dlm svds openid profile vsapi remote_services authenticate_user cesim offline_access email fupo","expires_in":3599,"id_token":"***"} 

vehicle ist ganz normal mit template: bmw in evcc.yaml definiert.

docolli avatar Nov 19 '24 08:11 docolli

Bin auch schon auf 0.131.6, aber als ich eben evcc auf meinen iX2 umgestellt habe, hat evcc korrekt den SOC des Autos angezeigt.

vehicle ist ganz normal mit template: bmw in evcc.yaml definiert.

dann evcc erstmal nicht neustarten ;-)

sfranzis avatar Nov 19 '24 08:11 sfranzis

Same here, app still working, login on pc BMW ID not possible to login

RampyLou avatar Nov 19 '24 15:11 RampyLou

Email from this morning to BMW:

Liebes BMW-Team,

davon abgesehen, dass die Bonner BMW-Niederlassung eine derart unterirdische Service-Performance in Bezug auf Termintreue, Freundlichkeit und Dienstleistungsverständnis an den Tag legt, dass ich mir weitere Besuche ersparen möchte, scheint auch BMW an sich noch nicht ganz verstanden zu haben was „vernetztes Fahren“ eigentlich bedeutet. Ständige Ausfälle und Kommunikationsprobleme mit der Cloud erschweren oder verhindern gar Überschussladen an der heimischen PV-Anlage. Der Fehler ist immer an der selben Stelle zu suchen und auch zu Finden – bei der Verbindung der eigenen Technik mit der BMW-Cloud. Seit gestern scheint man den Vogel abgeschossen und das API-Login defacto deaktiviert zu haben.

Auszug aus dem Trace-Log: [bmw ] TRACE 2024/11/19 07:44:35 POST https://customer.bmwgroup.com/gcdm/oauth/authenticate [bmw ] TRACE 2024/11/19 07:44:35 client_id=31c357a0-7a1d-4590-aa99-33b97244d048&code_challenge=XNzsmCcGkwUrqP6-6OGwRixi3xVx39if9Dmv9x8kJeE&code_challenge_method=S256&grant_type=authorization_code&nonce=login_nonce&password=***&redirect_uri=com.bmw.connected%3A%2F%2Foauth&response_type=code&scope=openid+profile+email+offline_access+smacc+vehicle_data+perseus+dlm+svds+cesim+vsapi+remote_services+fupo+authenticate_user&state=cEG9eLAIi6Nv-aaCAniziE_B6FPoobva3qr5gukilYw&username=*** -- {"error": "invalid_client", "error_description": "Client authentication failed (e.g., login failure, unknown client, no client authentication included or unsupported authentication method)"} [main ] ERROR 2024/11/19 07:44:35 creating vehicle bmw failed: cannot create vehicle type 'template': cannot create vehicle type 'bmw': Client authentication failed (e.g., login failure, unknown client, no client authentication included or unsupported authentication method): unexpected status: 401 (Unauthorized)

Nach meinen ersten Untersuchungen der Logs ist jetzt vor dem Login ein Captcha geschaltet. Wer zur Hölle kommt auf eine solch irrsinnige Idee beim Login-Prozess einer Automatisierungsschnittstelle eine nur mit menschlicher Intelligenz zu lösende Sicherheitsfrage voranzustellen? Sind Eure Programmierer irre, oder einfach nur unfähig?

Gib es irgendeine Idee, wann die API in einer stabilen, nutzbaren Version wieder zu Verfügung steht, oder hat man einfach kein Interesse an zufriedenen Kunden? Die Hoffnung, dass die BMW-Niederlassungen noch jemals kapieren, dass das Dienstleistungsgeschäft eine Kombination von Dienen und Leisten ist, habe ich eh schon aufgegeben. Vielleicht gilt da der Grundsatz – wer nicht mit der Zeit geht, geht mit der Zeit…

Viele Grüße Robert Schuster

Of course, BMW doesn't know anything like an acknowledgement of receipt or the allocation of a ticket number that you could refer to. So I called them this afternoon and asked for help in the "Connected Drive" department. At least the very friendly lady on the phone understood my request and wants to take care of the matter - that is to say, pass it on. We'll see...

RobertSchuster avatar Nov 19 '24 16:11 RobertSchuster

Ich habe eine ähnliche Frage an den Support gerichtet, wenn ich eine Antwort bekomme, melde ich mich.

Expalmi avatar Nov 19 '24 16:11 Expalmi

Seit gestern scheint man den Vogel abgeschossen und das API-Login defacto deaktiviert zu haben.

Ich fürchte Du hast da falsche Vorstellungen. Es gibt kein "API" sondern nur reverse- engineerte Aufrufe die jemand der BMW App entlockt hat. Der erste Schritt für BMW wäre, überhaupt mal eine Schnittstelle offiziell anzubieten...

andig avatar Nov 19 '24 16:11 andig

He he, dann müssen sie mir eben das mal erklären... Mir geht es erstmal darum den Pfeifen irgendein Statement zu entlocken. Was das Captcha betrifft, so wundert mich, dass ich mich sowohl auf der Website als auch in der App ohne dieses anmelden kann.

Hätte ich von einer derartigen Ignoranz seitens BMW vorher eine Ahnung gehabt, wäre bei mir der Reiz des i3s deutlich weniger ausgeprägt gewesen.Aber man ist ja lernfähig. Never ever again...

RobertSchuster avatar Nov 19 '24 16:11 RobertSchuster

I do believe there's some kind of API available.

I had been using this app called EEVEE to get charging overviews of my BMW (before the MyBMW app had this kind of functionality) and I recall I had to authorize this app to allow collecting data from BMW. (I revoked this permission when I uninstalled the app)

I had a look, and they even have a step-by-step guide for their process :

https://intercom.help/eevee-mobility/en/articles/5785086-connect-bmw

Maybe this can be of interest ...

Marcher

Marc2480 avatar Nov 19 '24 17:11 Marc2480

Ich hatte heute auch beim Telefon Support angerufen, die wussten da noch nicht einmal, was ein Captcha ist. Das Problem wird an die zuständige Abteilung weitergeleitet.

SEFNSRL avatar Nov 19 '24 18:11 SEFNSRL

Es gibt kein "API" sondern nur reverse- engineerte Aufrufe die jemand der BMW App entlockt hat. Der erste Schritt für BMW wäre, überhaupt mal eine Schnittstelle offiziell anzubieten...

Es gibt doch diese BMW "Cardata" API. Allerdings muss man da meines Verständnis nach als "3rd Party" einen Account anlegen, sein Programm/App/Whatever registrieren und kann dann tokens nach Zustimmung des BMW Fahrers erhalten.

Aber das ist für eine selbst gehostete Lösung wie evcc wahrscheinlich nicht praktikabel.

mikeungers avatar Nov 19 '24 19:11 mikeungers