robinostlund / homeassistant-volkswagencarnet

Volkswagen Carnet Component for home assistant
GNU General Public License v3.0
328 stars 60 forks source link

[BUG] Login for VW account failed! #507

Closed StefanoGiu closed 9 months ago

StefanoGiu commented 10 months ago

Before you post a new issue - you must first check the following (and check the boxes with an "X" below)

Environment

Describe the bug

2023-11-17 12:44:21.181 WARNING (MainThread) [volkswagencarnet.vw_connection] Login for VW account failed! 2023-11-17 12:44:21.181 WARNING (MainThread) [custom_components.volkswagencarnet] Could not query update from volkswagen WeConnect

Steps to Reproduce

Restart HA or try to restart integration

Expected behavior

Integration to work properly

Traceback/Error logs

2023-11-17 12:44:21.181 WARNING (MainThread) [volkswagencarnet.vw_connection] Login for VW account failed! 2023-11-17 12:44:21.181 WARNING (MainThread) [custom_components.volkswagencarnet] Could not query update from volkswagen WeConnect

StefanoGiu commented 10 months ago

2023-11-17 13:05:07.087 ERROR (MainThread) [custom_components.volkswagencarnet.config_flow] Failed to login due to error: 'identity' 2023-11-17 13:05:14.144 ERROR (MainThread) [volkswagencarnet.vw_connection] Login failed for VW account, Token exchange failed 2023-11-17 13:05:14.144 ERROR (MainThread) [volkswagencarnet.vw_connection] Token exchange failed Traceback (most recent call last): File "C:\Users\stefa\AppData\Roaming.homeassistant\deps\Python311\site-packages\volkswagencarnet\vw_connection.py", line 348, in _login raise Exception("Token exchange failed") Exception: Token exchange failed 2023-11-17 13:05:15.014 ERROR (MainThread) [custom_components.volkswagencarnet.config_flow] Failed to login due to error: 'identity'

nmsoares commented 10 months ago

Yep, broken again

mihai-trasca commented 10 months ago

me too

megabyte0469 commented 10 months ago

Hello, I've had the same problem for 6 hours. I guess after the WeConnect app was replaced by the Volkswagen app, the WeConnect servers were switched off. Login is currently no longer possible in Home Assistant. If I log in manually at https://vwid.vwgroup.io/ then everything works. Location here is Germany.

skallberg commented 10 months ago

Having the same issue. Has someone got another integration to work? I have a Passat GTE 2018

AcciTo commented 10 months ago

Same issue. I have a e-up! 2022

andlo commented 10 months ago

Has someone got another integration to work? I have weconnect-mqtt running. If you can see your Passat in the new VW app, I am confident that you should get data with weconnect-mqtt. It requeres more configuration though.

ruudvddries commented 10 months ago

Same here. Location NL. With Passat GTE (2015) and e-Golf (2020)

menloperk commented 10 months ago

Same

stephanbaron commented 10 months ago

Same here, since today. Location D, Golf 8 (2020)

Log from HA:

Could not query update from volkswagen WeConnect 20:34:29 – (WARNUNG) Volkswagen WeConnect (benutzerdefinierte Integration) - Die Nachricht ist zum ersten Mal am 17:23:47 aufgetreten und erscheint 39 mal

Login failed for VW account, Token exchange failed 20:34:29 – (FEHLER) Volkswagen WeConnect (benutzerdefinierte Integration) - Die Nachricht ist zum ersten Mal am 17:23:47 aufgetreten und erscheint 78 mal

Token exchange failed 20:34:29 – (FEHLER) /usr/local/lib/python3.11/site-packages/volkswagencarnet/vw_connection.py - Die Nachricht ist zum ersten Mal am 17:18:52 aufgetreten und erscheint 43 mal

[...]

Error fetching volkswagencarnet data: Failed to update WeConnect. Need to accept EULA? Try logging in to the portal: https://www.portal.volkswagen-we.com/ 17:23:47 – (FEHLER) Volkswagen WeConnect (benutzerdefinierte Integration)

[...]

Could not login to volkswagen WeConnect, please check your credentials and verify that the service is working 17:19:01 – (WARNUNG) Volkswagen WeConnect (benutzerdefinierte Integration) Login failed for VW account, Token exchange failed

17:18:59 – (FEHLER) Volkswagen WeConnect (benutzerdefinierte Integration) - Die Nachricht ist zum ersten Mal am 17:18:52 aufgetreten und erscheint 3 mal

andreasbartl commented 10 months ago

same here. e-UP 2023. log in manually at https://vwid.vwgroup.io/ works.

enoch85 commented 10 months ago

Instead of posting "I also have this issue", please give thumbs up on the first post instead. It's a much better way to confirm the bug, than annoying every other subscriber to this issue with no relevant info.

Thank you!

sfanel commented 10 months ago

Same problem, I'd like to add that my car (Golf 8 ehybrid) had a software update. It's possible that the car itself isn't talking to the we connect servers anymore

FedeL16 commented 10 months ago

again me too. volkswagen t roc... of course manual login on web site works

toolonghere commented 10 months ago

I have the same problem. I have removed and reinstalled the integration, I have verified the accout loging at WeConnect. If more information is needed, I'm happy to assist.

Logger: volkswagencarnet.vw_connection Source: /usr/local/lib/python3.11/site-packages/volkswagencarnet/vw_connection.py:367 First occurred: 14:40:54 (1 occurrences) Last logged: 14:40:54

Token exchange failed Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/volkswagencarnet/vw_connection.py", line 348, in _login raise Exception("Token exchange failed") Exception: Token exchange failed

virtualdj commented 10 months ago

I hope it won't be the end of this beautiful integration, but I think the aren't so many possibilities as VW switched off We Connect (see #502).

It would be great to rewrite it to use https://pypi.org/project/weconnect as a backend instead of https://github.com/robinostlund/volkswagencarnet because the alternatives like https://github.com/mitch-dc/volkswagen_we_connect_id doesn't provide binary_sensors to enable/disable charging, requires the VIN when using the services and so on... Anyway a lot of work has to be done 😥

enoch85 commented 10 months ago

I solved it for now by triggering charge at the same time as my other car smart charges:

alias: Volkswagen MANUELL start
description: ""
trigger:
  - platform: time
    at: sensor.tesla_start_charging_time
condition:
  - condition: device
    device_id: 95XXXXXXXXXXXXXX
    domain: device_tracker
    entity_id: acXXXXXXXXXXXXXX
    type: is_home
action:
  - service: automation.trigger
    data:
      skip_condition: true
    target:
      entity_id: automation.test_uppfart_garage_start
mode: single
Busak007 commented 10 months ago

I hope it won't be the end of this beautiful integration, but I think the aren't so many possibilities as VW switched off We Connect (see #502).

It would be great to rewrite it to use https://pypi.org/project/weconnect as a backend instead of https://github.com/robinostlund/volkswagencarnet because the alternatives like https://github.com/mitch-dc/volkswagen_we_connect_id doesn't provide binary_sensors to enable/disable charging, requires the VIN when using the services and so on... Anyway a lot of work has to be done 😥

VW We Connect ID integration is also currently not working

virtualdj commented 10 months ago

VW We Connect ID integration is also currently not working

But that's due to the VW servers being down in the past hours, in fact the Volkswagen app wasn't working too. They are a lot unreliable recently!

CZaMOR commented 10 months ago

VW We Connect ID integration is also currently not working

But that's due to the VW servers being down in the past hours, in fact the Volkswagen app wasn't working too. They are a lot unreliable recently!

I don't know if it's just me but for the last 14 days (since turning off the WeConnect app) the Volkswagen app has been down for about 8-10 hours every day

michaeldjjohnson commented 10 months ago

Like everyone here says, the "Volkswagen We Connect" service has been closed. Replaced by the "Volkswagen" service.

I hope work can be done as I really miss this.

zacken commented 10 months ago

Same happened to Skoda connect a few weeks ago when they updated platform (and its the same as VW uses). If so: maybe this thread could help? https://github.com/skodaconnect/homeassistant-skodaconnect/issues/227

virtualdj commented 10 months ago

If so: maybe this thread could help? skodaconnect/homeassistant-skodaconnect#227

I've tried changing this line to the same value on your linked topic (i.e. "OneConnect/000000148 CFNetwork/1485 Darwin/23.1.0") but it still fails with Token exchange failed. Pretty predictable, as that's a Skoda API.

Probably we should extract the new values from the Volkswagen app connecting if someone is able to grab them.

chrisandsally commented 10 months ago

Hi Folks, I have found a great solution provided by [Till Steinbach]

https://github.com/tillsteinbach/WeConnect-mqtt

I simply created a docker from the compose file provided and bingo, many more entities too. To get it into Home Assistant I created some MQTT entities and templates to convert to Miles from KM. Working well so far.

michaeldjjohnson commented 10 months ago

Hi Folks, I have found a great solution provided by [Till Steinbach]

(https://github.com/tillsteinbach)https://github.com/tillsteinbach/WeConnect-mqtt

I simply created a docker from the compose file provided and bingo, many more entities too. To get it into Home Assistant I created some MQTT entities and templates to convert to Miles from KM. Working well so far.

I am pleased this works for you. Sadly this link has gone. And I don't know how to use MQTT. Never mind.

Keep up the good work folks.

virtualdj commented 10 months ago

I have found a great solution provided by [Till Steinbach]

This is a MQTT variation of https://github.com/mitch-dc/volkswagen_we_connect_id, based on https://pypi.org/project/weconnect too. They are not comparable, unfortunately... this integration is way way better and start/stop charge commands, for example, are binary_sensors (i.e. switches instead of buttons).

IMHO this integration is the best one, it just needs to comply with the new VW API, but the UI still overlooks the others.

andreasbartl commented 10 months ago

Had the same problem with EVCC after we connect app was disabled. In EVCC I had to switch the vehicle template to ID instead of vw and now it works again. See https://github.com/evcc-io/evcc/issues/10832 - maybe ist helps or is an idea how to solve the problem here.

Sn00kiT commented 10 months ago

Same here, someday VW is the new Chamberlain :-)

dp20eic commented 10 months ago

Good evening,

I'm not sure if this is generally known, but VW closed "We Connect" and switched to "Volkswagen APP", so I think access to the Volkswagen portal has also changed. And the software needs to be adjusted. The same thing happened a few days ago in the ioBroker adapter vw-connect.

With kind regards Bernd

ruudvddries commented 10 months ago

Hi Folks, I have found a great solution provided by [Till Steinbach] (https://github.com/tillsteinbach)https://github.com/tillsteinbach/WeConnect-mqtt I simply created a docker from the compose file provided and bingo, many more entities too. To get it into Home Assistant I created some MQTT entities and templates to convert to Miles from KM. Working well so far.

I am pleased this works for you. Sadly this link has gone. And I don't know how to use MQTT. Never mind.

Keep up the good work folks.

Correct link is https://github.com/tillsteinbach/WeConnect-mqtt I am trying to set this up. I think I am missing something. I have the docker running. Logging is empty... with all logging ON (in portainer). I do not see anything arriving in Home Assistant. I do have a working Zigbee2MQTT integrations but VWconnect is not showing in Home Assistant onder 'MQTT'. The addon in which the Zigbee2MQTT entities are available.

Does someone has description how to do this. The documentation here is too little for me I fear. https://hub.docker.com/r/tillsteinbach/weconnect-mqtt

Any help welcome! Thanks!

chrisandsally commented 10 months ago

As you have MQTT loaded, in the Configuration.yaml file under mqtt: Sensors. I created the entities I wanted. By using MQTT Explorer which is a free download it is easy to find the relevant topic. I then used templates to convert to miles as in the UK. Example Sensors

ruudvddries commented 10 months ago

Thanks for the quick and helpful reply! Now I know it is working!

As you have MQTT loaded, in the Configuration.yaml file under mqtt: Sensors. I created the entities I wanted. By using MQTT Explorer which is a free download it is easy to find the relevant topic. I then used templates to convert to miles as in the UK. Example Sensors

  • name: "VW_Odo_km" unique_id: "VW_Odo_km" state_topic: "weconnect/0/vehicles/WVxxxxxxxx/domains/measurements/odometerStatus/odometer" unit_of_measurement: "Km"
  • name: "VW_doorlockstatus" unique_id: "VW_doorlockstatus" state_topic: "weconnect/0/vehicles/WVxxxxxxxx/domains/access/accessStatus/doorLockStatus"
virtualdj commented 10 months ago

How can you compare the whole MQTT broker and its Docker image + the WeConnect-mqtt Docker image with the simplicity of this integration?

chrisandsally commented 10 months ago

You can't it was great!. Kudos to the Dev's. However it broke and now I have a working solution and happy! with putting a bit more effort it. Learnt a great deal in the process too. Already had MQTT and Portainer so was very quick to deploy. But agree not for everyone.

StefanoGiu commented 10 months ago

I tried to use MQTT integration, but it doesn't log anything on my MQTT server except two topics (status active and refresh timing). I have no info about my Golf car on MQTT server...

StefanoGiu commented 10 months ago

It works now, but on Oil level I get: Bad Gateway... Something went wrong. Please try to re-login. If the problem persists, please contact our support.

StefanoGiu commented 10 months ago

Btw, this mqtt module uses the weconnect module, that is using the "https://emea.bff.cariad.digital/vehicle/v1/vehicles" API.

Dennis1000 commented 10 months ago

I would appreciate if you'd continue your support for another plugin in another thread - this one here is for this HA-plugin.

janchlebek commented 10 months ago

You can't it was great!. Kudos to the Dev's. However it broke and now I have a working solution and happy! with putting a bit more effort it. Learnt a great deal in the process too. Already had MQTT and Portainer so was very quick to deploy. But agree not for everyone.

Hi, I can confirm the mqtt based integration (I am running in docker) seems to be really stable and I can read all those hundreds of topics.

One question though: did you try to also use some writables? I am mainly interested in enabling and disabling charging times and changing of charging current (I have some automations based on location). The topics are visible but I am not sure about the correct payload.

squonk11 commented 10 months ago

I would be nice to have a statement of one of the maintainers about the future of this HA-plugin. Does it make sense to wait for a fix or should I look for another solution; e.g. MQTT as mentioned above?

robinostlund commented 10 months ago

@squonk11 check the readme.md file in this repository: https://github.com/robinostlund/volkswagencarnet Help is wanted due to that i can't keep maintaining this as i don't have any compatible car anymore.

squonk11 commented 10 months ago

@squonk11 check the readme.md file in this repository: https://github.com/robinostlund/volkswagencarnet Help is wanted due to that i can't keep maintaining this as i don't have any compatible car anymore.

o.k. thank you for the fast reply. For me this is probably too tricky to do - I do not even have an idea about how the login to WeConnect was working previously. And maybe some insider knowledge about the new login-scheme is needed.

robinostlund commented 10 months ago

I released a new beta version now with updated user agent headers as that seems to have solved it for the skoda integration. That is what i can do for now, so please try it. I am holding my thumbs 😄

stickpin commented 10 months ago

@robinostlund thanks for the update, but I am still getting the same error:

2023-11-21 16:17:28.325 ERROR (MainThread) [volkswagencarnet.vw_connection] Login failed for VW account, Token exchange failed
2023-11-21 16:17:28.325 ERROR (MainThread) [volkswagencarnet.vw_connection] Token exchange failed
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/volkswagencarnet/vw_connection.py", line 348, in _login
    raise Exception("Token exchange failed")
Exception: Token exchange failed
2023-11-21 16:17:28.328 INFO (MainThread) [volkswagencarnet.vw_connection] Something failed
2023-11-21 16:17:32.672 ERROR (MainThread) [custom_components.volkswagencarnet.config_flow] Failed to login due to error: 'identity'
robinostlund commented 10 months ago

Crap, then they probably have changed the whole login flow. Anyone here with python skills that can help out to identify the necessary changes that needs to be done in this repository? https://github.com/robinostlund/volkswagencarnet

squonk11 commented 10 months ago

I have some Python experience, but as already mentioned: I have on idea how the login worked in the past and I also don't know how it should be now...

StefanoGiu commented 10 months ago

@robinostlund Please check my comment: "this mqtt module uses the weconnect module, that is using the "https://emea.bff.cariad.digital/vehicle/v1/vehicles" API."

If you open the weconnect module, you will find how it logins and uses the https://emea.bff.cariad.digital/vehicle/v1/vehicles API to get the car update. This login works properly.

danielszilagyi commented 10 months ago

Crap, then they probably have changed the whole login flow. Anyone here with python skills that can help out to identify the necessary changes that needs to be done in this repository? https://github.com/robinostlund/volkswagencarnet

Tried the python module from master branch, using the example from the readme, got the same error. I sent you an email as well if I can make of any help let me know.

DEBUG:asyncio:Using selector: EpollSelector
DEBUG:volkswagencarnet.vw_connection:Using service https://msg.volkswagen.de
DEBUG:volkswagencarnet.vw_connection:Initiating new login
DEBUG:volkswagencarnet.vw_connection:Got authorization endpoint
DEBUG:volkswagencarnet.vw_connection:Authenticating with email and password.
DEBUG:volkswagencarnet.vw_connection:Parsing login response.
DEBUG:volkswagencarnet.vw_connection:Login successful, received authorization code.
DEBUG:volkswagencarnet.vw_connection:Trying to fetch user identity tokens.
ERROR:volkswagencarnet.vw_connection:Login failed for VW account, Token exchange failed
ERROR:volkswagencarnet.vw_connection:Token exchange failed
Traceback (most recent call last):
  File "/home/goodman/.local/lib/python3.10/site-packages/volkswagencarnet/vw_connection.py", line 348, in _login
    raise Exception("Token exchange failed")
Exception: Token exchange failed
INFO:volkswagencarnet.vw_connection:Something failed
mrbostad commented 10 months ago

@squonk11 check the readme.md file in this repository: https://github.com/robinostlund/volkswagencarnet Help is wanted due to that i can't keep maintaining this as i don't have any compatible car anymore.

I can give you @robinostlund a guest user on my car, VW e-Golf 2019 , just send me a pm and i will add you. This would be the smallest problem to contribute with.

eirikgrindevoll commented 10 months ago

New "Volkswagen" app uses. That we recenly had to change to from the "We connect" GET /vehicle/v2/vehicles HTTP/1.1 and GET /vehicle/v1/vehicles/*** Host: emea.bff.cariad.digital