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

"Invalid Schema Request" #495

Open
whinis opened this issue Feb 4, 2024 · 6 comments
Open

"Invalid Schema Request" #495

whinis opened this issue Feb 4, 2024 · 6 comments

Comments

@whinis
Copy link

whinis commented Feb 4, 2024

  • Hyundai / Kia Connect version: v2.20.0
  • Python version: 3.11
  • Operating System:HassOS

Description

Attempting any API calls just returns this error
hyundai_kia_connect_api - Error: unknown error response {"status":{"statusCode":1,"errorType":1,"errorCode":450,"errorMessage":"Invalid Schema Request"}}

full traceback


Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 476, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 713, in _async_call_service_step
    response_data = await self._async_run_long_action(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 675, in _async_run_long_action
    return long_task.result()
           ^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2149, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2186, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/kia_uvo/services.py", line 90, 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 135, 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 722, 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 43, 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 88, in request_with_logging_wrapper
    raise RequestException
requests.exceptions.RequestException
@cdnninja
Copy link
Collaborator

cdnninja commented Feb 5, 2024

Can you clarify any api call? It looks like you're using kia_uvo rather than this api. It also looks like it fails on start_climate which would imply multiple calls succeed before you got this far?

Trying to understand if this is any api call failing or just start_climate.

What parameters did you pass the call? How does this align to your native app.

@whinis
Copy link
Author

whinis commented Feb 5, 2024

Sorry, its any "active" api. so I cannot change any settings such as charge level (ac/dc) start climate, stop climate, lock, or unlock. All seem to fail with this error. All passive data such as charge level, next service, mileage seem to come in just fine without error.

@Bubo08
Copy link
Collaborator

Bubo08 commented Feb 5, 2024

Which car do you have? If you have EU and a new car model (end 2023 and newer) then it is a known issue. In the readme the supported functions are documented.
Setting of charge level (ac/dc) is implemented in the api but has still a bug in the kia_uvo part. I am working on that one.

@whinis
Copy link
Author

whinis commented Feb 5, 2024

US Ev6 2023

@cdnninja
Copy link
Collaborator

cdnninja commented Feb 7, 2024

What parameters did you pass and do they match the options in the native app?

@whinis
Copy link
Author

whinis commented Feb 8, 2024

how would I check? My native app just seems to have a button for start/stop climate and for lock/unlock without any extra options

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

3 participants