-
Notifications
You must be signed in to change notification settings - Fork 98
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
EU (>2023) controls - how to help get working? #995
Comments
Have you tested and they don't work? My understanding is they do work. |
They don't seem to do anything and checking in Bluelink they haven't turned on the AC or whatever set on the options... HA log when performing the Climate enable option:
|
The action thing seems to be an ongoing item but shouldn't impact the first call. Climate start is very dependent on the options sent. If you sniff the traffic from the native app you can compare the payload to see what it didn't work. |
Ok, will do. It will all be HTTPS so assuming some MITM proxy required here and a 3rd party CA cert on Android etc. Tried Charles Proxy but the app refuses to connect with that even when SSL proxying is enabled. Will go down the Android emulator route, with root access to install System CA certs and the app. |
That's the right path. Certificate pinning is implemented as well which makes it harder. I have heard Android 6 helps getting around this. The blue linky discord has talked about this too. I don't live in eu so personally haven't needed to do this much. Canada is easier to sniff. |
Android 6 ??? ... is ooooold. I'm in EU/Germany and at Android 13 using 2x HA setup serving 2 raspis/HA at 2 locations. Anyway, AC f. i..is working for sure too. Its the card shown after "force update".
|
Seat Heating doesn't work remote in EU as far as I know and tested in Reality. |
Is that just because the code has changed for newer models? As the Bluelink app can do it so it must just be calling an endpoint with some json payload? |
Different payloads exist by model and years. seats aren't implemented in the payload for EU in this package right now. Someone needs to sniff the traffic and then implement it. Here is our payload format for EU: As an example here is payload for Canada cars with seat support: |
Ok, got it via HTTP toolkit. Here is the call which enables climate control (in particular seat heating/cooling) on the new EU models. Mine is a Kona 2024 Electric, UK - Right Hand Drive Note the URL is also different, there is an additional "ccs2" in the URL, and it's also v2 spa:
So from this I can deduce that the seat heating levels are: Seat heating/cooling
Defrost front windscreen
Rear and side window heating
Steering wheel heating
Duration
|
What's the best way for this to be added in to support newer EU models? I can supply all the API json calls required... |
Two options. One is I create a release with my best guess on this and you test it out. This approach may have lots of back and forth. Option two is I help you get a basic dev environment setup. I give you the exact code changes as my best guess and you can tinker and test. If tech savvy this will most likely make sense for you. |
More than happy to take option 2, test your examples and then fix/push back. How will you handle the fact that some newer cars use mainly the ccs2 endpoints and different payloads than the current/older cars? Some kind of toggle in the UI that allows the owner to select their model/year? |
I'll start with logic on if the car supports ccs2. We do that for other commands already. If that is adequate leave to that. If we have other issues can add checks for years or model checks. I'll get you more detailed step by step but to start download GitHub desktop. As well as vscode. Vscode is optional but makes things easier. Any text editor will do. Both those items are free. Once downloaded clone Hyundai Kia connect the api repo not this one. You will also need python installed but probably already is. I'm assuming you are on windows. |
Alright within github desktop:
To "Run" this code you are going to want to make a text file named something like hyundaitest.py and open it in a text editor of your choice. VS code being the easiest since it can run the python code. Past this into it, editing the path to the repo you downloaded.
Once you are to that point we can expand the testing. Once we are closer you can expand "ClimateRequestOptions" to pass the other values you pass in the seats or other settings. Think of that as your YAML automation - it is exactly what home assistant is doing. Here is what we think those values are. They seem different by car though: https://github.com/Hyundai-Kia-Connect/hyundai_kia_connect_api/blob/3a672ef3caa24a7908e33326f2c5d801bf955d7a/hyundai_kia_connect_api/const.py#L44-L65 Let me know if that is enough to get you setup to test the code directly. I created a branch, lets move to comments to the pull request for it here: Hyundai-Kia-Connect/hyundai_kia_connect_api#705 So we can comment on specific code. |
Thanks @cdnninja, got it all up and running giving me the ability to test/commit changes. I've now adapted the code to pass/accept variables rather than the hardcoded json. It's working 👍 I had to fork the repo in order to push my changes up, so please see badnbusy/hyundai_kia_connect_api@d20d830 One question I do have is that for the CCS2 start_climate call, the "defrost" is now an integer not a boolean in following data class
I am still sending True/False but then converting it to int() when it forms the payload, is that okay? It seems to work fine when either not setting it, or setting to 0/1. Also, in the ccs2 payload for climate, there is a param called Please let me know your initial thoughts. I will now move on to getting the other car features working, like lock/unlock as these currently don't work either and require ccs2. *** edit *** Two further commits... (new branch called hyundai-ccs2-eu) support lock/unlock: support start/stop charge: Thanks |
@cdnninja The PR you opened for this now appears to be closed without the code from my forked branch, any ideas when it will be merged to hyundai_kia_connect_api repo? https://github.com/badnbusy/hyundai_kia_connect_api/commits/EUSeats Thanks! |
#offtopic... can you share your dashboard? it looks really good |
This is super timely - I'm happy to help with any testing, UK Ioniq 5N |
Sorry, I offered already some yaml, but too much personal data in the dasboard to share. |
How can I help in getting the newer cars EU (>2023) controls working like Climate, Seat Controls, Charge Start/Stop, Open/Close Windows etc?
According to the docs, these controls are possible on pre 2023 models so what has changed?
How can I help in figuring out the API calls/endpoints?
I have a Hyundai Kona EV 2024 (UK).
Thanks
The text was updated successfully, but these errors were encountered: