Skip to content
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

Unable to lock / unlock / start vehicle #937

Open
LiveForToday opened this issue Sep 25, 2024 · 7 comments
Open

Unable to lock / unlock / start vehicle #937

LiveForToday opened this issue Sep 25, 2024 · 7 comments

Comments

@LiveForToday
Copy link

Please check Services, Known Bug / Issues and Troubleshooting over here first: https://github.com/fuatakgun/kia_uvo/blob/master/README.md
Region and Brand of car
USA Hyundai
Version of the integration
2.26.7

Describe the bug
I have been trying for a week to get my car to lock or unlock or start via HA. I can use the app, I can use the web. I can log out of the app and log back in just fine.

The app returns this when I try and do a lock / unlock from HA so the app is sending me the result.

"Remote Door Unlock unsuccessful. Please ensure your vehicle is in a good coverage area."

It is in a good area as the app and the website work just fine.

Thanks and great work on this. I love being able to have the integration in HA so much.

Debug logs if an error occurred

These appear to be the relevant logs...

2024-09-25 16:41:04.361 DEBUG (SyncWorker_6) [hyundai_kia_connect_api.HyundaiBlueLinkAPIUSA] hyundai_kia_connect_api - Get Vehicle Location {'errorSubCode': 'HT_504', 'systemName': 'HATA', 'functionName': 'findMyCar', 'errorSubMessage': 'HATA findMyCar service failed while performing the operation FindMyCar', 'errorMessage': "We're sorry, but we could not complete your request. Please try again later.", 'errorCode': 504, 'serviceName': 'FindMyCar'}
2024-09-25 16:41:04.361 WARNING (SyncWorker_6) [hyundai_kia_connect_api.HyundaiBlueLinkAPIUSA] hyundai_kia_connect_api - Unable to get vehicle location: {'errorSubCode': 'HT_504', 'systemName': 'HATA', 'functionName': 'findMyCar', 'errorSubMessage': 'HATA findMyCar service failed while performing the operation FindMyCar', 'errorMessage': "We're sorry, but we could not complete your request. Please try again later.", 'errorCode': 504, 'serviceName': 'FindMyCar'}
2024-09-25 16:41:04.361 DEBUG (SyncWorker_6) [hyundai_kia_connect_api.HyundaiBlueLinkAPIUSA] hyundai_kia_connect_api - Get Vehicle Location result is None
2024-09-25 16:41:04.362 DEBUG (SyncWorker_6) [hyundai_kia_connect_api.HyundaiBlueLinkAPIUSA] hyundai_kia_connect_api - update_vehicle_with_cached_state Location fallback {'coord': {'alt': -112.214208, 'lon': -redacted, 'type': 0.0, 'lat': redacted}}
2024-09-25 16:41:04.363 DEBUG (SyncWorker_6) [hyundai_kia_connect_api.HyundaiBlueLinkAPIUSA] hyundai_kia_connect_api - SOC Levels couldn't be found. May not be an EV.
2024-09-25 16:41:04.364 DEBUG (SyncWorker_6) [hyundai_kia_connect_api.HyundaiBlueLinkAPIUSA] _update_vehicle_properties filled_trips: []
2024-09-25 16:41:04.365 DEBUG (MainThread) [custom_components.kia_uvo.coordinator] Finished fetching kia_uvo data in 121.766 seconds (success: True)
2024-09-25 16:41:04.411 ERROR (MainThread) [homeassistant.components.sensor] Error adding entity sensor.2024_santa_fe_hybrid_set_temperature for domain sensor with platform kia_uvo

-- I also see this in the log
ValueError: Sensor sensor.2024_santa_fe_hybrid_set_temperature has device class 'temperature', state class 'None' unit '°F' and suggested precision 'None' thus indicating it has a numeric value; however, it has the non-numeric value: 'OFF' (<class 'str'>)

To Reproduce
Try to lock or unlock or climate start the vehicle

Expected behavior
lock / unlock / start vehicle

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
hybrid 2024 santa fe. I removed my old santa fe and recently purchased this new one.

