homeassistant-skodaconnect: Multiple authorization & one failed

Describe the bug I have two cars connected to my skoda account, but I only got Information for one of them. In the log’s I can see that one auth is successfully and one failed.

Latest working release I don’t know, with the current, I don’t get it working.

Debug logs 2022-01-04 10:08:44 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration skodaconnect which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2022-01-04 10:08:50 INFO (MainThread) [homeassistant.bootstrap] Setting up stage 2: {..., 'skodaconnect', ...} 2022-01-04 10:09:17 INFO (MainThread) [homeassistant.setup] Setting up skodaconnect 2022-01-04 10:09:17 INFO (MainThread) [homeassistant.setup] Setup of domain skodaconnect took 0.0 seconds 2022-01-04 10:09:17 DEBUG (MainThread) [custom_components.skodaconnect] Init async_setup_entry 2022-01-04 10:09:17 INFO (MainThread) [skodaconnect.connection] Init Skoda Connect library, version 1.1.12 2022-01-04 10:09:17 DEBUG (MainThread) [skodaconnect.connection] Using service https://msg.volkswagen.de 2022-01-04 10:09:17 INFO (MainThread) [skodaconnect.connection] Initiating new login 2022-01-04 10:09:17 DEBUG (MainThread) [skodaconnect.connection] Starting authorization process for client skoda 2022-01-04 10:09:17 DEBUG (MainThread) [custom_components.skodaconnect] Init async_setup_entry 2022-01-04 10:09:17 INFO (MainThread) [skodaconnect.connection] Init Skoda Connect library, version 1.1.12 2022-01-04 10:09:17 DEBUG (MainThread) [skodaconnect.connection] Using service https://msg.volkswagen.de 2022-01-04 10:09:17 INFO (MainThread) [skodaconnect.connection] Initiating new login 2022-01-04 10:09:17 DEBUG (MainThread) [skodaconnect.connection] Starting authorization process for client skoda 2022-01-04 10:09:22 DEBUG (MainThread) [skodaconnect.connection] Get authorization page: "https://identity.vwgroup.io/oidc/v1/authorize" 2022-01-04 10:09:23 DEBUG (MainThread) [skodaconnect.connection] Get authorization page: "https://identity.vwgroup.io/oidc/v1/authorize" 2022-01-04 10:09:23 DEBUG (MainThread) [skodaconnect.connection] Got authorization endpoint: "https://identity.vwgroup.io/signin-service/v1/signin/##ID_01##@apps_vw-dilab_com?relayState=##ID_02##" 2022-01-04 10:09:23 DEBUG (MainThread) [skodaconnect.connection] Got authorization endpoint: "https://identity.vwgroup.io/signin-service/v1/signin/##ID_01##@apps_vw-dilab_com?relayState=##ID_03##" 2022-01-04 10:09:23 DEBUG (MainThread) [skodaconnect.connection] Got redirect to signin-service 2022-01-04 10:09:23 DEBUG (MainThread) [skodaconnect.connection] Extracted form attribute: ('_csrf', '##ID_04##') 2022-01-04 10:09:23 DEBUG (MainThread) [skodaconnect.connection] Extracted form attribute: ('relayState', '##ID_02##') 2022-01-04 10:09:23 DEBUG (MainThread) [skodaconnect.connection] Extracted form attribute: ('hmac', '##ID_05##') 2022-01-04 10:09:23 DEBUG (MainThread) [skodaconnect.connection] Start authorization for user ##User@Domain## 2022-01-04 10:09:25 DEBUG (MainThread) [skodaconnect.connection] Got redirect to signin-service 2022-01-04 10:09:25 DEBUG (MainThread) [skodaconnect.connection] Extracted form attribute: ('_csrf', '##ID_06##') 2022-01-04 10:09:25 DEBUG (MainThread) [skodaconnect.connection] Extracted form attribute: ('relayState', '##ID_03##') 2022-01-04 10:09:25 DEBUG (MainThread) [skodaconnect.connection] Extracted form attribute: ('hmac', '##ID_07##') 2022-01-04 10:09:25 DEBUG (MainThread) [skodaconnect.connection] Start authorization for user ##User@Domain## 2022-01-04 10:09:33 ERROR (MainThread) [skodaconnect.connection] An API error was encountered during login, try again later 2022-01-04 10:09:33 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry ##TMB***## for skodaconnect Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 313, in async_setup result = await component.async_setup_entry(hass, self) # type: ignore File "/config/custom_components/skodaconnect/__init__.py", line 142, in async_setup_entry if not await coordinator.async_login(): File "/config/custom_components/skodaconnect/__init__.py", line 790, in async_login if await self.connection.doLogin() is False: File "/usr/local/lib/python3.9/site-packages/skodaconnect/connection.py", line 136, in doLogin return await self._authorize('skoda') File "/usr/local/lib/python3.9/site-packages/skodaconnect/connection.py", line 207, in _authorize location = await self._signin_service(req, authissuer, authorizationEndpoint) File "/usr/local/lib/python3.9/site-packages/skodaconnect/connection.py", line 352, in _signin_service raise SkodaException('Authorization request failed') skodaconnect.exceptions.SkodaException: Authorization request failed 2022-01-04 10:09:34 DEBUG (MainThread) [skodaconnect.connection] Extracted form attribute: ('_csrf', '##ID_06##') 2022-01-04 10:09:34 DEBUG (MainThread) [skodaconnect.connection] Extracted form attribute: ('relayState', '##ID_03##') 2022-01-04 10:09:34 DEBUG (MainThread) [skodaconnect.connection] Extracted form attribute: ('email', '##User@Domain##') 2022-01-04 10:09:34 DEBUG (MainThread) [skodaconnect.connection] Extracted form attribute: ('hmac', '##ID_08##') 2022-01-04 10:09:34 DEBUG (MainThread) [skodaconnect.connection] Finalizing login

Installation:

  • Home Assistant variant: Home Assistant OS 7.1 with core-2021.12.7
  • Python version 3.9.7

Additional context I think the skoda api could not handle multiple auth requests. Is it possible to handle both cars with one auth-session?

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 39

Most upvoted comments

I have started working on a different approach for handling the config items where there will be only one config entry per account instead of one per vehicle. This should resolve this issue. It might take some time though since I don’t have that much spare time to work on this at the moment.

This is what I’ve done this time:

  • Deleted the code from disk
  • Removed integration
  • Restarted HASS
  • Copy skodaconnect folder to custom_components
  • Adding skodaconnect integration (with developer tools open for no-caching image image image == Skipping some time == Ok, so it seems that the Citigo-e is offline at the moment (just as my Enyaq was for a week) This means that the list is correct for now and I will check again when I’m seeing 2 cars at skoda-connect.com

Stay tuned!