mitch-dc / volkswagen_we_connect_id

Apache License 2.0
195 stars 52 forks source link

after updating to latest version of HA getting login error #143

Closed sebking1971 closed 1 year ago

sebking1971 commented 1 year ago

ogger: homeassistant.config_entries Source: custom_components/volkswagen_we_connect_id/init.py:47 Integration: Volkswagen We Connect ID First occurred: 16:30:49 (1 occurrences) Last logged: 16:30:49

Error setting up entry Volkswagen We Connect ID for volkswagen_we_connect_id Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 382, in async_setup result = await component.async_setup_entry(hass, self) File "/config/custom_components/volkswagen_we_connect_id/init.py", line 47, in async_setup_entry await hass.async_add_executor_job(_we_connect.login) File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) File "/usr/local/lib/python3.10/site-packages/weconnect/weconnect.py", line 182, in login self.__session.login() File "/usr/local/lib/python3.10/site-packages/weconnect/auth/we_connect_session.py", line 76, in login response = self.doWebAuth(authorizationUrl) File "/usr/local/lib/python3.10/site-packages/weconnect/auth/we_connect_session.py", line 242, in doWebAuth raise AuthentificationError('You have to login at myvolkswagen.de and accept the terms and conditions') weconnect.errors.AuthentificationError: You have to login at myvolkswagen.de and accept the terms and conditions

sm4upt commented 1 year ago

I get same error i logged in to myvolkswagen.de as mentioned in message it dosen't solve the problem

sebking1971 commented 1 year ago

App was updated today so wonder if they did something to the login again.

Sebastian King | @.*** | +44 7711 702100