@cdnninja
Copy link
Collaborator

None of those logs are related to service calls. Could you enable debug and try lock the car? Provide those logs.

@LiveForToday
Copy link
Author

LiveForToday commented Sep 26, 2024

Hyundai_Integration_debug_Log.txt

This is the debug log when sending a lock request. Thanks.

Let me paste it here. I didn't think an attachment might not be trusted which makes sense.

2024-09-26 07:23:14.563 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 657, in state
numerical_value = int(value)
^^^^^^^^^^
ValueError: invalid literal for int() with base 10: 'OFF'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 660, in state
numerical_value = float(value)
^^^^^^^^^^^^
ValueError: could not convert string to float: 'OFF'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 258, in _handle_refresh_interval
await self._async_refresh(log_failures=True, scheduled=True)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 453, in _async_refresh
self.async_update_listeners()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 168, in async_update_listeners
update_callback()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 533, in _handle_coordinator_update
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1005, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1130, in _async_write_ha_state
self.__async_calculate_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1067, in __async_calculate_state
state = self._stringify_state(available)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1011, in _stringify_state
if (state := self.state) is None:
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 664, in state
raise ValueError(
ValueError: Sensor sensor.2024_santa_fe_hybrid_set_temperature has device class 'temperature', state class 'None' unit '°F' and suggested precision 'None' thus indicating it has a numeric value; however, it has the non-numeric value: 'OFF' (<class 'str'>)
2024-09-26 07:28:24.654 ERROR (MainThread) [homeassistant.components.mqtt.number] Invalid value for number.tea_kettle_target_temperature: 356.0 (range 104.0 - 212.0)
2024-09-26 07:30:12.498 DEBUG (SyncWorker_55) [hyundai_kia_connect_api.HyundaiBlueLinkAPIUSA] hyundai_kia_connect_api - Action for lock is: VEHICLE_LOCK_ACTION.UNLOCK
2024-09-26 07:30:12.498 DEBUG (SyncWorker_55) [hyundai_kia_connect_api.HyundaiBlueLinkAPIUSA] hyundai_kia_connect_api - Calling unlock
2024-09-26 07:30:13.018 DEBUG (SyncWorker_55) [hyundai_kia_connect_api.HyundaiBlueLinkAPIUSA] hyundai_kia_connect_api - Received lock_action response status code: 200
2024-09-26 07:30:13.018 DEBUG (SyncWorker_55) [hyundai_kia_connect_api.HyundaiBlueLinkAPIUSA] hyundai_kia_connect_api - Received lock_action response:
2024-09-26 07:30:13.022 DEBUG (SyncWorker_33) [hyundai_kia_connect_api.VehicleManager] hyundai_kia_connect_api - Time differential in seconds: 2910.022617
2024-09-26 07:30:13.303 DEBUG (SyncWorker_33) [hyundai_kia_connect_api.HyundaiBlueLinkAPIUSA] hyundai_kia_connect_api - Get Vehicles Response {"enrolledVehicleDetails":[{"packageDetails":[{"assetNumber":"A-S03096054","subscriptionType":"Trial","displayCategory":"Basic||YES","packageId":"redacted","term":"240","renewalDate":"redacted","packageType":"Basic","startDate":"redacted"},{"assetNumber":"A-S03096054","subscriptionType":"Trial","displayCategory":"Advanced||YES","packageId":"Redacted","term":"240","renewalDate":"20440913000000","packageType":"Advanced","startDate":"20240913000000"},{"assetNumber":"A-S03096055","subscriptionType":"Trial","displayCategory":"Map & Multimedia Over-the-Air Updates||NO","packageId":"Redacted","term":"36","renewalDate":"20270913000000","packageType":"Map & Multimedia Over-the-Air Updates","startDate":"20240913000000"}],"vehicleDetails":{"svrStatus":"NONE","fatcAvailable":"Y","color":"GRAY","remoteStartWakeupDays":"fourteen","enrollmentDate":"20240913","maintSyncCapable":"NO","brandIndicator":"H","deviceStatus":"ENROLLED","setOffPeak":"0","mapProvider":"HERE","interiorColor":"4NB","svdDay":"12","accessoryCode":"ccNC","trim":"CALLIGRAPHY HEV","modelCode":"SANTA FE HYBRID","nadid":"Redacted","ubiCapabilityInd":"N","mit":"7500","regid":"Redacted","vin":"Redacted","blueLink":"Y","waypointInd":"NO","billingInd":"MONTHLY","enrollmentId":"5645823","seatConfigurations":{"seatConfigs":[{"heatingCapable":"YES","ventCapable":"YES","supportedLevels":"2,6,7,8,3,4,5","seatLocationID":"1"},{"heatingCapable":"YES","ventCapable":"YES","supportedLevels":"2,6,7,8,3,4,5","seatLocationID":"2"},{"heatingCapable":"YES","ventCapable":"NO","supportedLevels":"2,6,7,8","seatLocationID":"3"},{"heatingCapable":"YES","ventCapable":"NO","supportedLevels":"2,6,7,8","seatLocationID":"4"}]},"sideMirrorHeatCapable":"YES","ownersuccession":"1","odometer":493,"imat":"7500","nickName":"2024 SANTA FE HYBRID","additionalVehicleDetails":{"temperatureRange":"false","tmuSleepMode":"No","enableHCAModule":"Y","icpParking":1,"remoteLockConsentForRemoteStart":"No","calendarVehicleSyncEnable":"No","windowSafetyOption2":"3","vehicleModemType":"4G (MX5.USA.ccNC.001.002.240718)","icpAACapable":"Y","productName":"Bluelink+","icpDriveThru":0,"dkType":"2.0-Premium","battDrainFunctOnOff":"N","enableRoadSideAssitanceAAAModule":"Y","idleSpeedinValetAlert":"N","evAlarmOptionInfo":"No","newActivationSupport":"N","mapOtaAccepted":"N","v2LRemainTimeOption":"N","dkCapable":"Y","combinedHeatSettingsEnable":"N","chargePortDoorOption":"N","icpChargingStation":0,"hyundaiHome":"N","wifiHotspotCapable":"Y","v2LOption":"N","dkEnrolled":"Y","icpAvntCapable":"Y","v2GOption":"N","icpFuelStation":1,"remoteLockConsentForRemoteStartCapable":"No","msContentProviders":"4","msCapableOption":"Y","icpCPCapable":"Y","enableValetActivate":"Y","frunkOption":"N","energyConsoleCapable":"No","cpoVehicle":"No"},"evStatus":"N","modelYear":"2024","transmissiontype":"AUTO","steeringWheelHeatCapable":"YES","bluelinkEnrolled":true,"setChargeSchedule":"0","vehicleGeneration":"3","rearWindowHeatCapable":"YES","preferredDealerCode":"Redacted","hmaModel":"MX5H","series":"SANTA FE HYBRID","enrollmentStatus":"ACTIVE","starttype":"BUTTON","userprofilestatus":"Y","sapColorCode":"PE2","bluelinkEnabled":true,"odometerUpdateDate":"20240926064143"},"roleDetails":[{"roleCode":"OWN","roleName":"OWNER"},{"roleCode":"SUB","roleName":"SUBSCRIBER"}],"responseHeaderMap":{}}],"addressDetails":[{"city":"Redacted","street":"Redacted ST","postalCode":"Redacted","type":"PRIMARY","region":"Redacted"}],"user":{"accountId":"Redacted","firstName":"Redacted","lastName":"Redacted","phonesOptIn":[{"number":"Redacted","primaryPhoneIndicator":"YES","fccOptIn":"","type":"MOBILE"}],"loginId":"Redacted@email","additionalUserDetails":{"userProfileUpdate":"N","timezoneOffset":-7,"billingAccountNumber":"Redacted","appRating":"N","geoLocationConsent":"Y","emailVerifyStatus":"Y","timezoneAbbr":"MST","otaAcceptance":"N","telematicsPhoneNumber":"Redacted"},"tncFlag":"N","phones":[{"number":"Redacted","type":"cell","order":1}],"idmId":"Redacted","userId":"Redacted@email","notificationEmail":"Redacted@email","email":"Redacted@email"}}
2024-09-26 07:30:13.303 DEBUG (SyncWorker_33) [hyundai_kia_connect_api.HyundaiBlueLinkAPIUSA] hyundai_kia_connect_api - using API headers: {'content-type': 'application/json;charset=UTF-8', 'accept': 'application/json, text/plain, /', 'accept-encoding': 'gzip, deflate, br', 'accept-language': 'en-US,en;q=0.9', 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36', 'host': 'api.telematics.hyundaiusa.com', 'origin': 'https://api.telematics.hyundaiusa.com', 'referer': 'https://api.telematics.hyundaiusa.com/login', 'from': 'SPA', 'to': 'ISS', 'language': '0', 'offset': '-7', 'sec-fetch-dest': 'empty', 'sec-fetch-mode': 'cors', 'sec-fetch-site': 'same-origin', 'refresh': 'false', 'encryptFlag': 'false', 'brandIndicator': 'H', 'gen': '2', 'client_id': 'Redacted', 'clientSecret': 'Redacted', 'username': 'Redacted', 'accessToken': 'Redacted'}
2024-09-26 07:30:13.518 DEBUG (SyncWorker_33) [hyundai_kia_connect_api.HyundaiBlueLinkAPIUSA] hyundai_kia_connect_api - get_vehicle_status response {'hataTID': '-Redacted', 'vehicleStatus': {'dateTime': '2024-09-26T13:41:43Z', 'acc': False, 'fuelLevel': 19, 'defrostStatus': 'false', 'transCond': True, 'doorLockStatus': 'true', 'doorOpen': {'frontRight': 0, 'frontLeft': 0, 'backLeft': 0, 'backRight': 0}, 'washerFluidStatus': False, 'battery': {'powerAutoCutMode': 2, 'batSignalReferenceValue': {'batWarning': 65}, 'batSoc': 76, 'batState': 0, 'sjbDeliveryMode': 2}, 'seatHeaterVentInfo': {'rlSeatHeatState': 2, 'drvSeatHeatState': 2, 'rrSeatHeatState': 2, 'astSeatHeatState': 2}, 'vehicleLocation': {'coord': {'alt': -redacted, 'lon': -redacted, 'type': 0.0, 'lat': redacted}}, 'ign3': False, 'ignitionStatus': 'false', 'lowFuelLight': False, 'sideBackWindowHeat': 0, 'dte': {'unit': 3, 'value': 123}, 'engine': False, 'hoodOpen': False, 'breakOilStatus': False, 'airConditionStatus': 'false', 'windowOpen': {'frontRight': 0, 'frOpenLevel': 0, 'flOpenLevel': 0, 'brOpenLevel': 0, 'blOpenLevel': 0, 'frontLeft': 0, 'backLeft': 0, 'backRight': 0}, 'smartKeyBatteryWarning': False, 'steerWheelHeat': 0, 'trunkOpen': False, 'doorLock': True, 'odometer': 493, 'airCtrlOn': False, 'airTemp': {'unit': 1, 'hvacTempType': 1, 'value': 'OFF'}, 'evStatus': {'valueDiff': 0, 'wirelessCharging': False, 'remainTime2': {'etc3': {'unit': 1, 'value': 0}, 'etc2': {'unit': 1, 'value': 0}, 'etc1': {'unit': 1, 'value': 0}}, 'batteryPlugin': 0, 'timeDiff': 0, 'batteryCharge': False, 'batteryStatus': 54, 'batteryDisChargePlugin': 0, 'batteryDisCharge': False, 'drvDistance': [{'rangeByFuel': {'totalAvailableRange': {'unit': 3, 'value': 123}, 'evModeRange': {'unit': 3, 'value': 123}}, 'type': 0}], 'reservChargeInfos': {'reservChargeInfo': {'dateTime': '2024/09/26T07:30:13Z', 'reservChargeInfoDetail': {}}, 'reserveChargeInfo2': {'reservChargeInfoDetail': {'reservFatcSet': {}, 'reservInfo': {'time': {}, 'day': [9]}}}}}, 'sunroofOpen': False, 'lampWireStatus': {'headLamp': {'rightBifuncLamp': False, 'headLampStatus': False, 'leftLowLamp': False, 'rightHighLamp': False, 'leftBifuncLamp': False, 'leftHighLamp': False, 'rightLowLamp': False}, 'stopLamp': {'rightLamp': False, 'stopLampStatus': False, 'leftLamp': False}, 'turnSignalLamp': {'rightRearLamp': False, 'turnSignalLampStatus': False, 'rightFrontLamp': False, 'leftRearLamp': False, 'leftFrontLamp': False}}, 'sleepModeCheck': False, 'defrost': False, 'tirePressureLamp': {'tirePressureWarningLampRearLeft': 0, 'tirePressureWarningLampFrontLeft': 0, 'tirePressureWarningLampFrontRight': 0, 'tirePressureWarningLampAll': 0, 'tirePressureWarningLampRearRight': 0}, 'trunkOpenStatus': 'false', 'engineOilStatus': False}}
2024-09-26 07:30:13.518 DEBUG (SyncWorker_33) [hyundai_kia_connect_api.HyundaiBlueLinkAPIUSA] hyundai_kia_connect_api - update_vehicle_with_cached_state keep Location fallback {'coord': {'alt': -redacted, 'lon': -redacted, 'type': 0.0, 'lat': redacted}}
2024-09-26 07:30:13.518 DEBUG (SyncWorker_33) [hyundai_kia_connect_api.HyundaiBlueLinkAPIUSA] hyundai_kia_connect_api - update_vehicle_with_cached_state Location fallback {'coord': {'alt': -redacted, 'lon': -redacted, 'type': 0.0, 'lat': redacted}}
2024-09-26 07:30:13.519 DEBUG (SyncWorker_33) [hyundai_kia_connect_api.HyundaiBlueLinkAPIUSA] hyundai_kia_connect_api - SOC Levels couldn't be found. May not be an EV.
2024-09-26 07:30:13.519 DEBUG (SyncWorker_33) [hyundai_kia_connect_api.HyundaiBlueLinkAPIUSA] _update_vehicle_properties filled_trips: []
2024-09-26 07:30:13.521 DEBUG (MainThread) [custom_components.kia_uvo.coordinator] Finished fetching kia_uvo data in 0.500 seconds (success: True)
2024-09-26 07:30:13.524 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None)

@LiveForToday
Copy link
Author

Any update on this by chance? My Vehicle goes unavailable pretty much daily. I just had to reload the integration as it was 19 hours showing unavailable.

Thanks

@cdnninja
Copy link
Collaborator

cdnninja commented Oct 3, 2024

When "off" would you prefer temp to show 0 or unavailable?

@LiveForToday
Copy link
Author

When "off" would you prefer temp to show 0 or unavailable?

I do like to see off but it appears the API does not? I am fine with off but the message seems to indicate it is invalid so a 0 will work is we only have 0 or unavailable. Is this what is causing me all the trouble?

@cdnninja
Copy link
Collaborator

cdnninja commented Oct 3, 2024

Right now home assistant is setup as a temp value. Which can only be a number. I can shift it to text but then users won't be able to select units.

So thinking changing the api response of off to a number.

@LiveForToday
Copy link
Author

Right now home assistant is setup as a temp value. Which can only be a number. I can shift it to text but then users won't be able to select units.

So thinking changing the api response of off to a number.

I see. if that gets things working that would be great. I don't want to make it so users can't do something. I'm sure I do not understand this appropriately and you will know the best route to take. Thank you again for your work on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants