kia_uvo icon indicating copy to clipboard operation
kia_uvo copied to clipboard

No device or entity error when trying to loggin

Open gustafssonpeter opened this issue 1 year ago • 4 comments

Please check Services, Known Bug / Issues and Troubleshooting over here first: https://github.com/fuatakgun/kia_uvo/blob/master/README.md EU and Kia Niro EV

Version of the integration 2.18.1

Describe the bug Can't connect to my car when i start the integration

Debug logs if an error occurred 2024-01-04 10:16:06.829 ERROR (MainThread) [custom_components.kia_uvo.coordinator] Unexpected error fetching kia_uvo data: 'redirectUrl' Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/hyundai_kia_connect_api/KiaUvoApiEU.py", line 238, in login authorization_code = self._get_authorization_code_with_redirect_url( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/hyundai_kia_connect_api/KiaUvoApiEU.py", line 1185, in _get_authorization_code_with_redirect_url parsed_url = urlparse(response["redirectUrl"]) ~~~~~~~~^^^^^^^^^^^^^^^ KeyError: 'redirectUrl'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 300, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/kia_uvo/coordinator.py", line 107, in _async_update_data await self.async_check_and_refresh_token() File "/config/custom_components/kia_uvo/coordinator.py", line 166, in async_check_and_refresh_token await self.hass.async_add_executor_job( File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/hyundai_kia_connect_api/VehicleManager.py", line 124, in check_and_refresh_token self.initialize() File "/usr/local/lib/python3.11/site-packages/hyundai_kia_connect_api/VehicleManager.py", line 68, in initialize self.token: Token = self.api.login(self.username, self.password) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/hyundai_kia_connect_api/KiaUvoApiEU.py", line 243, in login authorization_code = self._get_authorization_code_with_form( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/hyundai_kia_connect_api/KiaUvoApiEU.py", line 1283, in _get_authorization_code_with_form parsed_url = urlparse(response["redirectUrl"]) ~~~~~~~~^^^^^^^^^^^^^^^ Outlined here: https://github.com/fuatakgun/kia_uvo/blob/master/README.md

To Reproduce

Expected behavior

Screenshots If applicable, add screenshots to help explain your problem.

Additional context

gustafssonpeter avatar Jan 04 '24 09:01 gustafssonpeter

Does your native app work? Please retry as well.

cdnninja avatar Jan 06 '24 00:01 cdnninja

I can confirm this bug. I can connect to my car with the native app. But Tibber integration and homeassistant integration show no car assigned to my account

christoph-luebbe avatar Jan 08 '24 08:01 christoph-luebbe

Does your native app work? Please retry as well.

Yes it works fine in my native KIA app

gustafssonpeter avatar Jan 08 '24 08:01 gustafssonpeter

I have the same error. My app works. Created the user in the beginning of January 2024. Europe. The integration worked before, but suddenly this error. Didn't change a thing. Removing and reinstalling didn't help.

Found the solution: I tried first to reinstall the integration, but I got the same error. Log out of the KIA APP. And log in again. Then I reinstalled the integration and it logged in. Hopefully it keeps working.

stefanuytterhoeven avatar Feb 08 '24 12:02 stefanuytterhoeven