Hyundai-Kia-Connect / kia_uvo

A Home Assistant HACS integration that supports Kia Connect(Uvo) and Hyundai Bluelink. The integration supports the EU, Canada and the USA.
MIT License
450 stars 89 forks source link

since today 15:51 no connect ... "initialisiere" #932

Closed higgy-de closed 2 months ago

higgy-de commented 2 months ago

Hello, Version 2.26.6

Since today 15:51 i cannot connect the HA Kia ... " initialisiere" ... nothing ?! after some time :

Einrichtung fehlgeschlagen, wird erneut versucht: Config Not Ready: 'redirectUrl'

Anybody else also ?

higgy-de commented 2 months ago

and now :

Einrichtung fehlgeschlagen, wird erneut versucht: Config Not Ready: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

DandeMC commented 2 months ago

Same problem here. Both from germany.

Logger: custom_components.kia_uvo.coordinator Quelle: helpers/update_coordinator.py:367 Integration: Hyundai / Kia Connect (Dokumentation, Probleme) Erstmals aufgetreten: 19:09:42 (1 Vorkommnisse) Zuletzt protokolliert: 19:09:42

Error requesting kia_uvo data: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

cdnninja commented 2 months ago

Does the native app work?

icovelev commented 2 months ago

Same here. Europe servers, Bulgaria. The native app (iOS) works without any issues.

This error originated from a custom integration.

Logger: custom_components.kia_uvo.coordinator Source: helpers/update_coordinator.py:354 integration: Kia Uvo / Hyundai Bluelink (documentation, issues) First occurred: 21:40:31 (1 occurrences) Last logged: 21:40:31

