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

ValueError: 'none' is not a valid ControlIdentifier #207

Open
2 of 3 tasks
Commifreak opened this issue Sep 6, 2024 · 4 comments
Open
2 of 3 tasks

ValueError: 'none' is not a valid ControlIdentifier #207

Commifreak opened this issue Sep 6, 2024 · 4 comments

Comments

@Commifreak
Copy link

Before submitting a new issue

Problem description

During setup I get:

2024-09-06 18:10:06.213 ERROR (MainThread) [custom_components.mypyllant.coordinator] Unexpected error fetching myVAILLANT data
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/mypyllant/coordinator.py", line 213, in _async_update_data
    async for system in await self.hass.async_add_executor_job(
  File "/usr/local/lib/python3.12/site-packages/myPyllant/api.py", line 338, in get_systems
    control_identifier = await self.get_control_identifier(home.system_id)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/myPyllant/api.py", line 1213, in get_control_identifier
    return ControlIdentifier(control_identifier)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  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: 'none' is not a valid ControlIdentifier

But the data collection works! I dont want to attached everything because of personal data, but be assured: The debug log shows all homes!

The line just before the trace is:

2024-09-06 18:10:06.100 DEBUG (MainThread) [custom_components.mypyllant] Refreshing DailyDataCoordinator
2024-09-06 18:10:06.100 DEBUG (MainThread) [custom_components.mypyllant.coordinator] Starting async update data for DailyDataCoordinator
2024-09-06 18:10:06.100 DEBUG (MainThread) [custom_components.mypyllant.coordinator] Waiting 119s until token refresh for [email protected]
2024-09-06 18:10:06.101 DEBUG (MainThread) [myPyllant.http_client] Starting GET to https://api.vaillant-group.com/service-connected-control/end-user-app-api/v1/homes
2024-09-06 18:10:06.157 DEBUG (MainThread) [myPyllant.http_client] Got response for GET to https://api.vaillant-group.com/service-connected-control/end-user-app-api/v1/homes: ........,"productMetadata":{"productType":"VR921","productionYear":"22","productionWeek":"42","articleNumber":"0020260962"},"state":"CLAIMED","migrationState":"FINISHED","migrationFinishedAt":"2024-03-19T20:05:30.354270431Z","onlineState":"ONLINE","firmware":{"version":"0357.40.35","connectedToOldIoTPlatform":null,"updateEnabled":true,"updateRequired":false},"nomenclature":"VR 921","cag":false,"countryCode":"DE","productInformation":"VR921","firmwareVersion":"0357.40.35"}]
2024-09-06 18:10:06.158 DEBUG (MainThread) [myPyllant.http_client] Starting GET to https://api.vaillant-group.com/service-connected-control/end-user-app-api/v1/systems/myhome/meta-info/time-zone
2024-09-06 18:10:06.212 DEBUG (MainThread) [myPyllant.http_client] Got response for GET to https://api.vaillant-group.com/service-connected-control/end-user-app-api/v1/systems/myhome/meta-info/time-zone: {"timeZone":"Europe/Berlin"}

Logs

see above

@olafz
Copy link

olafz commented Sep 25, 2024

I have the same error, but in my case data collection also does not work. When I remove the integration and add it again, there are no devices or entities:

ValueError: 'none' is not a valid ControlIdentifier
2024-09-24 22:13:33.450 ERROR (MainThread) [custom_components.mypyllant.coordinator] Unexpected error fetching myVAILLANT data
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/mypyllant/coordinator.py", line 213, in _async_update_data
    async for system in await self.hass.async_add_executor_job(
  File "/usr/local/lib/python3.12/site-packages/myPyllant/api.py", line 338, in get_systems
    control_identifier = await self.get_control_identifier(home.system_id)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/myPyllant/api.py", line 1213, in get_control_identifier
    return ControlIdentifier(control_identifier)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  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: 'none' is not a valid ControlIdentifier
2024-09-24 22:13:34.815 WARNING (MainThread) [custom_components.mypyllant.binary_sensor] No system data, skipping binary sensors
2024-09-24 22:13:34.815 WARNING (MainThread) [custom_components.mypyllant.calendar] No system data, skipping calendar entities
2024-09-24 22:13:34.815 WARNING (MainThread) [custom_components.mypyllant.climate] No system data, skipping climate
2024-09-24 22:13:34.816 WARNING (MainThread) [custom_components.mypyllant.datetime] No system data, skipping date time entities
2024-09-24 22:13:34.816 WARNING (MainThread) [custom_components.mypyllant.number] No system data, skipping number entities
2024-09-24 22:13:34.816 WARNING (MainThread) [custom_components.mypyllant.sensor] No system data, skipping sensors
2024-09-24 22:13:34.816 WARNING (MainThread) [custom_components.mypyllant.sensor] No daily data, skipping sensors
2024-09-24 22:13:34.816 WARNING (MainThread) [custom_components.mypyllant.switch] No system data, skipping switch entities
2024-09-24 22:13:34.816 WARNING (MainThread) [custom_components.mypyllant.water_heater] No system data, skipping water heater

@signalkraft
Copy link
Owner

There should be a debug log for an API endpoint ending in /control-identifier:

Got response for GET to https://api.vaillant-group.com/service-connected-control/end-user-app-api/v1/systems/.../meta-info/control-identifier: {"controlIdentifier":"tli"}

Could you share that?

@Commifreak
Copy link
Author

Yup:

2024-10-09 18:22:09.197 DEBUG (MainThread) [myPyllant.http_client] Starting GET to https://api.vaillant-group.com/service-connected-control/end-user-app-api/v1/systems/5cdd2c55-9bf3-4373-b215-71d1a5f68eef/meta-info/control-identifier
2024-10-09 18:22:09.272 DEBUG (MainThread) [myPyllant.http_client] Got response for GET to https://api.vaillant-group.com/service-connected-control/end-user-app-api/v1/systems/5cdd2c55-9bf3-4373-b215-71d1a5f68eef/meta-info/control-identifier: {"controlIdentifier":"vrc700"}

@Commifreak
Copy link
Author

Uh, wait. The error with latest version is now different?!

2024-10-09 18:22:10.083 ERROR (MainThread) [custom_components.mypyllant.coordinator] Unexpected error fetching myVAILLANT data
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/mypyllant/coordinator.py", line 213, in _async_update_data
    async for system in await self.hass.async_add_executor_job(
  File "/usr/local/lib/python3.12/site-packages/myPyllant/api.py", line 358, in get_systems
    system = System.from_api(
             ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/myPyllant/models.py", line 944, in from_api
    Zone.from_api(
  File "/usr/local/lib/python3.12/site-packages/myPyllant/models.py", line 430, in from_api
    data["cooling"] = ZoneCooling.from_api(
                      ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/myPyllant/models.py", line 326, in from_api
    **data["time_program_cooling"]
      ~~~~^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'time_program_cooling'

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