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

Superb iV: Internal Server Error for BatteryCare and ChargeLimit functionality #166

Open
prvakt opened this issue Nov 3, 2024 · 5 comments · May be fixed by #178
Open

Superb iV: Internal Server Error for BatteryCare and ChargeLimit functionality #166

prvakt opened this issue Nov 3, 2024 · 5 comments · May be fixed by #178
Assignees
Labels
bug Something isn't working

Comments

@prvakt
Copy link

prvakt commented Nov 3, 2024

Receiving Internal Server Error when testing set-charge-limit and set-care-mode.. Probably because its not supported by my car? I can't find CareMode anywhere in MySkoda app, car infotaiment or in old integration. For charge limit, also it seems its not available in MySkoda or car infotaiment (old integration has support for this feature but I have never tested it)

set-charge-limit

Logger: homeassistant.helpers.script.websocket_api_script
Source: helpers/script.py:525
First occurred: 12:34:50 PM (1 occurrences)
Last logged: 12:34:50 PM

websocket_api script: Error executing script. Unexpected error for call_service at pos 1: 500, message='Internal Server Error', url='https://mysmob.api.connect.skoda-auto.cz/api/v1/charging/XXXXXXXXXXXXXXXXX/set-charge-limit'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 525, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 763, in _async_call_service_step
    response_data = await self._async_run_long_action(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 726, in _async_run_long_action
    return await long_task
           ^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2761, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2804, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 996, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1068, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/number/__init__.py", line 122, in async_set_value
    await entity.async_set_native_value(native_value)
  File "/config/custom_components/myskoda/number.py", line 75, in async_set_native_value
    await self.coordinator.myskoda.set_charge_limit(
  File "/usr/local/lib/python3.12/site-packages/myskoda/myskoda.py", line 187, in set_charge_limit
    await self.rest_api.set_charge_limit(vin, limit)
  File "/usr/local/lib/python3.12/site-packages/myskoda/rest_api.py", line 297, in set_charge_limit
    await self._make_put_request(
  File "/usr/local/lib/python3.12/site-packages/myskoda/rest_api.py", line 101, in _make_put_request
    return await self._make_request(url=url, method="PUT", json=json)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/myskoda/rest_api.py", line 85, in _make_request
    response.raise_for_status()
  File "/usr/local/lib/python3.12/site-packages/aiohttp/client_reqrep.py", line 1121, in raise_for_status
    raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 500, message='Internal Server Error', url='https://mysmob.api.connect.skoda-auto.cz/api/v1/charging/XXXXXXXXXXXXXXXXX/set-charge-limit'

set-care-mode

Source: components/websocket_api/commands.py:245
integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 12:36:57 PM (1 occurrences)
Last logged: 12:36:57 PM

[140642127969536] Unexpected exception
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 245, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2761, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2804, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 996, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1068, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/config/custom_components/myskoda/switch.py", line 156, in async_turn_on
    await self._async_turn_on_off(turn_on=True)
  File "/config/custom_components/myskoda/switch.py", line 143, in _async_turn_on_off
    await self.coordinator.myskoda.set_battery_care_mode(
  File "/usr/local/lib/python3.12/site-packages/myskoda/myskoda.py", line 181, in set_battery_care_mode
    await self.rest_api.set_battery_care_mode(vin, enabled)
  File "/usr/local/lib/python3.12/site-packages/myskoda/rest_api.py", line 307, in set_battery_care_mode
    await self._make_put_request(
  File "/usr/local/lib/python3.12/site-packages/myskoda/rest_api.py", line 101, in _make_put_request
    return await self._make_request(url=url, method="PUT", json=json)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/myskoda/rest_api.py", line 85, in _make_request
    response.raise_for_status()
  File "/usr/local/lib/python3.12/site-packages/aiohttp/client_reqrep.py", line 1121, in raise_for_status
    raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 500, message='Internal Server Error', url='https://mysmob.api.connect.skoda-auto.cz/api/v1/charging/XXXXXXXXXXXXXXXXX/set-care-mode'```
@prvakt prvakt added the bug Something isn't working label Nov 3, 2024
@dvx76
Copy link
Member

dvx76 commented Nov 3, 2024

Are you able to perform these changes with the official MySkoda app?

@dvx76
Copy link
Member

dvx76 commented Nov 3, 2024

Ah I see you've already mentioned it. I guess we need to disable the battery care sensor completely for this case and for charge limit disable the ability to make changes (or report it as a sensor instead of a number entity 🤔 )

@dvx76
Copy link
Member

dvx76 commented Nov 3, 2024

For Suberb Iv the charging endpoint already reports "errors": [{"type": "CARE_MODE_IS_NOT_AVAILABLE" + "type": "CHARGE_LIMIT_IS_NOT_AVAILABLE" , so that should be usable.

@dvx76
Copy link
Member

dvx76 commented Nov 3, 2024

What value do the switch.skoda_enyaq_battery_care and number.skoda_enyaq_charge_limit entities actually report for you ?

@prvakt
Copy link
Author

prvakt commented Nov 3, 2024

@dvx76
switch.skoda_superb_combi_battery_care reports off
number.skoda_superb_combi_charge_limit report unknown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants