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

Unlock 2022 Hyundai from HA fails #644

Open tanksapper opened 1 year ago

tanksapper commented 1 year ago

When using unlock from HA for 2022 Hyundai Palisade - request fails...

image

Error and log below:

Logger: homeassistant.components.websocket_api.http.connection Source: components/sensor/init.py:583 Integration: Home Assistant WebSocket API (documentation, issues) First occurred: 2:18:14 PM (1 occurrences) Last logged: 2:18:14 PM

[140196537998288] Sensor sensor.2022_palisade_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: (None, 'f') (<class 'tuple'>) Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 581, in state numerical_value = float(value) # type:ignore[arg-type] TypeError: float() argument must be a string or a real number, not 'tuple'

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

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 199, in handle_call_service await hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 1849, in async_call task.result() File "/usr/src/homeassistant/homeassistant/core.py", line 1889, in _execute_service await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)( File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 226, in handle_service await service.entity_service_call( File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 798, in entity_service_call future.result() # pop exception if have File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 981, in async_request_call await coro File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 838, in _handle_entity_call await result File "/usr/src/homeassistant/homeassistant/components/lock/init.py", line 96, in _async_lock await entity.async_lock(**remove_entity_service_fields(service_call)) File "/config/custom_components/kia_uvo/lock.py", line 51, in async_lock await self.coordinator.async_lock_vehicle(self.vehicle.id) File "/config/custom_components/kia_uvo/coordinator.py", line 173, in async_lock_vehicle await self.async_request_refresh() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 211, in async_request_refresh await self._debounced_refresh.async_call() File "/usr/src/homeassistant/homeassistant/helpers/debounce.py", line 95, in async_call await task File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 237, in async_refresh await self._async_refresh(log_failures=True) File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 349, in _async_refresh self.async_update_listeners() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 146, in async_update_listeners update_callback() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 406, in _handle_coordinator_update self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 585, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 649, in _async_write_ha_state state = self._stringify_state(available) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 591, in _stringify_state if (state := self.state) is None: File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 583, in state raise ValueError( ValueError: Sensor sensor.2022_palisade_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: (None, 'f') (<class 'tuple'>)

cdnninja commented 1 year ago

What region and version?

tanksapper commented 1 year ago

USA v2.10.0

cdnninja commented 1 year ago

Did this previously work for you?

tanksapper commented 1 year ago

No this is the first time I’ve tried it. I just found this integration today.

It installed from hacs with no issues. It took 3 attempts to login to the account. It shows mileage, fuel door status etc fine.

On Thu, May 18, 2023 at 7:16 PM cdnninja @.***> wrote:

Did this previously work for you?

— Reply to this email directly, view it on GitHub https://github.com/Hyundai-Kia-Connect/kia_uvo/issues/644#issuecomment-1553771697, or unsubscribe https://github.com/notifications/unsubscribe-auth/AETVP4XWJV2PKKC6QKKJ6H3XG2UV7ANCNFSM6AAAAAAYGZU76A . You are receiving this because you authored the thread.Message ID: @.***>

cdnninja commented 1 year ago

It looks like it's the refresh after the lock that's giving bad data.

Could you enable debug logging as outlined on the main page and provide the results?

I could also use the attributes from the data sensor. Specially the set temp.

cdnninja commented 1 year ago

It looks like it's the refresh after the lock that's giving bad data.

Could you enable debug logging as outlined on the main page and provide the results?

I could also use the attributes from the data sensor. Specially the set temp.

tanksapper commented 1 year ago

Ok, I'll check it out an d send results

On Thu, May 18, 2023 at 8:49 PM cdnninja @.***> wrote:

It looks like it's the refresh after the lock that's giving bad data.

Could you enable debug logging as outlined on the main page and provide the results?

I could also use the attributes from the data sensor. Specially the set temp.

— Reply to this email directly, view it on GitHub https://github.com/Hyundai-Kia-Connect/kia_uvo/issues/644#issuecomment-1553858014, or unsubscribe https://github.com/notifications/unsubscribe-auth/AETVP4VLGWBWQRZSV4SOCZ3XG27QVANCNFSM6AAAAAAYGZU76A . You are receiving this because you authored the thread.Message ID: @.***>

tanksapper commented 1 year ago

Here is what I came up with - if you need additional let me know

Thanks

2023-05-18 21:41:51.368 DEBUG (SyncWorker_46) [hyundai_kia_connect_api.HyundaiBlueLinkAPIUSA] hyundai_kia_connect_api - Action for lock is: VEHICLE_LOCK_ACTION.LOCK 2023-05-18 21:41:51.368 DEBUG (SyncWorker_46) [hyundai_kia_connect_api.HyundaiBlueLinkAPIUSA] hyundai_kia_connect_api - Calling Lock 2023-05-18 21:41:56.378 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140603834950672] HTTPSConnectionPool(host='api.telematics.hyundaiusa.com', port=443): Max retries exceeded with url: /ac/v2/rcs/rdo/off (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fe110d81a50>: Failed to establish a new connection: [Errno -3] Try again')) Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 174, in _new_conn conn = connection.create_connection( File "/usr/local/lib/python3.10/site-packages/urllib3/util/connection.py", line 72, in create_connection for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): File "/usr/local/lib/python3.10/socket.py", line 955, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno -3] Try again

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen httplib_response = self._make_request( File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 386, in _make_request self._validate_conn(conn) File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1042, in _validate_conn conn.connect() File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 363, in connect self.sock = conn = self._new_conn() File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 186, in _new_conn raise NewConnectionError( urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7fe110d81a50>: Failed to establish a new connection: [Errno -3] Try again

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 489, in send resp = conn.urlopen( File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 787, in urlopen retries = retries.increment( File "/usr/local/lib/python3.10/site-packages/urllib3/util/retry.py", line 592, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.telematics.hyundaiusa.com', port=443): Max retries exceeded with url: /ac/v2/rcs/rdo/off (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fe110d81a50>: Failed to establish a new connection: [Errno -3] Try again'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 199, in handle_call_service await hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 1849, in async_call task.result() File "/usr/src/homeassistant/homeassistant/core.py", line 1889, in _execute_service await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)( File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 226, in handle_service await service.entity_service_call( File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 798, in entity_service_call future.result() # pop exception if have File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 981, in async_request_call await coro File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 838, in _handle_entity_call await result File "/usr/src/homeassistant/homeassistant/components/lock/init.py", line 96, in _async_lock await entity.async_lock(*remove_entity_service_fields(service_call)) File "/config/custom_components/kia_uvo/lock.py", line 51, in async_lock await self.coordinator.async_lock_vehicle(self.vehicle.id) File "/config/custom_components/kia_uvo/coordinator.py", line 172, in async_lock_vehicle await self.hass.async_add_executor_job(self.vehicle_manager.lock, vehicle_id) File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run result = self.fn(self.args, self.kwargs) File "/usr/local/lib/python3.10/site-packages/hyundai_kia_connect_api/VehicleManager.py", line 136, in lock return self.api.lock_action( File "/usr/local/lib/python3.10/site-packages/hyundai_kia_connect_api/HyundaiBlueLinkAPIUSA.py", line 493, in lock_action response = self.sessions.post(url, headers=headers, json=data) File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 635, in post return self.request("POST", url, data=data, json=json, kwargs) File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 587, in request resp = self.send(prep, send_kwargs) File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 701, in send r = adapter.send(request, kwargs) File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 565, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.telematics.hyundaiusa.com', port=443): Max retries exceeded with url: /ac/v2/rcs/rdo/off (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fe110d81a50>: Failed to establish a new connection: [Errno -3] Try again'))

cdnninja commented 1 year ago

So I don't think this is directly the unlock but rather the connection fails to pull new data and when that occurs an exception is thrown. Could you update the integration and select the version as "master" in HACS? I put a fix in that may solve this.

tanksapper commented 1 year ago

updated HACS integration to master option. deleted the integration and reinstalled...

same issue - seems to be looking for a temperature sensor...

LOGS:

Logger: homeassistant.components.websocket_api.http.connection Source: components/sensor/init.py:583 Integration: Home Assistant WebSocket API (documentation, issues) First occurred: 8:50:51 PM (3 occurrences) Last logged: 8:53:35 PM

[140310227068160] Sensor sensor.2022_palisade_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: (None, 'f') (<class 'tuple'>) Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 581, in state numerical_value = float(value) # type:ignore[arg-type] TypeError: float() argument must be a string or a real number, not 'tuple'

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

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 199, in handle_call_service await hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 1849, in async_call task.result() File "/usr/src/homeassistant/homeassistant/core.py", line 1889, in _execute_service await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)( File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 226, in handle_service await service.entity_service_call( File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 798, in entity_service_call future.result() # pop exception if have File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 981, in async_request_call await coro File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 838, in _handle_entity_call await result File "/usr/src/homeassistant/homeassistant/components/lock/init.py", line 96, in _async_lock await entity.async_lock(**remove_entity_service_fields(service_call)) File "/config/custom_components/kia_uvo/lock.py", line 51, in async_lock await self.coordinator.async_lock_vehicle(self.vehicle.id) File "/config/custom_components/kia_uvo/coordinator.py", line 173, in async_lock_vehicle await self.async_request_refresh() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 211, in async_request_refresh await self._debounced_refresh.async_call() File "/usr/src/homeassistant/homeassistant/helpers/debounce.py", line 95, in async_call await task File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 237, in async_refresh await self._async_refresh(log_failures=True) File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 349, in _async_refresh self.async_update_listeners() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 146, in async_update_listeners update_callback() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 406, in _handle_coordinator_update self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 585, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 649, in _async_write_ha_state state = self._stringify_state(available) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 591, in _stringify_state if (state := self.state) is None: File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 583, in state raise ValueError( ValueError: Sensor sensor.2022_palisade_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: (None, 'f') (<class 'tuple'>)

On Sat, May 20, 2023 at 4:56 PM cdnninja @.***> wrote:

So I don't think this is directly the unlock but rather the connection fails to pull new data and when that occurs an exception is thrown. Could you update the integration and select the version as "master" in HACS? I put a fix in that may solve this.

— Reply to this email directly, view it on GitHub https://github.com/Hyundai-Kia-Connect/kia_uvo/issues/644#issuecomment-1556001319, or unsubscribe https://github.com/notifications/unsubscribe-auth/AETVP4R4UOYBYCFCJ45Q3O3XHEVWRANCNFSM6AAAAAAYGZU76A . You are receiving this because you authored the thread.Message ID: @.***>

Nessipud commented 1 year ago

Having the same issue, attempting to use the integration for a 2021 Hyundai Palisade. I've been using this integration successfully with my other car (Kia), but the same service calls fail on the Hyundai. Information is polled successfully from both cars.

Enable debugging mode in configuration.yaml, here's the log ''' Logger: homeassistant.components.websocket_api.http.connection Source: components/sensor/init.py:583 Integration: Home Assistant WebSocket API (documentation, issues) First occurred: May 21, 2023 at 11:05:54 AM (3 occurrences) Last logged: 9:24:57 AM

[139868194470208] Sensor sensor.2021_palisade_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: (None, 'f') (<class 'tuple'>) [139868213052608] Sensor sensor.2021_palisade_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: (None, 'f') (<class 'tuple'>) [139868299318064] Sensor sensor.2021_palisade_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: (None, 'f') (<class 'tuple'>) Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 581, in state numerical_value = float(value) # type:ignore[arg-type] TypeError: float() argument must be a string or a real number, not 'tuple'

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

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 199, in handle_call_service await hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 1849, in async_call task.result() File "/usr/src/homeassistant/homeassistant/core.py", line 1889, in _execute_service await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)( File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 226, in handle_service await service.entity_service_call( File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 798, in entity_service_call future.result() # pop exception if have File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 980, in async_request_call await coro File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 838, in _handle_entity_call await result File "/usr/src/homeassistant/homeassistant/components/lock/init.py", line 106, in _async_unlock await entity.async_unlock(**remove_entity_service_fields(service_call)) File "/config/custom_components/kia_uvo/lock.py", line 54, in async_unlock await self.coordinator.async_unlock_vehicle(self.vehicle.id) File "/config/custom_components/kia_uvo/coordinator.py", line 178, in async_unlock_vehicle await self.async_request_refresh() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 211, in async_request_refresh await self._debounced_refresh.async_call() File "/usr/src/homeassistant/homeassistant/helpers/debounce.py", line 95, in async_call await task File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 237, in async_refresh await self._async_refresh(log_failures=True) File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 349, in _async_refresh self.async_update_listeners() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 146, in async_update_listeners update_callback() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 406, in _handle_coordinator_update self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 585, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 649, in _async_write_ha_state state = self._stringify_state(available) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 591, in _stringify_state if (state := self.state) is None: File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 583, in state raise ValueError( ValueError: Sensor sensor.2021_palisade_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: (None, 'f') (<class 'tuple'>) '''

cdnninja commented 1 year ago

Could someone enable debug logs and also post attributes of the data sensor?

Does this only happen when lock is called?

cdnninja commented 1 year ago

@tanksapper I noticed you logs appear the API hasn't been updated. My hint is that:

File "/usr/local/lib/python3.10/site-packages/hyundai_kia_connect_api/HyundaiBlueLinkAPIUSA.py", line 493, in lock_action

Says line 493 but line 493 is commented out in our code. I am not sure what platform you are running on but make sure the API package is version 3.3.6. With HA core it takes care of it - all others should too but I have had issues reported before where its an old API version.

tanksapper commented 1 year ago

here are the debug logs... I've XXX out some PII ans some is also ***

2023-05-22 17:14:37.599 DEBUG (SyncWorker_55) [hyundai_kia_connect_api.HyundaiBlueLinkAPIUSA] hyundai_kia_connect_api - Action for lock is: VEHICLE_LOCK_ACTION.LOCK 2023-05-22 17:14:37.599 DEBUG (SyncWorker_55) [hyundai_kia_connect_api.HyundaiBlueLinkAPIUSA] hyundai_kia_connect_api - Calling Lock 2023-05-22 17:14:38.187 DEBUG (SyncWorker_55) [hyundai_kia_connect_api.HyundaiBlueLinkAPIUSA] hyundai_kia_connect_api - Received lock_action response status code: 400 2023-05-22 17:14:38.187 DEBUG (SyncWorker_55) [hyundai_kia_connect_api.HyundaiBlueLinkAPIUSA] hyundai_kia_connect_api - Received lock_action response: {"errorSubCode":"C400_1","systemName":"IDM","functionName":"validatePIN","errorSubMessage":"Missing Fields: blueLinkServicePin or pinToken","errorMessage":"Please check to see that all required fields are populated and try again.","errorCode":400,"serviceName":"CheckCustomerUserPin"} 2023-05-22 17:14:38.191 DEBUG (SyncWorker_2) [hyundai_kia_connect_api.VehicleManager] hyundai_kia_connect_api - Time differential in seconds: 7802.191263 2023-05-22 17:14:38.775 DEBUG (SyncWorker_2) [hyundai_kia_connect_api.HyundaiBlueLinkAPIUSA] hyundai_kia_connect_api - Get Vehicles Response {"enrolledVehicleDetails":[{"packageDetails":[{"assetNumber":"DM000660492","displayCategory":"Connected Care","packageId":"8a12976381b554220181b7a9e0142f8f","term":"36","renewalDate":"20240818000000","packageType":"Connected Care","startDate":"20210818000000"},{"assetNumber":"DM000660492","displayCategory":"Remote","packageId":"8a12976381b554220181b7a9e3492fb8","term":"36","renewalDate":"20240818000000","packageType":"Remote","startDate":"20210818000000"},{"assetNumber":"DM000660492","displayCategory":"Guidance","packageId":"8a12976381b554220181b7a9e12b2f9b","term":"36","renewalDate":"20240818000000","packageType":"Guidance","startDate":"20210818000000"}],"vehicleDetails":{"svrStatus":"NONE","dynamicBurgerMenu":"https://owners.hyundaiusa.com/content/dam/hyundai/us/myhyundai/image/2022/palisade/calligraphy/exterior/base/abyss-black-pearl/Dashboard-01.png/jcr:content/renditions/cq5dam.thumbnail.105.68.png","remoteStartWakeupDays":"seven","enrollmentDate":"20210818","svdDay":"17","trim":"CALLIGRAPHY","modelCode":"PALISADE","ubiCapabilityInd":"Y","vin":"XXX","enrollmentId":"XXX","sideMirrorHeatCapable":"YES","ownersuccession":"1","odometer":"29822","nickName":"2022 PALISADE","defaultBurgerMenu":"https://owners.hyundaiusa.com/content/dam/hyundai/us/myhyundai/image/2022/palisade/calligraphy/exterior/base/default/Dashboard-01.png/jcr:content/renditions/cq5dam.thumbnail.105.68.png","evStatus":"N","modelYear":"2022","steeringWheelHeatCapable":"YES","defaultDashboard":"https://owners.hyundaiusa.com/content/dam/hyundai/us/myhyundai/image/2022/palisade/calligraphy/exterior/base/default/Dashboard-01.png","vehicleGeneration":"2","starttype":"BUTTON","sapColorCode":"A2B","bluelinkEnabled":true,"odometerUpdateDate":"20230522115426","fatcAvailable":"Y","color":"BLACK","maintSyncCapable":"NO","brandIndicator":"H","deviceStatus":"ENROLLED","mapProvider":"HERE","generalBurgerMenu":"https://owners.hyundaiusa.com/content/dam/hyundai/us/myhyundai/image/2022/palisade/general/exterior/base/default/Dashboard-01.png/jcr:content/renditions/cq5dam.thumbnail.105.68.png","interiorColor":"NNB","accessoryCode":"WAVN 5.0","nadid":"XXX","mit":"7500","regid":"XXXX","blueLink":"Y","waypointInd":"NO","billingInd":"YEARLY","dynamicDashboard":"https://owners.hyundaiusa.com/content/dam/hyundai/us/myhyundai/image/2022/palisade/calligraphy/exterior/base/abyss-black-pearl/Dashboard-01.png","imat":"7500","additionalVehicleDetails":{"temperatureRange":"false","tmuSleepMode":"No","enableHCAModule":"Y","icpParking":0,"remoteLockConsentForRemoteStart":"No","calendarVehicleSyncEnable":"No","vehicleModemType":"4G","icpAACapable":"N","icpDriveThru":0,"dkType":"","enableRoadSideAssitanceAAAModule":"Y","evAlarmOptionInfo":"No","mapOtaAccepted":"N","dkCapable":"N","combinedHeatSettingsEnable":"Y","icpChargingStation":0,"hyundaiHome":"N","wifiHotspotCapable":"N","tmuSleepInMin":129.98333333333332,"dkEnrolled":"N","icpAvntCapable":"N","icpFuelStation":0,"remoteLockConsentForRemoteStartCapable":"No","icpCPCapable":"N","enableValetActivate":"N","energyConsoleCapable":"No"},"transmissiontype":"AUTO","bluelinkEnrolled":true,"rearWindowHeatCapable":"YES","preferredDealerCode":"NH012","hmaModel":"LX2","series":"PALISADE","enrollmentStatus":"ACTIVE","generalDashboard":"https://owners.hyundaiusa.com/content/dam/hyundai/us/myhyundai/image/2022/palisade/general/exterior/base/default/Dashboard-01.png","userprofilestatus":"Y"},"roleDetails":[{"roleCode":"OWN","roleName":"OWNER"},{"roleCode":"SUB","roleName":"SUBSCRIBER"}],"responseHeaderMap":{}}],"addressDetails":[{"city":"XXX","street":"XXX Rd","postalCode":"XXX","type":"PRIMARY","region":"XX"}],"user":{"accountId":"XXX","firstName":"XXX","lastName":"XXX","phonesOptIn":[{"number":"XXX","primaryPhoneIndicator":"YES","fccOptIn":"","type":"MOBILE"}],"loginId":"@.","additionalUserDetails":{"userProfileUpdate":"Y","timezoneOffset":-4,"billingAccountNumber":"XXX","appRating":"N","geoLocationConsent":"N","timezoneAbbr":"EDT","otaAcceptance":"N","telematicsPhoneNumber":""},"tncFlag":"N","phones":[{"number":"","type":"cell","order":1}],"idmId":"XXX","userId":"@.","notificationEmail":"@.","email":"@."}} 2023-05-22 17:14:38.776 DEBUG (SyncWorker_2) [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': '-4', 'sec-fetch-dest': 'empty', 'sec-fetch-mode': 'cors', 'sec-fetch-site': 'same-origin', 'refresh': 'false', 'encryptFlag': 'false', 'brandIndicator': 'H', 'gen': '2', 'client_id': 'XXXX', 'clientSecret': 'XXXX', 'username': '@.*', 'accessToken': 'XXXXXXXXXX', 'blueLinkServicePin': '', 'registrationId': 'XXXXXXXXXX', 'vin': 'XXXXXXX'} 2023-05-22 17:14:39.092 DEBUG (SyncWorker_2) [hyundai_kia_connect_api.HyundaiBlueLinkAPIUSA] hyundai_kia_connect_api - get_vehicle_status response {'hataTID': 'XXXXXXX', 'vehicleStatus': {'dateTime': '2023-05-22T19:04:36Z', 'acc': False, 'defrostStatus': 'false', 'transCond': True, 'doorLockStatus': 'false', 'doorOpen': {'frontRight': 0, 'frontLeft': 0, 'backLeft': 0, 'backRight': 0}, 'battery': {'batSoc': 80, 'sjbDeliveryMode': 1}, 'seatHeaterVentInfo': {'rlSeatHeatState': 2, 'drvSeatHeatState': 2, 'rrSeatHeatState': 2, 'astSeatHeatState': 2}, 'vehicleLocation': {'coord': {'alt': XXXXXXX}}, 'ign3': False, 'ignitionStatus': 'false', 'lowFuelLight': False, 'sideBackWindowHeat': 0, 'dte': {'unit': 3, 'value': 109.0}, 'engine': False, 'hoodOpen': False, 'airConditionStatus': 'false', 'steerWheelHeat': 0, 'trunkOpen': False, 'doorLock': False, 'airCtrlOn': False, 'airTemp': {'unit': 0, 'hvacTempType': 1, 'value': 'LO'}, 'sleepModeCheck': True, 'defrost': False, 'tirePressureLamp': {'tirePressureWarningLampRearLeft': 0, 'tirePressureWarningLampFrontLeft': 0, 'tirePressureWarningLampFrontRight': 0, 'tirePressureWarningLampAll': 0, 'tirePressureWarningLampRearRight': 0}, 'trunkOpenStatus': 'false'}} 2023-05-22 17:14:39.092 DEBUG (SyncWorker_2) [hyundai_kia_connect_api.HyundaiBlueLinkAPIUSA] hyundai_kia_connect_api - update_vehicle_with_cached_state keep Location fallback }} 2023-05-22 17:14:39.092 DEBUG (SyncWorker_2) [hyundai_kia_connect_api.HyundaiBlueLinkAPIUSA] hyundai_kia_connect_api - update_vehicle_with_cached_state Location fallback {'coord': {}} 2023-05-22 17:14:39.092 DEBUG (SyncWorker_2) [hyundai_kia_connect_api.HyundaiBlueLinkAPIUSA] hyundai_kia_connect_api - last_updated_at - before 20230522190436 2023-05-22 17:14:39.092 DEBUG (SyncWorker_2) [hyundai_kia_connect_api.HyundaiBlueLinkAPIUSA] hyundai_kia_connect_api - last_updated_at - after 2023-05-22 19:04:36+00:00 2023-05-22 17:14:39.093 DEBUG (SyncWorker_2) [hyundai_kia_connect_api.HyundaiBlueLinkAPIUSA] hyundai_kia_connect_api - last_updated_at - before None 2023-05-22 17:14:39.093 DEBUG (SyncWorker_2) [hyundai_kia_connect_api.HyundaiBlueLinkAPIUSA] hyundai_kia_connect_api - last_updated_at - after 2000-01-01 00:00:00+00:00 2023-05-22 17:14:39.480 DEBUG (MainThread) [custom_components.kia_uvo.coordinator] Finished fetching kia_uvo data in 1.291 seconds (success: True) 2023-05-22 17:14:39.482 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140309313091040] Sensor sensor.2022_palisade_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: (None, 'f') (<class 'tuple'>) Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 581, in state numerical_value = float(value) # type:ignore[arg-type] TypeError: float() argument must be a string or a real number, not 'tuple' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 199, in handle_call_service await hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 1849, in async_call task.result() File "/usr/src/homeassistant/homeassistant/core.py", line 1889, in _execute_service await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)( File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 226, in handle_service await service.entity_service_call( File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 798, in entity_service_call future.result() # pop exception if have File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 981, in async_request_call await coro File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 838, in _handle_entity_call await result File "/usr/src/homeassistant/homeassistant/components/lock/init.py", line 96, in _async_lock await entity.async_lock(remove_entity_service_fields(service_call)) File "/config/custom_components/kia_uvo/lock.py", line 51, in async_lock await self.coordinator.async_lock_vehicle(self.vehicle.id) File "/config/custom_components/kia_uvo/coordinator.py", line 173, in async_lock_vehicle await self.async_request_refresh() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 211, in async_request_refresh await self._debounced_refresh.async_call() File "/usr/src/homeassistant/homeassistant/helpers/debounce.py", line 95, in async_call await task File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 237, in async_refresh await self._async_refresh(log_failures=True) File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 349, in _async_refresh self.async_update_listeners() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 146, in async_update_listeners update_callback() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 406, in _handle_coordinator_update self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 585, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 649, in _async_write_ha_state state = self._stringify_state(available) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 591, in _stringify_state if (state := self.state) is None: File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 583, in state raise ValueError( ValueError: Sensor sensor.2022_palisade_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: (None, 'f') ()

tanksapper commented 1 year ago

current version

Home Assistant Core Installed version 2023.5.2

updating to 5.3

Nessipud commented 1 year ago

@tanksapper beat me to it. I'm running Home Assistant 2023.5.3

cdnninja commented 1 year ago

I did another fix that can be tested by downloading "Master" I also think someone needs to sniff the traffic on the unlock to understand what is going wrong on that part.

tanksapper commented 1 year ago

This now appears to be working - with some oddities

I deleted and reinstalled from HACS. Re installed the integration. Tried the lock request - failed. Looked at the logs and only error I saw was an error asking for a PIN. I deleted the integration and reinstalled with username, password and PIN (even though I am in USA with USA account). Tried it again and success

Nessipud commented 1 year ago

@tanksapper , is the start_climate service call successful as well? I am in the US too - I assume any PIN could be used, correct?

tanksapper commented 1 year ago

Yes but it is slower than lock - took about 2 minutes to start and the car has to be locked

tanksapper commented 1 year ago

In the logs is shows the pin as blue link service PIN code

also it seems that heat/ac, f/r defrosters, temp set correct, steering wheel heat work. Seat heat/cool does not come on

tanksapper commented 1 year ago

Thanks for looking into this