Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(EU): #514 Genesis EU authentication #638

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

RobXYZ
Copy link

@RobXYZ RobXYZ commented Sep 27, 2024

This is a fix for #514

I initially tried to adjust the existing auth flow but couldn’t get it to work so started from scratch. I recorded the API and reproduced the HTTP requests in a test script then incorporated it. I am not sure if all steps are required.

Apologies if the code is messy, I don’t fully understand the API or library and used ChatGPT to mash it all together. This code works for Genesis but may have broken the other brands. Hopefully it’s a start and someone with better knowledge and skills can take a look through and tidy it up or suggest changes before merging.

@cdnninja
Copy link
Collaborator

cdnninja commented Oct 4, 2024

This does break other brands as you can see from the failed test build, that calls a real car.

This code will need to be aligned to existing if close enough logic, which it appears to be. If drastically different a new class needs to be defined.

@pasqualito79
Copy link

Hi there, any chance that this code and therefore Genesis support will be integrated?

@cdnninja
Copy link
Collaborator

cdnninja commented Mar 6, 2025

Someone with a Genesis will need to complete the required changes before it is merged. Currently this code breaks the other brands.

@pasqualito79
Copy link

I have a Genesis to test...but I'm not a developer :-(

@RobXYZ
Copy link
Author

RobXYZ commented Mar 7, 2025

I will try to integrate the code properly

@RobXYZ RobXYZ reopened this Mar 7, 2025
@RobXYZ
Copy link
Author

RobXYZ commented Mar 7, 2025

I tried to update the existing authentication flow but it always failed to fetch the token. Even comparing HTTP requests I couldn’t figure out why. Instead I’ve created a new flow for Genesis replicating exactly what I logged from my phone app and this seems to work for me.

@RobXYZ RobXYZ changed the title Fix #514 Genesis EU authentication (needs review) fix: #514 Genesis EU authentication (needs review) Mar 7, 2025
@cdnninja cdnninja changed the title fix: #514 Genesis EU authentication (needs review) fix: #514 Genesis EU authentication Mar 7, 2025
@pasqualito79
Copy link

sounds great! Are the commands after authentication also working? Like getting the current SOC?

@RobXYZ
Copy link
Author

RobXYZ commented Mar 10, 2025

Yes, I've been using it in Home Assistant since September and everything seems to work with with our electrified GV70 once the authentication is successful.

You can test it by manually installing the Kia Uvo integration in Home Assistant (place in custom_components) and change the requirements line in manifest.json to:

"requirements": ["git+https://github.com/RobXYZ/hyundai_kia_connect_api.git@master#egg=hyundai_kia_connect_api"],

@pasqualito79
Copy link

I'll try to test this ;-) I don't use HA at the moment but I want to integrate this into the evcc project here: evcc-io/evcc#13929

@cdnninja cdnninja changed the title fix: #514 Genesis EU authentication fix(EU): #514 Genesis EU authentication Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants