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
413 stars 85 forks source link

Australian Driver - Hyundai Kona Premium with Sunroof #692

Closed online-geek closed 1 year ago

online-geek commented 1 year ago

I've just bought a Hyundai Kona Premium with Sunroof. I'd love to help get this integration working in Australia with Home Assistant. Can you please confirm what i need to do to be a part of it?

cdnninja commented 1 year ago

Someone just actually reverse engineered this api. It's actively in the works. Plans exist for this person to add support shortly.

online-geek commented 1 year ago

THanks. In the meantime, i assume that I cannot connect using the current add on as I'm in Australia - is this correct?

cdnninja commented 1 year ago

Yes that is correct.

cdnninja commented 1 year ago

@bitnimble has added this support. Feedback is appreciated! You will need to update from "master" in HACS until our next release.

online-geek commented 1 year ago

I’ve tried to connect after updating and I get an error saying

Unexpected error

cdnninja commented 1 year ago

@online-geek could you provide the error and if no additional detail in it enable debug logs and provide them?

online-geek commented 1 year ago

This error originated from a custom integration.

Logger: custom_components.kia_uvo.config_flow Source: custom_components/kia_uvo/config_flow.py:63 Integration: Hyundai / Kia Connect (documentation, issues) First occurred: August 17, 2023 at 3:16:23 PM (8 occurrences) Last logged: 1:12:23 PM

Unexpected exception Traceback (most recent call last): File "/config/custom_components/kia_uvo/config_flow.py", line 159, in async_step_user await validate_input(self.hass, user_input) File "/config/custom_components/kia_uvo/config_flow.py", line 63, in validate_input token: Token = await 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/KiaUvoApiAU.py", line 149, in login raise AuthenticationError("Login Failed") hyundai_kia_connect_api.exceptions.AuthenticationError: Login Failed

cdnninja commented 1 year ago

We have confirmed it's working for two other people. Debug logs will be needed to see what's going on.

Please confirm you can login to the native app and password is correct.

online-geek commented 1 year ago

Hi, Yes I have a Hyundai account and a Bluelink account, both of which are working without issue. Can you please confirm if there is another app that I need to check? Thanks for this. Jon.

bitnimble commented 1 year ago

heya, i added the Australia support recently! keen to help debug this.

massive shot in the dark, but I hit this myself, so maybe luck would have it that it's the same for you... is your Bluelink password longer than 20 characters? e.g. did you use a password manager / generator? the signup + login form actually caps out at 20 chars, so my password was longer than 20 chars but I never noticed until I tried logging in through the API and kept getting locked out 😅

online-geek commented 1 year ago

I counted and yes my password is longer than 20 charactersbut when I try to change it, I keep getting told to make it english between 8-20 characters etc..... I have tried multiple passwords with no luck.

cdnninja commented 1 year ago

Just a theory. Try enter just the first 20 characters into home assistant or the password change prompt.

bitnimble commented 1 year ago

Yeah, that's what I did, just trimmed my password in my password manager back to the first 20 chars and made sure to use that during the home assistant setup flow :)

online-geek commented 1 year ago

Are you doing that in the Bluelink app? i have tried that but it won't let me change my password.

online-geek commented 1 year ago

This error originated from a custom integration.

Logger: custom_components.kia_uvo.config_flow Source: custom_components/kia_uvo/config_flow.py:63 Integration: Hyundai / Kia Connect (documentation, issues) First occurred: 8:47:40 AM (4 occurrences) Last logged: 10:49:40 AM

Unexpected exception Traceback (most recent call last): File "/config/custom_components/kia_uvo/config_flow.py", line 159, in async_step_user await validate_input(self.hass, user_input) File "/config/custom_components/kia_uvo/config_flow.py", line 63, in validate_input token: Token = await 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/KiaUvoApiAU.py", line 149, in login raise AuthenticationError("Login Failed") hyundai_kia_connect_api.exceptions.AuthenticationError: Login Failed

bitnimble commented 1 year ago

No, I didn't end up changing my password in real Bluelink, but rather just only typing the first 20 chars of my password into the home assistant setup flow.

If your password is longer than 20 characters, then it actually isn't, it is exactly 20 characters. Bluelink would have cut it off at 20 characters when you first signed up and created your account; you are able to login even pasting the "longer than 20 character" password because the login screen also happens to cut off the input at 20 characters, so it happens to work out 😅

If this ends up being the problem for you as well then I will look at putting a 20 char cap in the home assistant setup flow for Australia at least (will check other regions too).

bitnimble commented 1 year ago

ofc there's still the very likely chance that the login error is something else entirely too. if that ends up being the case then I'd recommend joining the Discord so we can chat and debug much faster!

https://discord.gg/qUSeTgqU

online-geek commented 1 year ago

followed that advice, logged in and it worked... but not I cannot see the entity. will put this in the discord chat.

cdnninja commented 1 year ago

@online-geek this working now? If so I'll close this.

online-geek commented 1 year ago

Yes please close this issue and mark as solved/completed. Thank you for your help!