Hyundai-Kia-Connect / hyundai_kia_connect_api

This is a Kia UVO and Hyundai Bluelink written in python. It is primary consumed by home assistant. If you are looking for a home assistant Kia / Hyundai implementation please look here: https://github.com/Hyundai-Kia-Connect/kia_uvo. Much of this base code came from reading bluelinky and contributions to the kia_uvo home assistant project.
MIT License
132 stars 75 forks source link

Fix #514 Genesis EU authentication (needs review) #638

Open RobXYZ opened 1 month ago

RobXYZ commented 1 month ago

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 commented 1 month ago

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.