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
458 stars 89 forks source link

Ability to set seat heat/cool levels? #225

Closed dallaby23 closed 1 year ago

dallaby23 commented 2 years ago

Hi just curious if it is possible to add the ability to adjust the seat heaters/cooling to this integration.. My steering wheel heat comes on when I select the option but no seat heat.. I can try and collect logs if you direct me as to what would help.. I have a 2021 Kia Seltos SX Turbo in Canada..

cdnninja commented 2 years ago

Can this be done in the native app? If so we can!

On Dec 29, 2021, at 8:01 AM, dallaby23 @.***> wrote:

 Hi just curious if it is possible to add the ability to adjust the seat heaters/cooling to this integration.. My steering wheel heat comes on when I select the option but no seat heat.. I can try and collect logs if you direct me as to what would help.. I have a 2021 Kia Seltos SX Turbo in Canada..

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.

dallaby23 commented 2 years ago

Yes.. in my car I have the ability to set the heat to 3 levels in both front and rear seats.. as well as set the cooling to 3 levels in the front seats.

On Wed., Dec. 29, 2021, 11:18 a.m. cdnninja, @.***> wrote:

Can this be done in the native app? If so we can!

On Dec 29, 2021, at 8:01 AM, dallaby23 @.***> wrote:

 Hi just curious if it is possible to add the ability to adjust the seat heaters/cooling to this integration.. My steering wheel heat comes on when I select the option but no seat heat.. I can try and collect logs if you direct me as to what would help.. I have a 2021 Kia Seltos SX Turbo in Canada..

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.

— Reply to this email directly, view it on GitHub https://github.com/fuatakgun/kia_uvo/issues/225#issuecomment-1002671437, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOFF6RUZBGBAYJRJMJ4EHWTUTMYGVANCNFSM5K6DGWZA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

cdnninja commented 2 years ago

@dallaby23 to confirm you mean it can be done in the Kia app?

dallaby23 commented 2 years ago

Yes on my phone I have the ability set engine start settings .. seats are one of the options like steering wheel and defrost

On Wed., Dec. 29, 2021, 11:36 a.m. cdnninja, @.***> wrote:

@dallaby23 https://github.com/dallaby23 to confirm you mean it can be done in the Kia app?

— Reply to this email directly, view it on GitHub https://github.com/fuatakgun/kia_uvo/issues/225#issuecomment-1002678873, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOFF6RVL3U4HLIIWWCI4P3DUTM2HBANCNFSM5K6DGWZA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

cdnninja commented 2 years ago

To implement this we will need a capture of what the website or app are sending to the car. Instructions are here: https://github.com/fuatakgun/kia_uvo/wiki/How-to-sniff-API-via-MS-Edge

What I am looking for is something that resembles the following. This is how we currently send:

{
            "setting": {
                "airCtrl": int(climate),
                "defrost": defrost,
                "heating1": int(heating),
                "igniOnDuration": duration,
                "ims": 0,
                "airTemp": {"value": set_temp, "unit": 0, "hvacTempType": 0},
            },
            "pin": self.pin,
        }

This will be send to the page "rmtstrt"

dallaby23 commented 2 years ago

Sorry for the delay.. when started I had set the front left seat to 3-heat front right seat to 3-cool rear right seat to 1-heat and rear left seat to 2-heat(rear seats only have 2 heat settings).. also I had set heated steering wheel to on front defrost to on climate to on with a temperature setting of 25 and a duration of 10 min.. and hear is what was sent in rmtstrt

{"setting":{"airCtrl":1,"defrost":true,"airTemp":{"value":"16H","unit":0,"hvacTempType":1},"heating1":1,"igniOnDuration":10,"seatHeaterVentCMD":{"drvSeatOptCmd":8,"astSeatOptCmd":5,"rlSeatOptCmd":8,"rrSeatOptCmd":6},"ims":0},"pin":"XXXX"}

On Tue, Jan 4, 2022 at 1:23 PM cdnninja @.***> wrote:

To implement this we will need a capture of what the website or app are sending to the car. Instructions are here: https://github.com/fuatakgun/kia_uvo/wiki/How-to-sniff-API-via-MS-Edge

What I am looking for is something that resembles the following. This is how we currently send:

{ "setting": { "airCtrl": int(climate), "defrost": defrost, "heating1": int(heating), "igniOnDuration": duration, "ims": 0, "airTemp": {"value": set_temp, "unit": 0, "hvacTempType": 0}, }, "pin": self.pin, }

This will be send to the page "rmtstrt"

— Reply to this email directly, view it on GitHub https://github.com/fuatakgun/kia_uvo/issues/225#issuecomment-1005062942, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOFF6RXBCWJD4WVAX5SIAJDUUM3LPANCNFSM5K6DGWZA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

cdnninja commented 2 years ago