Unexpected error fetching kia_uvo data Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/hyundai_kia_connect_api/KiaUvoApiEU.py", line 250, in login authorization_code = self._get_authorization_code_with_redirect_url( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/hyundai_kia_connect_api/KiaUvoApiEU.py", line 1492, 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 354, 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 169, in async_check_and_refresh_token
    await self.hass.async_add_executor_job(
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/hyundai_kia_connect_api/VehicleManager.py", line 130, in check_and_refresh_token
    self.initialize()
  File "/usr/local/lib/python3.12/site-packages/hyundai_kia_connect_api/VehicleManager.py", line 74, in initialize
    self.token: Token = self.api.login(self.username, self.password)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/hyundai_kia_connect_api/KiaUvoApiEU.py", line 255, in login
    authorization_code = self._get_authorization_code_with_form(
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/hyundai_kia_connect_api/KiaUvoApiEU.py", line 1590, in _get_authorization_code_with_form
    parsed_url = urlparse(response["redirectUrl"])
                          ~~~~~~~~^^^^^^^^^^^^^^^
KeyError: 'redirectUrl'
JonasPed commented 2 months ago

Same problem here from Denmaek. I tried to sign out of the native app and no longer able to sign in through the native app.

Edit: Android app here.

higgy-de commented 2 months ago

IOS App is working , no problem

MichaelMKKelly commented 2 months ago

same issue in the UK

quick look at the logs and looks like its a login issue of some sort.

2024-09-16 19:51:22.313 DEBUG (SyncWorker_36) [hyundai_kia_connect_api.KiaUvoApiEU] hyundai_kia_connect_api - Sign In Response: {'errId': '98a1f60e-c60d-470c-834a-1d7dd8e52096', 'errCode': '4003', 'errMsg': 'Invalid values'}

fuatakgun commented 2 months ago

couple of days ago, they were some updates and probably changed the login implementation again to block us

Steven77nl commented 2 months ago

Same issues here, from NL. The IOS App initially still worked, but also stopped working when I did a logoff and tried to login again. Both looks related to the login process.

roosenbrug commented 2 months ago

Same problem here from the Netherlands. I have the Android app, but I'll leave it logged in for now.

JonasPed commented 2 months ago

Looks like that as a part of the login flow there is a redirect to https://prd.eu-ccapi.kia.com:8080/api/v1/user/integration/redirect/login?user_id=>&locale=en&state=>&session_state=. The call does not complete with success. It completes after a few minutes with an internal server error. This could indicate an issue at the Kia servers.

It by the way looks like a standard OIDC login flow.

I think it is time to get some sleep and check if it works tomorrow :-)

LuckyTriple7 commented 2 months ago

Im from Germany, same Problem. Android App is working fine.

steps56 commented 2 months ago

Same at my setup (Germany, Hyundai, Home Assistant). (Just Hyundai App is working nice.) New configuration of the integration ends up in loop too... sadly. Using a backup from last night also doesn't work. I guess too its made by Hyundai Server... Evcc lost connection to the car too...😪. Hopefully there will be any solution... otherwise I have to use Evcc / the Ioniq5 just charging in "guest mode" 😮‍💨.

After reading here everything, I will avoid to logout at the Androd Bluelink App... Hopefully its "just" a Hyundai Server problem... an being solved soon... All this cloud stuff... problematic and vulnerable.

distanzcheck commented 2 months ago

Im from Germany, same Problem. Android App is working fine.

geofflove commented 2 months ago

Same here in uk. Was working fine for my Hyundai. Did a HA core update and restarted HA tonight and this integration is stuck on 'initialising'. Same on desktop and IOS app. Car app working fine.

distanzcheck commented 2 months ago

Correct, the problem started after the Core 2024.9.2 update and subsequent restart.

steps56 commented 2 months ago

Correct, the problem started after the Core 2024.9.2 update and subsequent restart.

I used a backup bevore core update = no change, same problem. I also run a 2. HA at 2. Place, without core update. Same problem as soon as Integration restarts, or HA or ... no more working Integration/login.

Seems to be nothing rooting from that core update.

Triple-S commented 2 months ago

It seems that there is an issue with the Login-Servers. As long as you are logged in in either the integration or the official app everything works. So it was caused only indirectly by the core update because after that HA restarts and because of the server issue the integration was not able to log back in.

steps56 commented 2 months ago

I wrote at the Bluelink support some mintes ago:

Screenshot_20240916_231819_K-9 Mail

ippo112 commented 2 months ago

same problem from Italy, I have HA 2024.8.3

RuneNyhuus commented 2 months ago

Same issue in Denmark..

markpoirters commented 2 months ago

Same issue in NL since 16-9

Art3Ska commented 2 months ago

I have exactly the same as you guys. The native Bluelink application is working well.

fkieber commented 2 months ago

Same problem in France. I don't know if it's related, but my 12v battery discharged at the same time. Screenshot_20240916-193656

Steven77nl commented 2 months ago

I agree it has nothing to do with HA or the integration. For me also it started after a reboot needed for installing another integration. But the IOS App was still working fine at this point, so my first though was that I messed up something in the config.

I reverted everything back, but still had the initializing problem. Seeing the debug logs I finally came to the conclusion it must be an issue with the login process.

So testing that theory, I forced a logoff on the IOS App and tried to login again, which failed. This means as long as you have a valid logon token, you are fine. As soon as you need to request a new one, it will fail. So this is why the HA Integration starts failing after 'any' restart, no matter if you upgraded your HA, changed a integration or just did a reboot for reloading your config.

Problem will need to be fixed at the Hyundai/Kia Server side.

walter-ve commented 2 months ago

Noticed an hour ago the sensors were not updating for 11 hours.
I just upgraded the KIA integration to last version and rebooted HA; it works again nicely.

FlyHigh-Swe commented 2 months ago

The integration is now working for me again. I had the same issue as above (lost connection after a restart related to other integrations). I also lsot connection with the Android app after login out. Both the app and the integration works as expected now.

Art3Ska commented 2 months ago

Yes, I confirm, now it is working correctly! So, I had to be some issue on Kia/Hyundai servers' side.

ippo112 commented 2 months ago

now it's ok

steps56 commented 2 months ago

As we assumed, it was a hyundai server problem. I got some answer this morning:

Screenshot_20240917_121818_K-9 Mail

Now working again as usual 👌. That was again a little hint, how cained most stuff is already, by foreign cloud server stuff... Most I use, is working local, but Hyundai car no way to get data local sadly 😪

markpoirters commented 2 months ago

working here also 👍

LiveForToday commented 2 months ago

Hello. I have a Hyundai in the USA. I'm still seeing this. I've signed out of the app on my mobile without issue. I have restarted HA a couple of times now. I do not see an update available. Is there something else I need to get this working again? Thanks.

fuatakgun commented 2 months ago

Hello. I have a Hyundai in the USA. I'm still seeing this. I've signed out of the app on my mobile without issue. I have restarted HA a couple of times now. I do not see an update available. Is there something else I need to get this working again? Thanks.

This was an EU specific issue, not US. please open a separate issue and attach debug logs

steps56 commented 2 months ago

Hello. I have a Hyundai in the USA. I'm still seeing this. I've signed out of the app on my mobile without issue. I have restarted HA a couple of times now. I do not see an update available. Is there something else I need to get this working again? Thanks.

Did you set your 4digit pin at the configuration again ?

LiveForToday commented 2 months ago

Hello. I have a Hyundai in the USA. I'm still seeing this. I've signed out of the app on my mobile without issue. I have restarted HA a couple of times now. I do not see an update available. Is there something else I need to get this working again? Thanks.

Did you set your 4digit pin at the configuration again ?

I do not have the option when I click configure. Perhaps I'm just missing something? I did not remove the configuration. I am only reloading and or restarting HA. Hyundai_Integration

cdnninja commented 2 months ago

As previously mentioned. Region implementation is completely different. Almost no overlap. Advice between regions typically doesn't apply. A new issue is needed.