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

Integration crashes each night after charging #990

Open
stintov opened this issue Dec 14, 2024 · 6 comments
Open

Integration crashes each night after charging #990

stintov opened this issue Dec 14, 2024 · 6 comments

Comments

@stintov
Copy link

stintov commented Dec 14, 2024

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
Kia EV9
Version of the integration
2.31.0 , although this has happened for a long time so not just this version.

Describe the bug
Each morning after an overnight charge all the sensors say unavailable. Simply reloading the integration bring it back to life.

Debug logs if an error occurred
Not sure where to find the debug logs?
Outlined here: https://github.com/fuatakgun/kia_uvo/blob/master/README.md

To Reproduce
Charge overnight
Expected behavior
Not to crash
Screenshots
If applicable, add screenshots to help explain your problem.

Additional context

@fuatakgun
Copy link
Member

fuatakgun commented Dec 14, 2024

Enable debug log before the night, let it crash and share the logs with us. until then, there is nothing we can do

@stintov
Copy link
Author

stintov commented Dec 15, 2024

Logger: homeassistant
Source: custom_components/kia_uvo/coordinator.py:175
integration: Kia Uvo / Hyundai Bluelink (documentation, issues)
First occurred: 14 December 2024 at 23:28:07 (1 occurrences)
Last logged: 14 December 2024 at 23:28:07

Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
File "/config/custom_components/kia_uvo/coordinator.py", line 175, in async_await_action_and_refresh
await self.hass.async_add_executor_job(
...<5 lines>...
)
File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.13/site-packages/hyundai_kia_connect_api/VehicleManager.py", line 215, in check_action_status
return self.api.check_action_status(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
self.token, self.get_vehicle(vehicle_id), action_id, synchronous, timeout
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/local/lib/python3.13/site-packages/hyundai_kia_connect_api/KiaUvoApiEU.py", line 1727, in check_action_status
state = self.check_action_status(
token, vehicle, action_id, synchronous=False
)
File "/usr/local/lib/python3.13/site-packages/hyundai_kia_connect_api/KiaUvoApiEU.py", line 1749, in check_action_status
_check_response_for_errors(response)
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/hyundai_kia_connect_api/KiaUvoApiEU.py", line 129, in _check_response_for_errors
raise error_code_mappingresponse["resCode"]
hyundai_kia_connect_api.exceptions.DeviceIDError: Invalid request body - Invalid deviceId.

@stintov
Copy link
Author

stintov commented Dec 15, 2024

Also

Logger: custom_components.kia_uvo.coordinator
Source: helpers/update_coordinator.py:379
integration: Kia Uvo / Hyundai Bluelink (documentation, issues)
First occurred: 14 December 2024 at 23:28:06 (16 occurrences)
Last logged: 06:58:07

Unexpected error fetching kia_uvo data
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 379, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/kia_uvo/coordinator.py", line 145, in _async_update_data
await self.hass.async_add_executor_job(
self.vehicle_manager.update_all_vehicles_with_cached_state
)
File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.13/site-packages/hyundai_kia_connect_api/VehicleManager.py", line 86, in update_all_vehicles_with_cached_state
self.update_vehicle_with_cached_state(vehicle_id)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/hyundai_kia_connect_api/VehicleManager.py", line 91, in update_vehicle_with_cached_state
self.api.update_vehicle_with_cached_state(self.token, vehicle)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/hyundai_kia_connect_api/KiaUvoApiEU.py", line 342, in update_vehicle_with_cached_state
_check_response_for_errors(response)
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/hyundai_kia_connect_api/KiaUvoApiEU.py", line 129, in _check_response_for_errors
raise error_code_mappingresponse["resCode"]
hyundai_kia_connect_api.exceptions.DeviceIDError: Invalid request body - Invalid deviceId.

It's fine after reloading the integration

@stintov
Copy link
Author

stintov commented Dec 18, 2024

Have I provided the correct logs please?

@fuatakgun
Copy link
Member

No. You didn't, if you follow readme, you would see how to generate debug logs (not error logs)

@stintov
Copy link
Author

stintov commented Dec 18, 2024

I added this code into configuration.yaml and restarted HA as per the read me.

logger:
default: warning
logs:
custom_components.kia_uvo: debug
hyundai_kia_connect_api: debug

After the crash I posted the logs a I saw.

image

I have enabled logging via the GUI this time, lets see what happens.

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