kia_uvo: integration is not working (failing after couple of minutes or at all)

Car/Region Hyundai Ioniq 5, EU

Describe the bug After the release of v1.4.6 that fixed the failure from this morning I have only partial success. The integration breaks after restart.

After I updated kia_uvo through HACS and restarted, all sensors was unavailable. I then tried deleting the integration and adding back the integration thinking that it was needed to refresh any token that might be stored. And when I added it back it started working. I then restarted HA due to another reason and it stopped working. I have tested this twice now and the behavior is the same. It works when I add it, but stops working after restart. The second time I also restarted HA between removing the integration and adding it back. The behavior is the same.

Debug logs if an error occurred

Note: I have masked tokens and some other data.

2022-02-07 18:25:06 DEBUG (MainThread) [custom_components.kia_uvo] kia_uvo - async_setup_entry started - <homeassistant.config_entries.ConfigEntry object at 0x7fb347c8c3b0>
2022-02-07 18:25:06 DEBUG (MainThread) [custom_components.kia_uvo.Vehicle] kia_uvo - Received token into Vehicle Object {'valid_until': '2022-02-08 17:21:27.494804', 'access_token': 'Bearer **********', 'refresh_token': 'Bearer **********', 'device_id': '**********', 'vehicle_name': 'IONIQ 5', 'vehicle_id': '**********', 'vehicle_regid': None, 'vehicle_model': 'IONIQ 5', 'vehicle_registration_date': '**********', 'stamp': '**********'}
2022-02-07 18:25:06 DEBUG (MainThread) [custom_components.kia_uvo.Vehicle] kia_uvo - Refresh token started 2022-02-08 17:21:27.494804 2022-02-07 18:25:06.537597 False
2022-02-07 18:25:06 DEBUG (SyncWorker_4) [custom_components.kia_uvo.KiaUvoApiEU] kia_uvo - get_cached_vehicle_status response {'retCode': 'F', 'resCode': '4017', 'resMsg': 'Invalid request value - Invalid Application Id. - 670.7019999027252', 'msgId': '**********'}
2022-02-07 18:25:08 ERROR (MainThread) [custom_components.kia_uvo.Vehicle] kia_uvo - Exception in update : string indices must be integers - traceback: Traceback (most recent call last):
  File "/config/custom_components/kia_uvo/Vehicle.py", line 56, in update
    self.vehicle_data = await self.hass.async_add_executor_job(
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/kia_uvo/KiaUvoApiEU.py", line 433, in get_cached_vehicle_status
cat custom_components/kia_uvo/manifest.json
{
  "domain": "kia_uvo",
  "name": "Kia Uvo / Hyundai Bluelink",
  "documentation": "https://github.com/fuatakgun/kia_uvo",
  "issue_tracker": "https://github.com/fuatakgun/kia_uvo/issues",
  "codeowners": ["@fuatakgun"],
  "requirements": ["push_receiver==0.1.1", "curlify", "bs4"],
  "version": "1.4.6",
  "config_flow": true,
  "iot_class": "cloud_polling"
}

To Reproduce Steps to reproduce the behavior: 1: Remove the kia_uvo integration from HA 2. Restart HA 3. Add the kia_uvo integration 4. Confirm that it is working 5. Restart HA 6. The kia_uvo integration stops working

Expected behavior The kia_uvo integration working after HA restart without having to delete/add it again.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 34 (5 by maintainers)

Most upvoted comments

Please get v1.4.10 version, released by 12:09 PM in EU timezone. Restart your home assistant, do not play any file, integration will take care of renewal of login token.

I am tired 😉 but joyful

We are aware of the problem, and working on a solution hopefully today (in EU timezone)

Edit: taking back, please dismiss all below, no solution yet

Please remove the integration, download the latest version and add the integration back with same credentials. Or, if you want to take the dangerous path, reinstall new version and manually update core.config_entries.yaml file with an expired valid_until date (anything earlier than now would work) and restart home assistant.

I have tested locally, running fine long enough

I updated to V1.48 now and change the Date in config/storage/core.config_entries to

"valid_until": "2022-02-08 05:40:59.378715",

Restart HA, Integration is working. Force Refresh also working. i will keep watching it.

        + ".json"
         + ".v2.json"

Yes, this is the only change I made and it is working for me now. The other two commits replaces each other so the end result is no change.