Open tsfuchs opened 1 year ago
There are plans to simplify the input options in 8.x
which has not yet been released.
I guess we have been thinking they are boolean flags but maybe more like an enum depending on your vehicle?
Happy to accept a PR on this.
this is a simple boolean
this is a simple boolean
Oh wow, you‘ve found the official Hyundai api documentation? This makes our lives so much easier. Kidding aside, the Official Bluelink App sends 0, 2, 3 or 4 to the Hyundai ioniq 5. So you are unfortunately wrong, at least this is not boolean for all cars.
show that I want to see..
RAW data plz
From the python side we learned that anything returned as an int from the api that appears to be a Boolean isn't. So heating and seats are examples of that. Some items return a true or false. Anything else has additional meaning.
We are using enums to map this out.
This also differs by model.
Since I am by a PC now here is our constant file that shows what we have learned so far: https://github.com/Hyundai-Kia-Connect/hyundai_kia_connect_api/blob/master/hyundai_kia_connect_api/const.py
in my opinion is it only the send status from car.. not setable status... on/off
we are talking here about "turn on/off"
I can confirm as fact that for at least Canada the above is used for setting. I have it functional and tested in recent days.
Other regions waiting to hear from users if the app supports setting and someone to capture that traffic.
As written above, I traced the API calls the Bluelink app makes when activating steering wheel warmer and/or side mirrors/rear window. So cdnninja is definitely right that these values are not only used when reading out the vehicle status.
And I can also confirm that sending 1
for heating1
works as well for activating both even though the app sent 4
in the europe region.
@tsfuchs Could you do me a huge favor and check if your app offers this same sort of thing for heated / cooled seats? I have that implemented in canada API but not sure if offered for EU. As well if you can post what 4 means compared to my above post that would be great. I have seen a few posts lately reference 4 so would like to get the description right for it.
@cdnninja In the European version of Bluelink, at least for the Ioniq 5, there is no control of seat heating and ventilation. However, it is possible that the API requirements may work, but I have not tested this. There is no difference in the effect between 1 and 4 for my Ioniq 5, but the app sends the 4. It's possible that the number "1" always means that all available systems are activated, or it may only function for compatibility purposes. From what I've found, the API seems quite "grown" and doesn't seem to have been well thought out from the start, but rather just started and then more and more functions were added in different regions. It's possible that the API has evolved over time as new features and capabilities were added.
@arteck @cdnninja Here the extracted payload from the eu bluelink app (ioniq5), if arteck can't believe otherwise:
[ // only AC
{
"action": "start",
"deviceId": "xxx",
"hvacType": 1,
"options": {
"defrost": false,
"frontWindowHeating": 0,
"heating1": 0
},
"tempCode": "10H",
"unit": "C"
} ,
// defrost windscreen
{
"action": "start",
"deviceId": "xxx",
"hvacType": 1,
"options": {
"defrost": true,
"frontWindowHeating": 0,
"heating1": 0
},
"tempCode": "10H",
"unit": "C"
},
// side mirrors/rear window
{
"action": "start",
"deviceId": "xxx",
"hvacType": 1,
"options": {
"defrost": false,
"frontWindowHeating": 0,
"heating1": 2
},
"tempCode": "10H",
"unit": "C"
},
// steering wheel warmer
{
"action": "start",
"deviceId": "xxx",
"hvacType": 1,
"options": {
"defrost": false,
"frontWindowHeating": 0,
"heating1": 3
},
"tempCode": "10H",
"unit": "C"
},
// defrost windscreen + side mirrors/rear window
{
"action": "start",
"deviceId": "xxx",
"hvacType": 1,
"options": {
"defrost": true,
"frontWindowHeating": 0,
"heating1": 2
},
"tempCode": "10H",
"unit": "C"
},
// defrost windscreen + steering wheel warmer
{
"action": "start",
"deviceId": "xxx",
"hvacType": 1,
"options": {
"defrost": true,
"frontWindowHeating": 0,
"heating1": 3
},
"tempCode": "10H",
"unit": "C"
},
// defrost windscreen + side mirrors/rear windows + steering wheel warmer
{
"action": "start",
"deviceId": "xxx",
"hvacType": 1,
"options": {
"defrost": true,
"frontWindowHeating": 0,
"heating1": 4
},
"tempCode": "10H",
"unit": "C"
}
]
What I found in Canada with seats, and I assuming heating1 is that older cars only offered "Off" and "On" in app. That mapped to 0 and 1, which created the confusion we saw above as that appears to be Boolean. Later some cars were released that supported setting the seats so they released 2-8 as options. Both 0 and 2 being off which messed with our sensors as we never thought 2 was valid.
I suspect heating1 is the same. Now knowing if the newer cars accept the old values is a gamble and isn't ideal. However we never hit issues sending the older start_climate commands to newer cars, just missed out on the additional functionality.
Hi there,
I own a Hyundai Ioniq 5 and I would like to be able to control the climate settings remotely. I have analyzed the payloads of the API calls in the Bluelink app, and I have noticed the following:
In contrast to the current version of bluelinky, the
hvacType
parameter always uses the value1
, instead of0
. I am not sure what this parameter signifies, and it may vary for different vehicle models.For the
heating1
parameter, the following values are used depending on the settings (0 = all deactivated, 2 = side mirrors/rear window is activated, 3 = steering wheel warmer is activated, 4 = side mirrors and steering wheel warmer are activated).I would be happy to submit a PR with changes, but it would depend on how the
VehicleClimateOptions
are intended to be structured in the future.