skodaconnect / myskoda

Python library for interacting with MySkoda APIs.
MIT License
9 stars 22 forks source link

Missing capabilities #34

Closed Prior99 closed 1 month ago

Prior99 commented 1 month ago
This error originated from a custom integration.

Logger: custom_components.myskoda.coordinator
Source: /usr/src/homeassistant/homeassistant/helpers/update_coordinator.py:425
integration: MySkoda (documentation, issues)
First occurred: 18:24:20 (4 occurrences)
Last logged: 18:26:09

Unexpected error fetching myskoda data
Traceback (most recent call last):
  File "<string>", line 15, in __mashumaro_from_dict__
  File "/usr/local/lib/python3.12/enum.py", line 757, in __call__
    return cls.__new__(cls, value)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/enum.py", line 1171, in __new__
    raise ve_exc
ValueError: 'INITIALLY_DISABLED' is not a valid CapabilityStatus

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 8, in __mashumaro_from_dict_json__
  File "/usr/local/lib/python3.12/site-packages/myskoda/models/info.py", line 106, in drop_unknown_capabilities
    return [Capability.from_dict(c) for c in value if c["id"] in CapabilityId]
            ^^^^^^^^^^^^^^^^^^^^^^^
  File "<string>", line 17, in __mashumaro_from_dict__
mashumaro.exceptions.InvalidFieldValue: Field "statuses" of type list[CapabilityStatus] in Capability has invalid value ['INITIALLY_DISABLED', 'FRONTEND_SWITCHED_OFF']

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 30, in __mashumaro_from_json__
  File "<string>", line 10, in __mashumaro_from_dict_json__
mashumaro.exceptions.InvalidFieldValue: Field "capabilities" of type list[Capability] in Capabilities has invalid value [{'id': 'AUTOMATION', 'statuses': []}, {'id': 'BATTERY_CHARGING_CARE', 'statuses': []}, {'id': 'BATTERY_SUPPORT', 'statuses': []}, {'id': 'CHARGING_PROFILES', 'statuses': []}, {'id': 'CHARGING_STATIONS', 'statuses': []}, {'id': 'DEALER_APPOINTMENT', 'statuses': ['INITIALLY_DISABLED', 'FRONTEND_SWITCHED_OFF']}, {'id': 'DIGICERT', 'statuses': []}, {'id': 'MAP_UPDATE', 'statuses': []}, {'id': 'MEASUREMENTS', 'statuses': ['LICENSE_MISSING']}, {'id': 'PARKING_INFORMATION', 'statuses': []}, {'id': 'PARKING_POSITION', 'statuses': ['LICENSE_MISSING']}, {'id': 'PLUG_AND_CHARGE', 'statuses': []}, {'id': 'POI_SEARCH', 'statuses': []}, {'id': 'ROADSIDE_ASSISTANT', 'statuses': []}, {'id': 'ROUTING', 'statuses': []}, {'id': 'STATE', 'statuses': ['LICENSE_MISSING']}, {'id': 'TRAFFIC_INFORMATION', 'statuses': []}, {'id': 'VEHICLE_HEALTH_INSPECTION', 'statuses': ['LICENSE_MISSING']}, {'id': 'WARNING_LIGHTS', 'statuses': ['LICENSE_MISSING']}, {'id': 'AIR_CONDITIONING_TIMERS', 'statuses': []}, {'id': 'AIR_CONDITIONING_SMART_SETTINGS', 'statuses': []}, {'id': 'POWERPASS_TARIFFS', 'statuses': []}, {'id': 'AIR_CONDITIONING_SAVE_AND_ACTIVATE', 'statuses': []}, {'id': 'CUBIC', 'statuses': []}, {'id': 'ROUTE_PLANNING_5_CHARGERS', 'statuses': []}, {'id': 'SUBSCRIPTIONS', 'statuses': []}, {'id': 'DESTINATIONS', 'statuses': []}, {'id': 'CHARGING_MEB', 'statuses': []}, {'id': 'VEHICLE_SERVICES_BACKUPS', 'statuses': []}, {'id': 'EV_ROUTE_PLANNING', 'statuses': []}, {'id': 'CHARGE_MODE_SELECTION', 'statuses': []}, {'id': 'DIGICERT', 'statuses': ['LICENSE_MISSING']}, {'id': 'VEHICLE_HEALTH_WARNINGS', 'statuses': ['LICENSE_MISSING']}, {'id': 'PAY_TO_PARK', 'statuses': ['LICENSE_MISSING']}, {'id': 'ONLINE_SPEECH_GPS', 'statuses': []}, {'id': 'GUEST_USER_MANAGEMENT', 'statuses': []}, {'id': 'SERVICE_PARTNER', 'statuses': []}, {'id': 'WINDOW_HEATING', 'statuses': []}, {'id': 'ROUTE_IMPORT', 'statuses': []}, {'id': 'CHARGING', 'statuses': []}, {'id': 'AIR_CONDITIONING', 'statuses': []}, {'id': 'EXTENDED_CHARGING_SETTINGS', 'statuses': []}, {'id': 'VEHICLE_WAKE_UP_TRIGGER', 'statuses': ['LICENSE_MISSING']}]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 354, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/myskoda/coordinator.py", line 82, in _async_update_data
    vehicle = await self.myskoda.get_vehicle(self.vin)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/myskoda/myskoda.py", line 203, in get_vehicle
    info = await self.get_info(vin)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/myskoda/myskoda.py", line 159, in get_info
    return await self.rest_api.get_info(vin)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/myskoda/rest_api.py", line 52, in get_info
    return await self._make_get_request(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/myskoda/rest_api.py", line 41, in _make_get_request
    data = deserialize(response_text)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<string>", line 32, in __mashumaro_from_json__
mashumaro.exceptions.InvalidFieldValue: Field "capabilities" of type Capabilities in Info has invalid value {'capabilities': [{'id': 'AUTOMATION', 'statuses': []}, {'id': 'BATTERY_CHARGING_CARE', 'statuses': []}, {'id': 'BATTERY_SUPPORT', 'statuses': []}, {'id': 'CHARGING_PROFILES', 'statuses': []}, {'id': 'CHARGING_STATIONS', 'statuses': []}, {'id': 'DEALER_APPOINTMENT', 'statuses': ['INITIALLY_DISABLED', 'FRONTEND_SWITCHED_OFF']}, {'id': 'DIGICERT', 'statuses': []}, {'id': 'MAP_UPDATE', 'statuses': []}, {'id': 'MEASUREMENTS', 'statuses': ['LICENSE_MISSING']}, {'id': 'PARKING_INFORMATION', 'statuses': []}, {'id': 'PARKING_POSITION', 'statuses': ['LICENSE_MISSING']}, {'id': 'PLUG_AND_CHARGE', 'statuses': []}, {'id': 'POI_SEARCH', 'statuses': []}, {'id': 'ROADSIDE_ASSISTANT', 'statuses': []}, {'id': 'ROUTING', 'statuses': []}, {'id': 'STATE', 'statuses': ['LICENSE_MISSING']}, {'id': 'TRAFFIC_INFORMATION', 'statuses': []}, {'id': 'VEHICLE_HEALTH_INSPECTION', 'statuses': ['LICENSE_MISSING']}, {'id': 'WARNING_LIGHTS', 'statuses': ['LICENSE_MISSING']}, {'id': 'AIR_CONDITIONING_TIMERS', 'statuses': []}, {'id': 'AIR_CONDITIONING_SMART_SETTINGS', 'statuses': []}, {'id': 'POWERPASS_TARIFFS', 'statuses': []}, {'id': 'AIR_CONDITIONING_SAVE_AND_ACTIVATE', 'statuses': []}, {'id': 'CUBIC', 'statuses': []}, {'id': 'ROUTE_PLANNING_5_CHARGERS', 'statuses': []}, {'id': 'SUBSCRIPTIONS', 'statuses': []}, {'id': 'DESTINATIONS', 'statuses': []}, {'id': 'CHARGING_MEB', 'statuses': []}, {'id': 'VEHICLE_SERVICES_BACKUPS', 'statuses': []}, {'id': 'EV_ROUTE_PLANNING', 'statuses': []}, {'id': 'CHARGE_MODE_SELECTION', 'statuses': []}, {'id': 'DIGICERT', 'statuses': ['LICENSE_MISSING']}, {'id': 'VEHICLE_HEALTH_WARNINGS', 'statuses': ['LICENSE_MISSING']}, {'id': 'PAY_TO_PARK', 'statuses': ['LICENSE_MISSING']}, {'id': 'ONLINE_SPEECH_GPS', 'statuses': []}, {'id': 'GUEST_USER_MANAGEMENT', 'statuses': []}, {'id': 'SERVICE_PARTNER', 'statuses': []}, {'id': 'WINDOW_HEATING', 'statuses': []}, {'id': 'ROUTE_IMPORT', 'statuses': []}, {'id': 'CHARGING', 'statuses': []}, {'id': 'AIR_CONDITIONING', 'statuses': []}, {'id': 'EXTENDED_CHARGING_SETTINGS', 'statuses': []}, {'id': 'VEHICLE_WAKE_UP_TRIGGER', 'statuses': ['LICENSE_MISSING']}]}
WebSpider commented 1 month ago

Fixes https://github.com/skodaconnect/homeassistant-myskoda/issues/35

pierastalka commented 1 month ago

Hi,

I'm experiencing a similar issue with my integration setup. After adding the integration, I get a failed setup message, and this is what I found in my log:

Unexpected error fetching myskoda data
Traceback (most recent call last):
  File "<string>", line 15, in __mashumaro_from_dict__
  File "/usr/local/lib/python3.12/enum.py", line 757, in __call__
    return cls.__new__(cls, value)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/enum.py", line 1171, in __new__
    raise ve_exc
ValueError: 'INITIALLY_DISABLED' is not a valid CapabilityStatus

My car is a Skoda Enyaq 85x 2024 with software version 4.1, in case that's relevant.

pierastalka commented 1 month ago

I also noticed that I have an issue in the official Skoda app (MySkoda). The app states "activation required" for remote access, even though the license is already active and valid until 2027. Could this issue be related to the problem I'm experiencing with the integration?

dvx76 commented 1 month ago

Mine