This is very helpful. Two more questions I have. 1. A understanding of what each number means. 2. Figure out where the heated steering will is. I am wondering if heating1 is the steering wheel? In the existing integration if you call remote start with heat enabled does the steering wheel turn on? I have seen IMS before but don't know if it does anything on a model. I think it is seat memory.

As for the values what I think so far:

1: Unknown 2: Unknown 3: Assuming low cool 4: Assuming medium cool 5: Full cool 6: Low heat 7: Assuming medium heat only for front 8: High heat

Could you repeat the test to see what "off" is?

dallaby23 commented 2 years ago

Below is a sniff with left front seat set to 1-cool, right front seat set to 2-cool, rear right seat set to 1-heat, and rear left seat set to off.. So I think your assumptions above are correct with the off at a value of 2. Also I set the 'heated steering wheel, side&back defroster' (this is what the option is in the app) to on.. I think that corresponds to 'heating1' ? , and in my case is steering wheel, side mirrors and rear window defrost..

  1. {setting: {airCtrl: 0, defrost: false, heating1: 1, igniOnDuration: 3,…}, pin: "XXXX"}
    1. pin: "XXXX"
    2. setting: {airCtrl: 0, defrost: false, heating1: 1, igniOnDuration: 3,…}
      1. airCtrl: 0
      2. defrost: false
      3. heating1: 1
      4. igniOnDuration: 3
      5. ims: 0
      6. seatHeaterVentCMD: {drvSeatOptCmd: 3, astSeatOptCmd: 4, rlSeatOptCmd: 2, rrSeatOptCmd: 6}

On Wed, Jan 5, 2022 at 11:14 AM cdnninja @.***> wrote:

This is very helpful. Two more questions I have. 1. A understanding of what each number means. 2. Figure out where the heated steering will is. I am wondering if heating1 is the steering wheel? In the existing integration if you call remote start with heat enabled does the steering wheel turn on? I have seen IMS before but don't know if it does anything on a model. I think it is seat memory.

As for the values what I think so far:

1: Unknown 2: Unknown 3: Assuming low cool 4: Assuming medium cool 5: Full cool 6: Low heat 7: Assuming medium heat only for front 8: High heat

Could you repeat the test to see what "off" is?

— Reply to this email directly, view it on GitHub https://github.com/fuatakgun/kia_uvo/issues/225#issuecomment-1005865830, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOFF6RWAI3Z3WFGMBFRVGXTUURU53ANCNFSM5K6DGWZA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

cdnninja commented 2 years ago

Great - so assuming that home assistant integration already works for steering wheel heat (heating1) We just need to add the seats using the below codes. I will also need to test to see if I send these to a car that doesn't support it what happens. Mine would be an example of that.

1: Unknown 2: Off 3: Low Cool 4: Medium Cool 5: Full Cool 6: Low Heat 7: Medium Heat 8: High Heat

@fuatakgun Does your EU car support any of these items? If so I can look at mapping these over that way at the same time.

fuatakgun commented 2 years ago

No, sadly not, i have plugin hybrid and when i call service, it throws an error saying that only EVs are supported.

You can create an optional input as a dictionary similar to service call. We can put these optional attributes under it.

dallaby23 commented 2 years ago

You are correct the steering wheel integration currently works perfect..

On Wed, Jan 5, 2022 at 5:01 PM cdnninja @.***> wrote:

Great - so assuming that home assistant integration already works for steering wheel heat (heating1) We just need to add the seats using the below codes. I will also need to test to see if I send these to a car that doesn't support it what happens. Mine would be an example of that.

1: Unknown 2: Off 3: Low Cool 4: Medium Cool 5: Full Cool 6: Low Heat 7: Medium Heat 8: High Heat

@fuatakgun https://github.com/fuatakgun Does your EU car support any of these items? If so I can look at mapping these over that way at the same time.

— Reply to this email directly, view it on GitHub https://github.com/fuatakgun/kia_uvo/issues/225#issuecomment-1006112071, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOFF6RVBACL2LYG3JO4T65LUUS5R7ANCNFSM5K6DGWZA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

cdnninja commented 2 years ago

I have a PR that uses these states to fix a related issue. If that tests okay I will move onto this one. Does your car have this issue: #195? If so you could test it for me.

dallaby23 commented 2 years ago

so my 2021 Kia Seltos in Canada shows under developer tools>states as off when the car is off correctly.. I will test when the car is running but I believe they report accurately from my previous tests.. I do not see these reported under configuration>devices at all..

On Tue, Jan 11, 2022 at 11:34 PM cdnninja @.***> wrote:

I have a PR that uses these states to fix a related issue. If that tests okay I will move onto this one. Does your car have this issue: #195 https://github.com/fuatakgun/kia_uvo/issues/195? If so you could test it for me.

