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
413 stars 85 forks source link

USA - 2022 Kia K5 GT - Heated/vented seats setting not functional/not sent #718

Open poisonbl opened 1 year ago

poisonbl commented 1 year ago

Region/vehicle/version information

Description

kia_uvo.start_climate doesn't trigger the heated/cooled seats for my K5, regardless of setting. Dumping the request when activating from the Kia Connect webpage's interface, I get this (url decoded and pretty printed after):

https://owners.kia.com/apps/services/owners/remotevehicledata?requestJson={%22action%22:%22ACTION_EXEC_REMOTE_CLIMATE_ON%22,%22remoteClimate%22:{%22airTemp%22:{%22value%22:%2276%22,%22unit%22:1},%22airCtrl%22:true,%22defrost%22:true,%22ventilationWarning%22:false,%22ignitionOnDuration%22:{%22value%22:%2210%22,%22unit%22:4},%22heatingAccessory%22:{%22steeringWheel%22:1,%22steeringWheelStep%22:%22undefined%22,%22sideMirror%22:1,%22rearWindow%22:1},%22heatVentSeat%22:{%22driverSeat%22:{%22heatVentType%22:1,%22heatVentLevel%22:3,%22heatVentStep%22:2},%22passengerSeat%22:{%22heatVentType%22:1,%22heatVentLevel%22:4,%22heatVentStep%22:1},%22rearLeftSeat%22:{%22heatVentType%22:0,%22heatVentLevel%22:1,%22heatVentStep%22:0},%22rearRightSeat%22:{%22heatVentType%22:0,%22heatVentLevel%22:1,%22heatVentStep%22:0}}}}

{
  "action": "ACTION_EXEC_REMOTE_CLIMATE_ON",
  "remoteClimate": {
    "airTemp": {
      "value": "LOW",
      "unit": 1
    },
    "airCtrl": true,
    "defrost": false,
    "ventilationWarning": false,
    "ignitionOnDuration": {
      "value": "10",
      "unit": 4
    },
    "heatingAccessory": {
      "steeringWheel": 0,
      "steeringWheelStep": "undefined",
      "sideMirror": 0,
      "rearWindow": 0
    },
    "heatVentSeat": {
      "driverSeat": {
        "heatVentType": 2,
        "heatVentLevel": 2,
        "heatVentStep": 3
      },
      "passengerSeat": {
        "heatVentType": 2,
        "heatVentLevel": 3,
        "heatVentStep": 2
      },
      "rearLeftSeat": {
        "heatVentType": 0,
        "heatVentLevel": 1,
        "heatVentStep": 0
      },
      "rearRightSeat": {
        "heatVentType": 0,
        "heatVentLevel": 1,
        "heatVentStep": 0
      }
    }
  }
}

Looks like the values the Kia Connect webpage sends for these seats are:

And the webpage's request does include the rear seats despite the seats not having any related features and the UI on the webpage not giving any controls to set for them. The settings for temperatures, time, defrost, steering wheel, mirrors, and rear window heaters all appear to trigger as expected from the integration's service.

Regardless of whether I select only the driver, both the driver and passenger seats, or all of them including the rear seats set to "off" (which would match the way the query is sent by the kia connect web interface), the start_climate log entry appears to leave out the seat settings altogether:

2023-09-07 17:30:31.455 DEBUG (SyncWorker_6) [hyundai_kia_connect_api.KiaUvoAPIUSA] hyundai_kia_connect_api - Planned start_climate payload: {'remoteClimate': {'airCtrl': True, 'airTemp': {'unit': 1, 'value': '62'}, 'defrost': False, 'heatingAccessory': {'rearWindow': 0, 'sideMirror': 0, 'steeringWheel': 0}, 'ignitionOnDuration': {'unit': 4, 'value': 10}}}

I'm happy to poke whatever I need to for testing or the like to help out, but haven't tried diving into the code myself yet. If you need any of the vehicleInfoList I can clean that up and pass it along as well.

Thank you!

cdnninja commented 10 months ago

The mobile app traffic will need to be sniffed and this payload corrected in the code. Unfortunately no regular USA devs today so happy to receive help and PRs.

bryanjblake commented 8 months ago

Even with latest update, the heated seats in my USA K5 are always off after using climate_start

cdnninja commented 8 months ago

To confirm it works in your native app?