From: sm4upt @.> Sent: Tuesday, February 14, 2023 5:11:55 PM To: mitch-dc/volkswagen_we_connect_id @.> Cc: Sebastian King @.>; Author @.> Subject: Re: [mitch-dc/volkswagen_we_connect_id] after updating to latest version of HA getting login error (Issue #143)

I get same error i logged in to myvolkswagen.de as mentioned in message it dosen't solve the problem

— Reply to this email directly, view it on GitHubhttps://github.com/mitch-dc/volkswagen_we_connect_id/issues/143#issuecomment-1430094271, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AWUI3QGO4RCLPSWWBB4DCNTWXO4FXANCNFSM6AAAAAAU3ZKJBU. You are receiving this because you authored the thread.Message ID: @.***>

DarkFox commented 1 year ago

I restored HA to 2023.2.3 and still had the issue. Going to myvolkswagen.de and accepting all the terms on my account, seems to have fixed it for me.

sm4upt commented 1 year ago

logged in to myvolkswagen.de again changed the country accepted all the terms and now it works again.

sebking1971 commented 1 year ago

Same here!

Sebastian King | @.*** | +44 7711 702100


From: sm4upt @.> Sent: Tuesday, February 14, 2023 6:29:54 PM To: mitch-dc/volkswagen_we_connect_id @.> Cc: Sebastian King @.>; Author @.> Subject: Re: [mitch-dc/volkswagen_we_connect_id] after updating to latest version of HA getting login error (Issue #143)

logged in to myvolkswagen.de again changed the country accepted all the terms and now it works again.

— Reply to this email directly, view it on GitHubhttps://github.com/mitch-dc/volkswagen_we_connect_id/issues/143#issuecomment-1430191309, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AWUI3QEP2BQFA27S5I5ZGYDWXPFKFANCNFSM6AAAAAAU3ZKJBU. You are receiving this because you authored the thread.Message ID: @.***>

sebking1971 commented 1 year ago

stopped again with another error so guess VW are "doing stuff"

DarkFox commented 1 year ago

stopped again with another error so guess VW are "doing stuff"

Same here, with a different error message:

Logger: homeassistant.config_entries
Source: custom_components/volkswagen_we_connect_id/__init__.py:47
Integration: Volkswagen We Connect ID
First occurred: 00.12.00 (1 occurrences)
Last logged: 00.12.00

Error setting up entry Volkswagen We Connect ID for volkswagen_we_connect_id
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 382, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/config/custom_components/volkswagen_we_connect_id/__init__.py", line 47, in async_setup_entry
    await hass.async_add_executor_job(_we_connect.login)
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.10/site-packages/weconnect/weconnect.py", line 182, in login
    self.__session.login()
  File "/usr/local/lib/python3.10/site-packages/weconnect/auth/we_connect_session.py", line 76, in login
    response = self.doWebAuth(authorizationUrl)
  File "/usr/local/lib/python3.10/site-packages/weconnect/auth/we_connect_session.py", line 243, in doWebAuth
    raise APICompatibilityError('No user id provided')
weconnect.errors.APICompatibilityError: No user id provided
Tassel8062 commented 1 year ago

logged in to myvolkswagen.de again changed the country accepted all the terms and now it works again.

This worked for me on .co.uk and setting country to UK in the policy agreement, thanks

sebking1971 commented 1 year ago

All good here now. One to remember for the future.

Sebastian King | @.*** | +44 7711 702100


From: SwannyBFC @.> Sent: Wednesday, February 15, 2023 11:30:50 AM To: mitch-dc/volkswagen_we_connect_id @.> Cc: Sebastian King @.>; Author @.> Subject: Re: [mitch-dc/volkswagen_we_connect_id] after updating to latest version of HA getting login error (Issue #143)

logged in to myvolkswagen.de again changed the country accepted all the terms and now it works again.

This worked for me on .co.uk and setting country to UK in the policy agreement, thanks

— Reply to this email directly, view it on GitHubhttps://github.com/mitch-dc/volkswagen_we_connect_id/issues/143#issuecomment-1431221685, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AWUI3QFJUV273I6KPLLKNCLWXS46VANCNFSM6AAAAAAU3ZKJBU. You are receiving this because you authored the thread.Message ID: @.***>

angelitoo776 commented 1 year ago

Same error here.

I finally solved. Ive tried the .de and .co.uk policy agreement and finally I went back to .es and works. I don't know what really happened

cicinovec commented 1 year ago

I have the same issue here (Netherland). Even after accepting the conditions, still the same error. Tried to change the country to different one, no change

This error originated from a custom integration.

Logger: homeassistant.config_entries
Source: custom_components/volkswagen_we_connect_id/__init__.py:47
Integration: Volkswagen We Connect ID
First occurred: February 14, 2023 at 18:37:12 (6 occurrences)
Last logged: 15:42:34

Error setting up entry Volkswagen We Connect ID for volkswagen_we_connect_id
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 382, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/config/custom_components/volkswagen_we_connect_id/__init__.py", line 47, in async_setup_entry
    await hass.async_add_executor_job(_we_connect.login)
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.10/site-packages/weconnect/weconnect.py", line 182, in login
    self.__session.login()
  File "/usr/local/lib/python3.10/site-packages/weconnect/auth/we_connect_session.py", line 76, in login
    response = self.doWebAuth(authorizationUrl)
  File "/usr/local/lib/python3.10/site-packages/weconnect/auth/we_connect_session.py", line 242, in doWebAuth
    raise AuthentificationError('You have to login at myvolkswagen.de and accept the terms and conditions')
weconnect.errors.AuthentificationError: You have to login at myvolkswagen.de and accept the terms and conditions
ColinRobbins commented 1 year ago

I seem to have gotten over the "terms and conditions error but am now stuck with...

weconnect.errors.APICompatibilityError: No user id provided

Not sure where / how I can provide a user id?

angelitoo776 commented 1 year ago

I seem to have gotten over the "terms and conditions error but am now stuck with...

weconnect.errors.APICompatibilityError: No user id provided

Not sure where / how I can provide a user id?

I had the same problem. I changed in my we connect id account the country to my country (Spain) and then repeated the logging in the add-on. I don't know why but it worked.

ColinRobbins commented 1 year ago

Thanks @angelitoo776 - how did you repeat the login in HA.
Did you remove the integration and re-add it? I can't see any option to do it any other way?

angelitoo776 commented 1 year ago

Thanks @angelitoo776 - how did you repeat the login in HA. Did you remove the integration and re-add it? I can't see any option to do it any other way?

I removed the integration an re-add it. Unfortunately its a bit messy because you remove the entity id and you lose history data.

I think that you can try to reconnect the integration (it must appear a button to reconnect or something similar in the integration) if it doesn't work... re-add it

ColinRobbins commented 1 year ago

I've removed the integration, but now get an "unknown error" when I try to re-add it! Similar error in the logs.

Logger: custom_components.volkswagen_we_connect_id.config_flow
Source: custom_components/volkswagen_we_connect_id/config_flow.py:39
Integration: Volkswagen We Connect ID
First occurred: 19:34:34 (1 occurrences)
Last logged: 19:34:34

Unexpected exception
Traceback (most recent call last):
  File "/config/custom_components/volkswagen_we_connect_id/config_flow.py", line 64, in async_step_user
    info = await validate_input(self.hass, user_input)
  File "/config/custom_components/volkswagen_we_connect_id/config_flow.py", line 39, in validate_input
    await hass.async_add_executor_job(we_connect.login)
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.10/site-packages/weconnect/weconnect.py", line 182, in login
    self.__session.login()
  File "/usr/local/lib/python3.10/site-packages/weconnect/auth/we_connect_session.py", line 76, in login
    response = self.doWebAuth(authorizationUrl)
  File "/usr/local/lib/python3.10/site-packages/weconnect/auth/we_connect_session.py", line 243, in doWebAuth
    raise APICompatibilityError('No user id provided')
weconnect.errors.APICompatibilityError: No user id provided
northalpha commented 1 year ago

I had both and resolved it by:

  1. initial error: You have to login at myvolkswagen.de and accept the terms and conditions --> go to myvolkswagen.de, login, accept the terms and conditions, done
  2. new error: No user id provided --> go to We Connect Shop, there i was again presented after login with new terms and conditions, accept it, done
  3. i my case, for what ever reason, all "online" free services like "We Connect Plus", "We Connect" were not selected anymore. Bought all of them AGAIN (did it months ago ...) for 0€ and done.

Reload Integration and SoC et. al is back in my dashboard!

ColinRobbins commented 1 year ago

Thanks for the help but still no joy.

When I go to We Connect Shop, everything seems OK (www.volkswagen.co.uk/en/myvolkswagen.html)

image

I am in the UK. Did you specifically have to go to myvolkswagen.de? I went to myvolkswagen.co.uk, as that is where my profile is registered.

Maybe I'll wait a few days (Sadly) 1) VW may fix something 2) At the weekend I can go to the upstream PyPi library and see if I can get that to logon there first.

Cheers

ColinRobbins commented 1 year ago

Fixed it. In my case, the EV itself said I needed to re-logon. So re did my login in the car, and now I can re-add the integration. What a palaver!

DarkFox commented 1 year ago

I just logged into the danish Volkswagen site and got two terms to agree to, that didn't show up yesterday, and now it's working again. This is all very confusing.

mitch-dc commented 1 year ago

It's a mess right now. My car had 11 alerts that i need to relogin. After i just did that 😂

torge70 commented 1 year ago

Tried to log in to myvokswagen.de and accept terms. Still not working for me.

2023-02-17 19:39:02.834 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Volkswagen We Connect ID for volkswagen_we_connect_id File "/config/custom_components/volkswagen_we_connect_id/init.py", line 47, in async_setup_entry

danros3 commented 1 year ago

Hi for me it's the same problem. I tried to remove from Hassio integration and also the file from hacs (also file from custom_components)

After reboot of HA I have only... image

I wento to my car, into VW customers website: I din't undertsand were I need to accept...

Thank you very much

mvanninhuys commented 1 year ago

I got it working again. Log in to myvolkswagen and select country, then accept terms, log out and log in again, then the question came again for which country and after reloading the plugin in ha, it works again

melstig commented 1 year ago

I also tried to log in to myvokswagen.de and accept terms. Tried also the UK and Swedish sites. Still not working for me, cannot add the integration as I was quick to remove it.

Have not seen the mentioned prompt in the car yet.

2023-02-19 11:31:23.995 ERROR (MainThread) [custom_components.volkswagen_we_connect_id.config_flow] Unexpected exception Traceback (most recent call last): File "/config/custom_components/volkswagen_we_connect_id/config_flow.py", line 64, in async_step_user info = await validate_input(self.hass, user_input) File "/config/custom_components/volkswagen_we_connect_id/config_flow.py", line 39, in validate_input await hass.async_add_executor_job(we_connect.login) File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) File "/usr/local/lib/python3.10/site-packages/weconnect/weconnect.py", line 182, in login self.__session.login() File "/usr/local/lib/python3.10/site-packages/weconnect/auth/we_connect_session.py", line 76, in login response = self.doWebAuth(authorizationUrl) File "/usr/local/lib/python3.10/site-packages/weconnect/auth/we_connect_session.py", line 242, in doWebAuth raise AuthentificationError('You have to login at myvolkswagen.de and accept the terms and conditions') weconnect.errors.AuthentificationError: You have to login at myvolkswagen.de and accept the terms and conditions

pansinmanteca commented 1 year ago

Hello from Spain. After several tries, for me is working from myvolkswagen.de only. i have tried from .es .uk and no success. Try from .de then accept all. Logout and then login again and accept all. Keep the country Germany, restar HA and everything works fine.

mitch-dc commented 1 year ago

If you log out of the app, and then login again it should fix it as well.

Edit: WeConnect ID app and not Home Assistant!

cicinovec commented 1 year ago

Hi for me it's the same problem. I tried to remove from Hassio integration and also the file from hacs (also file from custom_components)

After reboot of HA I have only... image

I wento to my car, into VW customers website: I din't undertsand were I need to accept...

Thank you very much

I have the same issue, can connect, but no entities

melstig commented 1 year ago

After some more tries on https://vwid.vwgroup.io/account, switching between countries, logging out and in again and accepted the cookies on the site I managed to re-add the integration to Home Assistant. I also logged out and in in the Android App once. I did not have to login on the Infotainment screen but exactly what step that helped is unclear.

Good luck to the rest of You that have problems!

siggmur commented 1 year ago

I'm getting a bit of a different error message. I did accept conditions, added country and restarted both HA, relogged in both we connect and HA without any luck:

File "/usr/local/lib/python3.10/site-packages/weconnect/weconnect.py", line 182, in login self.session.login() File "/usr/local/lib/python3.10/site-packages/weconnect/auth/we_connect_session.py", line 75, in login authorizationUrl = self.authorizationUrl(url='https://identity.vwgroup.io/oidc/v1/authorize') File "/usr/local/lib/python3.10/site-packages/weconnect/auth/we_connect_session.py", line 96, in authorizationUrl redirect = tryLoginResponse.headers['Location'] File "/usr/local/lib/python3.10/site-packages/requests/structures.py", line 52, in getitem__ return self._store[key.lower()][1] KeyError: 'location'

ChristianH21220 commented 1 year ago

I'm getting a bit of a different error message. I did accept conditions, added country and restarted both HA, relogged in both we connect and HA without any luck:

File "/usr/local/lib/python3.10/site-packages/weconnect/weconnect.py", line 182, in login self.__session.login() File "/usr/local/lib/python3.10/site-packages/weconnect/auth/we_connect_session.py", line 75, in login authorizationUrl = self.authorizationUrl(url='https://identity.vwgroup.io/oidc/v1/authorize') File "/usr/local/lib/python3.10/site-packages/weconnect/auth/we_connect_session.py", line 96, in authorizationUrl redirect = tryLoginResponse.headers['Location'] File "/usr/local/lib/python3.10/site-packages/requests/structures.py", line 52, in getitem return self._store[key.lower()][1] KeyError: 'location'

Hi, Same Error since today. Login at my Volkswagen and check if there was again something changed, but there is no change to see. Logout from the App at the Phone and restart HA did not help.

gapthorpe commented 1 year ago

This seems to be an issue with the backend python / VW API: https://github.com/tillsteinbach/VWsFriend/issues/435

jthun commented 1 year ago

Same here. Was working fine until I restarted HA around 15:25 CET.

ChristianH21220 commented 1 year ago

@gapthorpe : thx. That explain the issue, so we need wait that Till Steinbach check it.

mitch-dc commented 1 year ago

Let's wait. There is a big possibility that everything will magically work again. If not we need to wait for a fix in the WeConnect library :)

PalmSwe commented 1 year ago

I also have problems. Removed the integration and can't add it again. Error code below. Hope the integration will start to work soon again.

Unexpected exception Traceback (most recent call last): File "/config/custom_components/volkswagen_we_connect_id/config_flow.py", line 64, in async_step_user info = await validate_input(self.hass, user_input) File "/config/custom_components/volkswagen_we_connect_id/config_flow.py", line 39, in validate_input await hass.async_add_executor_job(we_connect.login) File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) File "/usr/local/lib/python3.10/site-packages/weconnect/weconnect.py", line 182, in login self.session.login() File "/usr/local/lib/python3.10/site-packages/weconnect/auth/we_connect_session.py", line 75, in login authorizationUrl = self.authorizationUrl(url='https://identity.vwgroup.io/oidc/v1/authorize') File "/usr/local/lib/python3.10/site-packages/weconnect/auth/we_connect_session.py", line 96, in authorizationUrl redirect = tryLoginResponse.headers['Location'] File "/usr/local/lib/python3.10/site-packages/requests/structures.py", line 52, in getitem__ return self._store[key.lower()][1] KeyError: 'location'

sebking1971 commented 1 year ago

From another integration someone has pointed out this

VW modified these URLs: LOGIN_BASE = "https://emea.bff.cariad.digital/user-login/v1" API_BASE = "https://emea.bff.cariad.digital/vehicle/v1"

And some other stuff maybe.

Broke TRONITY too but they have resolved.

Sebastian King | @.*** | +44 7711 702100


From: Mitch @.> Sent: Monday, February 27, 2023 6:10:31 PM To: mitch-dc/volkswagen_we_connect_id @.> Cc: Sebastian King @.>; Author @.> Subject: Re: [mitch-dc/volkswagen_we_connect_id] after updating to latest version of HA getting login error (Issue #143)

Let's wait. There is a big possibility that everything will magically work again. If not we need to wait for a fix in the WeConnect library :)

— Reply to this email directly, view it on GitHubhttps://github.com/mitch-dc/volkswagen_we_connect_id/issues/143#issuecomment-1446812369, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AWUI3QH7LJPREKPB3KMWLRDWZTUZPANCNFSM6AAAAAAU3ZKJBU. You are receiving this because you authored the thread.Message ID: @.***>

davidwalton0 commented 1 year ago

I have the same "KeyError: 'location')" error report in HA. Haven't removed the integration though. Ohme charger stopped seeing the ID's SoC yesterday afternoon too. I've contacted Ohme with the details.

mikrohard commented 1 year ago

The weconnect library needs to be bumped to v0.54.1. But this causes dependancy conflicts with home assistant. I installed it manually and it seems to work (but I don't recommend this to anyone).

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. T his behaviour is the source of the following dependency conflicts.
nuheat 1.0.0 requires requests==2.28.1, but you have requests 2.28.2 which is incompatible.
ibm-watson 5.2.2 requires websocket-client==1.1.0, but you have websocket-client 1.5.1 which is incompatible .
homeassistant 2023.2.5 requires requests==2.28.1, but you have requests 2.28.2 which is incompatible.
Successfully installed requests-2.28.2 weconnect-0.54.1

gmwubs commented 1 year ago

Well, for what it's worth: I did remove the custom integration, restarted home-assistant and then added the integration again [edit], then restarted home-assistant again[/edit]. No luck so far, it keeps on failing on "KeyError: 'location' ".

jonas-wilnerzon commented 1 year ago

Steinbach has released a fix now @ChristianH21220 @gapthorpe https://github.com/tillsteinbach/VWsFriend/releases/tag/v0.23.7

mtjoernelund commented 1 year ago

Had the same issue. Tried installing 1.1.4 that was just send out as pre-release. Now I get the following in the log: `Logger: homeassistant.util.package Source: util/package.py:100 First occurred: 13.51.10 (3 occurrences) Last logged: 13.51.13

Unable to install package weconnect==0.54.1: ERROR: Cannot install weconnect==0.54.1 because these package versions have conflicting dependencies. ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts [notice] A new release of pip available: 22.3 -> 23.0.1 [notice] To update, run: pip install --upgrade pip `

mvanninhuys commented 1 year ago

just installed version V0.1.4 via hacs now i get this error ''Config-flow kon niet geladen worden: 500 Internal Server Error Server got itself in trouble'' anyone have an idea? version V0.1.3 i get one Unexpected error when I enter the username and password

mtjoernelund commented 1 year ago

just installed version V0.1.4 via hacs now i get this error ''Config-flow kon niet geladen worden: 500 Internal Server Error Server got itself in trouble'' anyone have an idea? version V0.1.3 i get one Unexpected error when I enter the username and password

I get the same response with the error mentioned above in the log.

mikrohard commented 1 year ago

Just like I wrote above... this integration needs the newer version (0.54.1) of weconnect python library. But weconnect v0.54.1 depends on requests v2.28.2. Home assistant core depends on requests v2.28.1. Due to these dependancy conflicts it's impossible to resolve this properly right now. Home assistant core will need to bump the requests package dependancy.

You can manually install weconnect 0.54.1 (this will break some dependancies... but home assistant still works).

pip install weconnect==0.54.1

mtjoernelund commented 1 year ago

You can manually install weconnect 0.54.1 (this will break some dependancies... but home assistant still works).

pip install weconnect==0.54.1

Did try a manual update of the weconnect package which allowed me to sign in again, and I did get some sensors. But Soc was still not available. Seems we need to wait for an update to HA Core.

mitch-dc commented 1 year ago

Just like I wrote above... this integration needs the newer version (0.54.1) of weconnect python library. But weconnect v0.54.1 depends on requests v2.28.2. Home assistant core depends on requests v2.28.1. Due to these dependancy conflicts it's impossible to resolve this properly right now. Home assistant core will need to bump the requests package dependancy.

You can manually install weconnect 0.54.1 (this will break some dependancies... but home assistant still works).

pip install weconnect==0.54.1

This is really helpfull. Thanks!

Maby we can PR the the version bump in HA.

mitch-dc commented 1 year ago

Opened an PR: https://github.com/home-assistant/core/pull/88956

gmwubs commented 1 year ago

After installing the weconnect integration version 0.1.4, the integration didn´t work yet. Then I connected to the homeassistant container, did a pip install weconnect==0.54.1 and did another restart of homeassistant. The integration now partly works with a great number of sensors not working (see attached file). I'm looking into it to see where I did something wrong.

has_logs_vw_weconnnectid.log

mitch-dc commented 1 year ago

Fixed in https://github.com/mitch-dc/volkswagen_we_connect_id/releases/tag/v0.1.4 but you also need to update Homeassistant to at least version 2023.3.0.