— Reply to this email directly, view it on GitHub https://github.com/fuatakgun/kia_uvo/issues/225#issuecomment-1010625928, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOFF6RTBA53PHEI63FOJOXDUVUAFXANCNFSM5K6DGWZA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

cdnninja commented 2 years ago

When the car is on does both your app and Home Assistant only report on and not the heat level or cool status?

xKronyx commented 2 years ago

I have a 2023 Stinger and i also have the hability to set the temperature of the front seats (cool and heat) in the application but i don't see it in home assistant

BTW your integration is very nice !

cdnninja commented 1 year ago

I have a little bit more work to do on this in the API but this is close! I just released 2.X as the new prod release so expect some issues coming in over the next few days. After that I will return to this and finish it up.

xKronyx commented 1 year ago

Cool ! Thanks a lot !

cdnninja commented 1 year ago

Can you edit your manifest.json file to show 1.46.0 as a API version? In theory it works assuming your car is an EV.

xKronyx commented 1 year ago

My car is a Stinger not an EV

cdnninja commented 1 year ago

Right - you mentioned that. For those with an EV please test with 1.46.0. I will go test if sending seat status to a ICE breaks for cars that don't support this feature. If it does break on mine it will change how I approach this.

cdnninja commented 1 year ago

I mixed up which is which. 1.47.1 will work on ICE not EVs. If you update in HACS to "master" and test it out that would be awesome.

cdnninja commented 1 year ago

@dallaby23 could you test this out?

unsoluble commented 1 year ago

What can I do/provide that would be helpful, as someone with a Canadian EV Kona running 2.2.1?

cdnninja commented 1 year ago

Did you get an error when trying to set seats? Does the mobile app work?

unsoluble commented 1 year ago

I don't think I get an error when passing those options in the climate script, but to be honest I'm not sure where to look for one.

The BlueLink mobile app does not offer the seats as remote climate options.

Wondering if this might be overridden by the seats' pressure sensors?

cdnninja commented 1 year ago

I don't think I get an error when passing those options in the climate script, but to be honest I'm not sure where to look for one.

The BlueLink mobile app does not offer the seats as remote climate options.

Wondering if this might be overridden by the seats' pressure sensors?

If your native app doesn't support seat settings our integration won't either. Some cars offer this in the native mobile app such as the stinger.

unsoluble commented 1 year ago

Ah, gotcha. Okay, dead-end for me here, thanks tho! :)

xKronyx commented 1 year ago

I can't test it yet, my car is at the dealer

Le ven. 23 déc. 2022, 17 h 22, John Weston @.***> a écrit :

Ah, gotcha. Okay, dead-end for me here, thanks tho! :)

— Reply to this email directly, view it on GitHub https://github.com/Hyundai-Kia-Connect/kia_uvo/issues/225#issuecomment-1364365319, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD3DFOWOIBR2MNAFVNF5WCDWOYQZLANCNFSM5K6DGWZA . You are receiving this because you commented.Message ID: @.***>

dallaby23 commented 1 year ago

Sorry for the delay.. just got a chance to get this tested.. I havnt tested all possible combinations yet but I set front left to high heat, front right to high cool rear left and right to high heat and all worked.. steering wheel heat worked as it always has.. all defrost options worked.. also I will reply to other thread but temperature was correct as well.. also as a reminder this is a 2021 Kia Seltos in Canada..

On Thu., Dec. 22, 2022, 2:44 p.m. cdnninja, @.***> wrote:

@dallaby23 https://github.com/dallaby23 could you test this out?

— Reply to this email directly, view it on GitHub https://github.com/Hyundai-Kia-Connect/kia_uvo/issues/225#issuecomment-1363280142, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOFF6RUJO6C5QNC3KTABGMLWOSVS7ANCNFSM5K6DGWZA . You are receiving this because you were mentioned.Message ID: @.***>

cdnninja commented 1 year ago

Glad to hear! I'll close for now.

xKronyx commented 1 year ago

Sorry for the delay.. just got a chance to get this tested.. I havnt tested all possible combinations yet but I set front left to high heat, front right to high cool rear left and right to high heat and all worked.. steering wheel heat worked as it always has.. all defrost options worked.. also I will reply to other thread but temperature was correct as well.. also as a reminder this is a 2021 Kia Seltos in Canada.. On Thu., Dec. 22, 2022, 2:44 p.m. cdnninja, @.> wrote: @dallaby23 https://github.com/dallaby23 could you test this out? — Reply to this email directly, view it on GitHub <#225 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOFF6RUJO6C5QNC3KTABGMLWOSVS7ANCNFSM5K6DGWZA . You are receiving this because you were mentioned.Message ID: @.>

what is the command you sent to make this work ?

cdnninja commented 1 year ago

Check out the start_climate command in developer>service menu. Try match it to what options you have in the app.