bryanjblake commented 8 months ago

Yes it does. I see the same request url as OP

https://owners.kia.com/apps/services/owners/remotevehicledata?requestJson={%22action%22:%22ACTION_EXEC_REMOTE_CLIMATE_ON%22,%22remoteClimate%22:{%22airTemp%22:{%22value%22:%2274%22,%22unit%22:1},%22airCtrl%22:true,%22defrost%22:false,%22ventilationWarning%22:false,%22ignitionOnDuration%22:{%22value%22:10,%22unit%22:4},%22heatingAccessory%22:{%22steeringWheel%22:1,%22steeringWheelStep%22:null,%22sideMirror%22:0,%22rearWindow%22:0},%22heatVentSeat%22:{%22driverSeat%22:{%22heatVentType%22:1,%22heatVentLevel%22:4,%22heatVentStep%22:1},%22passengerSeat%22:{%22heatVentType%22:0,%22heatVentLevel%22:1,%22heatVentStep%22:0},%22rearLeftSeat%22:{%22heatVentType%22:0,%22heatVentLevel%22:1,%22heatVentStep%22:0},%22rearRightSeat%22:{%22heatVentType%22:0,%22heatVentLevel%22:1,%22heatVentStep%22:0}}}}

This is with only the driver seat set at high heat and the rest set to off.

cdnninja commented 8 months ago

To confirm the above is a sniff from the native app? If so how does it compare to this integration? What yaml are you sending?

bryanjblake commented 8 months ago

Looking at the source of the connect api, it looks like vent step is hard coded to "1". Also seats with no setting default to 0 and then subtract 4 so I would suppose -4 is being sent in the actual request

bryanjblake commented 8 months ago

It's from the Kia Connect website in the chrome browser

bryanjblake commented 8 months ago

To confirm the above is a sniff from the native app? If so how does it compare to this integration? What yaml are you sending?

service: kia_uvo.start_climate
data:
  duration: 10
  climate: true
  temperature: 74
  heating: '1'
  device_id: cf054bd276f7e10643c99f56b5984ef8
  flseat: '8'
  frseat: '0'
  rlseat: '0'
  rrseat: '0'
  defrost: false

I also tried using

service: kia_uvo.start_climate
data:
  duration: 10
  climate: true
  temperature: 74
  heating: '1'
  device_id: cf054bd276f7e10643c99f56b5984ef8
  flseat: '8'
  frseat: '4'
  rlseat: '4'
  rrseat: '4'
  defrost: false
cdnninja commented 8 months ago

What are the debug logs showing for the payload?

bryanjblake commented 8 months ago

I just started using HACS and Home Assistant a few hours ago. Where do I find the debug logs?

I have debug logging enabled for Hundai / Kia Connect integration

cdnninja commented 8 months ago

Looking at the source of the connect api, it looks like vent step is hard coded to "1". Also seats with no setting default to 0 and then subtract 4 so I would suppose -4 is being sent in the actual request

Where would they subtract 4? That -4 is within an if statement so only applies on 6,7,8.

As for debug logs you will need to enable them. If you go to the bottom of the readme on this repo it shows how to do that. After that it will be in settings>system>logs>scroll to bottom and click full logs.

bryanjblake commented 8 months ago

Where would they subtract 4? That -4 is within an if statement so only applies on 6,7,8.

Oh right, duh

Here's the error log

Logger: hyundai_kia_connect_api.KiaUvoAPIUSA
Source: /usr/local/lib/python3.11/site-packages/hyundai_kia_connect_api/KiaUvoAPIUSA.py:85
First occurred: 1:26:17 PM (1 occurrences)
Last logged: 1:26:17 PM

hyundai_kia_connect_api - Error: unknown error response {"status":{"statusCode":1,"errorType":1,"errorCode":9001,"errorMessage":"Incorrect request payload format"}}

Sorry, that's a different error that I get when setting Steering wheel heating. I'm able to bypass that error by setting the heating option to 1 manually

Hold on and I'll grab the most recent log

cdnninja commented 8 months ago

Make sure debug logs are enabled. That looks to just be the regular error logs.

bryanjblake commented 8 months ago
023-12-28 12:53:15.854 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration kia_uvo which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-12-28 12:53:15.854 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration ha_kia_hyundai which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-12-28 12:53:15.854 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-12-28 12:56:40.474 ERROR (MainThread) [homeassistant.config_entries] Error unloading entry My K5 (K5) for ha_kia_hyundai
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 557, in async_unload
result = await component.async_unload_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/ha_kia_hyundai/__init__.py", line 286, in async_unload_entry
config_update_listener()
TypeError: 'NoneType' object is not callable
2023-12-28 12:57:12.941 WARNING (SyncWorker_5) [homeassistant.loader] We found a custom integration kia_uvo which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-12-28 12:57:12.941 WARNING (SyncWorker_5) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-12-28 13:26:17.895 ERROR (SyncWorker_11) [hyundai_kia_connect_api.KiaUvoAPIUSA] hyundai_kia_connect_api - Error: unknown error response {"status":{"statusCode":1,"errorType":1,"errorCode":9001,"errorMessage":"Incorrect request payload format"}}
2023-12-28 13:26:17.896 ERROR (MainThread) [homeassistant.components.script.warm_up] Warm Up: Error executing script. Unexpected error for call_service at pos 1:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 468, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 704, in _async_call_service_step
response_data = await self._async_run_long_action(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 666, in _async_run_long_action
return long_task.result()
^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2067, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2104, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/kia_uvo/services.py", line 70, in async_handle_start_climate
await coordinator.async_start_climate(vehicle_id, climate_request_options)
File "/config/custom_components/kia_uvo/coordinator.py", line 198, in async_start_climate
await self.hass.async_add_executor_job(
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/hyundai_kia_connect_api/VehicleManager.py", line 134, in start_climate
return self.api.start_climate(self.token, self.get_vehicle(vehicle_id), options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/hyundai_kia_connect_api/KiaUvoAPIUSA.py", line 720, in start_climate
response = self.post_request_with_logging_and_active_session(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/hyundai_kia_connect_api/KiaUvoAPIUSA.py", line 41, in request_with_active_session_wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/hyundai_kia_connect_api/KiaUvoAPIUSA.py", line 86, in request_with_logging_wrapper
raise RequestException
requests.exceptions.RequestException
2023-12-28 13:26:17.897 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [139985800237888]
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 238, in handle_call_service
response = await hass.services.async_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2067, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2104, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/script/__init__.py", line 605, in _service_handler
response = await self._async_start_run(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/script/__init__.py", line 563, in _async_start_run
script_result = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/script/__init__.py", line 594, in _async_run
return await self.script.async_run(script_vars, context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1578, in async_run
return await asyncio.shield(run.async_run())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 420, in async_run
await self._async_step(log_exceptions=False)
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 470, in _async_step
self._handle_exception(
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 493, in _handle_exception
raise exception
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 468, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 704, in _async_call_service_step
response_data = await self._async_run_long_action(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 666, in _async_run_long_action
return long_task.result()
^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2067, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2104, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/kia_uvo/services.py", line 70, in async_handle_start_climate
await coordinator.async_start_climate(vehicle_id, climate_request_options)
File "/config/custom_components/kia_uvo/coordinator.py", line 198, in async_start_climate
await self.hass.async_add_executor_job(
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/hyundai_kia_connect_api/VehicleManager.py", line 134, in start_climate
return self.api.start_climate(self.token, self.get_vehicle(vehicle_id), options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/hyundai_kia_connect_api/KiaUvoAPIUSA.py", line 720, in start_climate
response = self.post_request_with_logging_and_active_session(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/hyundai_kia_connect_api/KiaUvoAPIUSA.py", line 41, in request_with_active_session_wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/hyundai_kia_connect_api/KiaUvoAPIUSA.py", line 86, in request_with_logging_wrapper
raise RequestException
requests.exceptions.RequestException
2023-12-28 13:27:38.280 DEBUG (MainThread) [custom_components.kia_uvo.coordinator] Finished fetching kia_uvo data in 0.779 seconds (success: True)
2023-12-28 13:57:41.060 DEBUG (MainThread) [custom_components.kia_uvo.coordinator] Finished fetching kia_uvo data in 3.159 seconds (success: True)
2023-12-28 14:04:56.798 DEBUG (MainThread) [custom_components.kia_uvo.coordinator] Finished fetching kia_uvo data in 0.820 seconds (success: True)
2023-12-28 14:28:14.971 DEBUG (MainThread) [custom_components.kia_uvo.coordinator] Finished fetching kia_uvo data in 0.934 seconds (success: True)
bryanjblake commented 8 months ago

The difference I see is that KIA Connect website sends "heatVentStep": 0 for seats that are off and the api sends 1

I think VentStep should be 3 for low, 2 med, 1 for high, and 0 for off

cdnninja commented 8 months ago

You aren't running this integration. You are running another one that supports KiaUSA. You can open issues for that integration here: https://github.com/dahlb/ha_kia_hyundai

bryanjblake commented 8 months ago

"custom_components.kia_uvo.coordinator" isn't part of this integration? I did try that other integration which explains why you see it in the log, but I removed it because it's lacking most of the options available in this one.

cdnninja commented 8 months ago

Oops I saw ha_kia_hyundai.

Looks like you don't have debug logging enabled. Please edit your config yaml to enable that. It is outlined at the bottom of the readme on this page. Restart HA and you should have much more detail in the logs. Including the planned payload for this.

bryanjblake commented 8 months ago

Sorry about that. I think this is right

2023-12-28 14:50:38.701 WARNING (SyncWorker_4) [homeassistant.loader] We found a custom integration kia_uvo which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-12-28 14:50:38.701 WARNING (SyncWorker_4) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-12-28 14:50:40.928 DEBUG (SyncWorker_3) [hyundai_kia_connect_api.KiaUvoAPIUSA] hyundai_kia_connect_api - Sign In Response {"status":{"statusCode":0,"errorType":0,"errorCode":0,"errorMessage":"Success with response body"}}
2023-12-28 14:50:40.928 DEBUG (SyncWorker_3) [hyundai_kia_connect_api.KiaUvoAPIUSA] got session id f32e4dc0-3c63-4aee-837e-4b747b77870e
2023-12-28 14:50:41.952 DEBUG (SyncWorker_3) [hyundai_kia_connect_api.KiaUvoAPIUSA] hyundai_kia_connect_api - Get Vehicles Response {"status":{"statusCode":0,"errorType":0,"errorCode":0,"errorMessage":"Success with response body"},"payload":{"vehicleSummary":[{"vin":"5XXG34J25PG185846","vehicleIdentifier":"185846","modelName":"K5","modelYear":"2023","nickName":"My K5","generation":2,"extColorCode":"ERG","trim":"EX","imagePath":{"imageName":"2023-k5-ex-erg.png","imagePath":"/content/dam/kia/us/owners/image/vehicle-app/2023/k5/ex/","imageType":"1","imageSize":{"length":"100","width":"100","uom":0}},"enrollmentStatus":1,"fatcAvailable":0,"telematicsUnit":1,"fuelType":1,"colorName":"EVERLASTING SILVER","activationType":2,"mileage":"11140","dealerCode":"GA055","mobileStore":[{"osType":0,"downloadURL":"https://itunes.apple.com/us/app/kia-access-with-uvo-link/id1280548773?mt=8","image":{"imageName":"iosImage.png","imagePath":"/content/dam/kia/us/owners/image/common/app/","imageType":"2","imageSize":{"length":"100","width":"100","uom":0}}},{"osType":1,"downloadURL":"https://play.google.com/store/apps/details?id=com.myuvo.link","image":{"imageName":"androidImage.png","imagePath":"/content/dam/kia/us/owners/image/common/app/","imageType":"2","imageSize":{"length":"100","width":"100","uom":0}}}],"supportedApp":{"appType":"5","appImage":{"imageName":"uvo-app.png","imagePath":"/content/dam/kia/us/owners/image/common/app/access/","imageType":"2","imageSize":{"length":"100","width":"100","uom":0}}},"licensePlate":"","psi":"","supportAdditionalDriver":1,"customerType":0,"projectCode":"DL3","headUnitDesc":"AVN5.0W","provStatus":"4","enrollmentSuppressionType":0,"rsaStatus":0,"dsEnrollment":0,"ubiEnrollment":0,"notificationCount":0,"genType":"2","vehicleKey":"d97ba5d3-0930-46c5-9677-ee602da60235"}],"chatbotSupport":true}}
2023-12-28 14:50:41.953 DEBUG (SyncWorker_3) [hyundai_kia_connect_api.KiaUvoAPIUSA] hyundai_kia_connect_api - sending https://api.owners.kia.com/apigw/v1/cmm/gvi request with {'vehicleConfigReq': {'airTempRange': '0', 'maintenance': '1', 'seatHeatCoolOption': '0', 'vehicle': '1', 'vehicleFeature': '0'}, 'vehicleInfoReq': {'drivingActivty': '0', 'dtc': '1', 'enrollment': '1', 'functionalCards': '0', 'location': '1', 'vehicleStatus': '1', 'weather': '0'}, 'vinKey': ['d97ba5d3-0930-46c5-9677-ee602da60235']}
2023-12-28 14:50:42.758 DEBUG (SyncWorker_3) [hyundai_kia_connect_api.KiaUvoAPIUSA] hyundai_kia_connect_api got response {"status":{"statusCode":0,"errorType":0,"errorCode":0,"errorMessage":"Success with response body"},"payload":{"vehicleInfoList":[{"vinKey":"d97ba5d3-0930-46c5-9677-ee602da60235","vehicleConfig":{"vehicleDetail":{"vehicle":{"vin":"5XXG34J25PG185846","trim":{"modelYear":"2023","salesModelCode":"L4262","optionGroupCode":"017","modelName":"K5","factoryCode":"EX","projectCode":"DL3","trimName":"EX","driveType":"0","transmissionType":"1","ivrCategory":"5"},"telematics":1,"mileage":"11140","mileageSyncDate":"20231228043809","exteriorColor":"EVERLASTING SILVER","exteriorColorCode":"ERG","fuelType":1,"invDealerCode":"SC033","testVehicle":"0","supportedApps":[{"appType":"0"},{"appType":"5","appImage":{"imageName":"uvo-app.png","imagePath":"/content/dam/kia/us/owners/image/common/app/access/","imageType":"2","imageSize":{"length":"100","width":"100","uom":0}}}],"activationType":2},"images":[{"imageName":"2023-k5-ex-erg.png","imagePath":"/content/dam/kia/us/owners/image/vehicle-app/2023/k5/ex/","imageType":"1","imageSize":{"length":"100","width":"100","uom":0}}],"device":{"launchType":"0","swVersion":"DL322.USA.S5W_M.V008.001.220504","telematics":{"generation":"3","platform":"1","tmsCenter":"1","billing":true,"genType":"2"},"versionNum":"GASOLINE","headUnitType":"0","hdRadio":"X40HAF","ampType":"NA","headUnitName":"avn5w","bluetoothRef":"20","headUnitDesc":"AVN5.0W"}},"maintenance":{"nextServiceMile":4859.9004,"maintenanceSchedule":[8000,16000,24000,32000,40000,48000,56000,64000,72000,80000,88000,96000,104000]},"billingPeriod":{"freeTrial":{"value":12,"unit":0},"freeTrialExtension":{"value":12,"unit":1},"servicePeriod":{"value":60,"unit":1}}},"lastVehicleInfo":{"vehicleNickName":"My K5","preferredDealer":"GA055","licensePlate":"","psi":"","customerType":0,"enrollment":{"provStatus":"4","enrollmentStatus":"1","enrollmentType":"0","registrationDate":"20221113","expirationDate":"20231113","expirationMileage":"100000","freeServiceDate":{"startDate":"20221113","endDate":"20231113"}},"activeDTC":{"dtcActiveCount":"0"},"vehicleStatusRpt":{"statusType":"2","reportDate":{"utc":"20231228195042","offset":-8},"vehicleStatus":{"climate":{"airCtrl":false,"defrost":false,"airTemp":{"value":"72","unit":1},"heatingAccessory":{"steeringWheel":0,"sideMirror":0,"rearWindow":0},"heatVentSeat":{"driverSeat":{"heatVentType":0,"heatVentLevel":1},"passengerSeat":{"heatVentType":0,"heatVentLevel":1},"rearLeftSeat":{"heatVentType":0,"heatVentLevel":1},"rearRightSeat":{"heatVentType":0,"heatVentLevel":1}}},"engine":false,"doorLock":true,"doorStatus":{"frontLeft":0,"frontRight":0,"backLeft":0,"backRight":0,"trunk":0,"hood":0},"lowFuelLight":false,"ign3":false,"transCond":true,"distanceToEmpty":{"value":39,"unit":3},"tirePressure":{"all":0},"dateTime":{"utc":"20231228195042","offset":-8},"syncDate":{"utc":"20231228193809","offset":-8},"batteryStatus":{"stateOfCharge":61,"deliveryMode":1,"warning":65,"powerAutoCutMode":2},"sleepMode":false,"lampWireStatus":{"headLamp":{"headLampStatus":false,"lampLL":false,"lampRL":false,"lampLH":false,"lampRH":false,"lampLB":false,"lampRB":false},"stopLamp":{"leftLamp":false,"rightLamp":false},"turnSignalLamp":{"lampLF":false,"lampRF":false,"lampLR":false,"lampRR":false}},"windowStatus":{"windowFL":0,"windowFR":0,"windowRL":0,"windowRR":0},"smartKeyBatteryWarning":false,"fuelLevel":8,"washerFluidStatus":true,"brakeOilStatus":false,"engineOilStatus":false,"engineRuntime":{},"remoteControlAvailable":1,"valetParkingMode":0,"rsaStatus":0}},"location":{"coord":{"lat":32.010025,"lon":-82.0637027778,"alt":43,"type":0,"altdo":0},"head":322,"speed":{"value":0,"unit":1},"accuracy":{"hdop":8,"pdop":13},"syncDate":{"utc":"20231228193809","offset":-8}},"financed":true,"financeRegistered":false,"linkStatus":0,"rsaStatus":0}}]}}
2023-12-28 14:50:42.759 DEBUG (SyncWorker_3) [hyundai_kia_connect_api.KiaUvoAPIUSA] hyundai_kia_connect_api - last_updated_at - before 20231228193809
2023-12-28 14:50:42.759 DEBUG (SyncWorker_3) [hyundai_kia_connect_api.KiaUvoAPIUSA] hyundai_kia_connect_api - last_updated_at - after 2023-12-28 19:38:09+00:00
2023-12-28 14:50:42.759 DEBUG (SyncWorker_3) [hyundai_kia_connect_api.KiaUvoAPIUSA] hyundai_kia_connect_api - SOC Levels couldn't be found. May not be an EV.
2023-12-28 14:50:42.759 DEBUG (SyncWorker_3) [hyundai_kia_connect_api.KiaUvoAPIUSA] hyundai_kia_connect_api - last_updated_at - before 20231228193809
2023-12-28 14:50:42.759 DEBUG (SyncWorker_3) [hyundai_kia_connect_api.KiaUvoAPIUSA] hyundai_kia_connect_api - last_updated_at - after 2023-12-28 19:38:09+00:00
2023-12-28 14:50:42.759 DEBUG (MainThread) [custom_components.kia_uvo.coordinator] Finished fetching kia_uvo data in 2.666 seconds (success: True)
2023-12-28 14:51:33.243 DEBUG (SyncWorker_0) [hyundai_kia_connect_api.KiaUvoAPIUSA] hyundai_kia_connect_api - Planned start_climate payload: {'remoteClimate': {'airCtrl': True, 'airTemp': {'unit': 1, 'value': '74'}, 'defrost': False, 'heatingAccessory': {'rearWindow': 1, 'sideMirror': 1, 'steeringWheel': 1}, 'ignitionOnDuration': {'unit': 4, 'value': 10}, 'heatVentSeat': {'driverSeat': {'heatVentType': 0, 'heatVentLevel': 0, 'heatVentStep': 1}, 'passengerSeat': {'heatVentType': 0, 'heatVentLevel': 0, 'heatVentStep': 1}, 'rearLeftSeat': {'heatVentType': 0, 'heatVentLevel': 0, 'heatVentStep': 1}, 'rearRightSeat': {'heatVentType': 0, 'heatVentLevel': 0, 'heatVentStep': 1}}}}
2023-12-28 14:51:33.243 DEBUG (SyncWorker_0) [hyundai_kia_connect_api.KiaUvoAPIUSA] hyundai_kia_connect_api - sending https://api.owners.kia.com/apigw/v1/rems/start request with {'remoteClimate': {'airCtrl': True, 'airTemp': {'unit': 1, 'value': '74'}, 'defrost': False, 'heatingAccessory': {'rearWindow': 1, 'sideMirror': 1, 'steeringWheel': 1}, 'ignitionOnDuration': {'unit': 4, 'value': 10}, 'heatVentSeat': {'driverSeat': {'heatVentType': 0, 'heatVentLevel': 0, 'heatVentStep': 1}, 'passengerSeat': {'heatVentType': 0, 'heatVentLevel': 0, 'heatVentStep': 1}, 'rearLeftSeat': {'heatVentType': 0, 'heatVentLevel': 0, 'heatVentStep': 1}, 'rearRightSeat': {'heatVentType': 0, 'heatVentLevel': 0, 'heatVentStep': 1}}}}
2023-12-28 14:51:34.198 DEBUG (SyncWorker_0) [hyundai_kia_connect_api.KiaUvoAPIUSA] hyundai_kia_connect_api got response {"status":{"statusCode":0,"errorType":0,"errorCode":0,"errorMessage":"Success with response body"}}
2023-12-28 14:51:34.199 DEBUG (SyncWorker_4) [hyundai_kia_connect_api.VehicleManager] hyundai_kia_connect_api - Time differential in seconds: 805.19924
2023-12-28 14:51:34.199 DEBUG (SyncWorker_4) [hyundai_kia_connect_api.KiaUvoAPIUSA] hyundai_kia_connect_api - sending https://api.owners.kia.com/apigw/v1/cmm/gvi request with {'vehicleConfigReq': {'airTempRange': '0', 'maintenance': '1', 'seatHeatCoolOption': '0', 'vehicle': '1', 'vehicleFeature': '0'}, 'vehicleInfoReq': {'drivingActivty': '0', 'dtc': '1', 'enrollment': '1', 'functionalCards': '0', 'location': '1', 'vehicleStatus': '1', 'weather': '0'}, 'vinKey': ['d97ba5d3-0930-46c5-9677-ee602da60235']}
2023-12-28 14:51:35.067 DEBUG (SyncWorker_4) [hyundai_kia_connect_api.KiaUvoAPIUSA] hyundai_kia_connect_api got response {"status":{"statusCode":0,"errorType":0,"errorCode":0,"errorMessage":"Success with response body"},"payload":{"vehicleInfoList":[{"vinKey":"d97ba5d3-0930-46c5-9677-ee602da60235","vehicleConfig":{"vehicleDetail":{"vehicle":{"vin":"5XXG34J25PG185846","trim":{"modelYear":"2023","salesModelCode":"L4262","optionGroupCode":"017","modelName":"K5","factoryCode":"EX","projectCode":"DL3","trimName":"EX","driveType":"0","transmissionType":"1","ivrCategory":"5"},"telematics":1,"mileage":"11140","mileageSyncDate":"20231228043809","exteriorColor":"EVERLASTING SILVER","exteriorColorCode":"ERG","fuelType":1,"invDealerCode":"SC033","testVehicle":"0","supportedApps":[{"appType":"0"},{"appType":"5","appImage":{"imageName":"uvo-app.png","imagePath":"/content/dam/kia/us/owners/image/common/app/access/","imageType":"2","imageSize":{"length":"100","width":"100","uom":0}}}],"activationType":2},"images":[{"imageName":"2023-k5-ex-erg.png","imagePath":"/content/dam/kia/us/owners/image/vehicle-app/2023/k5/ex/","imageType":"1","imageSize":{"length":"100","width":"100","uom":0}}],"device":{"launchType":"0","swVersion":"DL322.USA.S5W_M.V008.001.220504","telematics":{"generation":"3","platform":"1","tmsCenter":"1","billing":true,"genType":"2"},"versionNum":"GASOLINE","headUnitType":"0","hdRadio":"X40HAF","ampType":"NA","headUnitName":"avn5w","bluetoothRef":"20","headUnitDesc":"AVN5.0W"}},"maintenance":{"nextServiceMile":4859.9004,"maintenanceSchedule":[8000,16000,24000,32000,40000,48000,56000,64000,72000,80000,88000,96000,104000]},"billingPeriod":{"freeTrial":{"value":12,"unit":0},"freeTrialExtension":{"value":12,"unit":1},"servicePeriod":{"value":60,"unit":1}}},"lastVehicleInfo":{"vehicleNickName":"My K5","preferredDealer":"GA055","licensePlate":"","psi":"","customerType":0,"enrollment":{"provStatus":"4","enrollmentStatus":"1","enrollmentType":"0","registrationDate":"20221113","expirationDate":"20231113","expirationMileage":"100000","freeServiceDate":{"startDate":"20221113","endDate":"20231113"}},"activeDTC":{"dtcActiveCount":"0"},"vehicleStatusRpt":{"statusType":"2","reportDate":{"utc":"20231228195134","offset":-8},"vehicleStatus":{"climate":{"airCtrl":false,"defrost":false,"airTemp":{"value":"72","unit":1},"heatingAccessory":{"steeringWheel":0,"sideMirror":0,"rearWindow":0},"heatVentSeat":{"driverSeat":{"heatVentType":0,"heatVentLevel":1},"passengerSeat":{"heatVentType":0,"heatVentLevel":1},"rearLeftSeat":{"heatVentType":0,"heatVentLevel":1},"rearRightSeat":{"heatVentType":0,"heatVentLevel":1}}},"engine":false,"doorLock":true,"doorStatus":{"frontLeft":0,"frontRight":0,"backLeft":0,"backRight":0,"trunk":0,"hood":0},"lowFuelLight":false,"ign3":false,"transCond":true,"distanceToEmpty":{"value":39,"unit":3},"tirePressure":{"all":0},"dateTime":{"utc":"20231228195134","offset":-8},"syncDate":{"utc":"20231228193809","offset":-8},"batteryStatus":{"stateOfCharge":61,"deliveryMode":1,"warning":65,"powerAutoCutMode":2},"sleepMode":false,"lampWireStatus":{"headLamp":{"headLampStatus":false,"lampLL":false,"lampRL":false,"lampLH":false,"lampRH":false,"lampLB":false,"lampRB":false},"stopLamp":{"leftLamp":false,"rightLamp":false},"turnSignalLamp":{"lampLF":false,"lampRF":false,"lampLR":false,"lampRR":false}},"windowStatus":{"windowFL":0,"windowFR":0,"windowRL":0,"windowRR":0},"smartKeyBatteryWarning":false,"fuelLevel":8,"washerFluidStatus":true,"brakeOilStatus":false,"engineOilStatus":false,"engineRuntime":{},"remoteControlAvailable":1,"valetParkingMode":0,"rsaStatus":0}},"location":{"coord":{"lat":32.010025,"lon":-82.0637027778,"alt":43,"type":0,"altdo":0},"head":322,"speed":{"value":0,"unit":1},"accuracy":{"hdop":8,"pdop":13},"syncDate":{"utc":"20231228193809","offset":-8}},"financed":true,"financeRegistered":false,"linkStatus":0,"rsaStatus":0}}]}}
2023-12-28 14:51:35.067 DEBUG (SyncWorker_4) [hyundai_kia_connect_api.KiaUvoAPIUSA] hyundai_kia_connect_api - last_updated_at - before 20231228193809
2023-12-28 14:51:35.067 DEBUG (SyncWorker_4) [hyundai_kia_connect_api.KiaUvoAPIUSA] hyundai_kia_connect_api - last_updated_at - after 2023-12-28 19:38:09+00:00
2023-12-28 14:51:35.067 DEBUG (SyncWorker_4) [hyundai_kia_connect_api.KiaUvoAPIUSA] hyundai_kia_connect_api - SOC Levels couldn't be found. May not be an EV.
2023-12-28 14:51:35.068 DEBUG (SyncWorker_4) [hyundai_kia_connect_api.KiaUvoAPIUSA] hyundai_kia_connect_api - last_updated_at - before 20231228193809
2023-12-28 14:51:35.068 DEBUG (SyncWorker_4) [hyundai_kia_connect_api.KiaUvoAPIUSA] hyundai_kia_connect_api - last_updated_at - after 2023-12-28 19:38:09+00:00
2023-12-28 14:51:35.068 DEBUG (MainThread) [custom_components.kia_uvo.coordinator] Finished fetching kia_uvo data in 0.870 seconds (success: True)
bryanjblake commented 8 months ago

This is the script

alias: Warm Up
sequence:
  - service: kia_uvo.start_climate
    data:
      duration: 10
      climate: true
      temperature: 74
      heating: "1"
      device_id: cf054bd276f7e10643c99f56b5984ef8
      flseat: "8"
      defrost: false
mode: single
icon: mdi:car
cdnninja commented 8 months ago

Maybe try send the front left seat without the quotes.

bryanjblake commented 8 months ago

That worked! Thank you so much for taking the time to help me figure this out.