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

VR921 internet module, with VR33 OpenTherm controller #176

Open
girtsn opened this issue Jun 22, 2024 · 3 comments
Open

VR921 internet module, with VR33 OpenTherm controller #176

girtsn opened this issue Jun 22, 2024 · 3 comments

Comments

@girtsn
Copy link

girtsn commented Jun 22, 2024

Problem description

Hello, I have a VR921 internet module which is returned over the API in /homes call, but then since control id is missing, no other data is fetched (see logs below). Also there is an an error which asks to report itself as an issue, not sure if its just about the control id or something else.
I am controlling the heater over VR33 OpenTherm interface, and the mobile app also does not show any control information.

  1. Howevere the mobile app does show electric energy and gas consumption over time, is there no way to access these statistics in absence of controller?
  2. Or would be even more fun if VR33 controller was accessible somehow over another API, surely it has quote some data and sensors too. Let me know if I can poke around with some other API calls / debug something else.

Logs

2024-06-22 10:30:03.972 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-06-22 10:30:03.972 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration mypyllant which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-06-22 10:30:06.091 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'hacs' accesses hass.components.frontend. This is deprecated and will stop working in Home Assistant 2024.9, it should be updated to import functions used from frontend directly at custom_components/hacs/frontend.py, line 68: hass.components.frontend.async_register_built_in_panel(, please create a bug report at https://github.com/hacs/integration/issues
2024-06-22 10:30:06.336 DEBUG (MainThread) [custom_components.mypyllant] Starting mypyllant component v0.7.3 (library 0.8.12) with homeassistant 2024.6.4, pydantic 1.10.15, and aiohttp 3.9.5
2024-06-22 10:30:06.336 DEBUG (MainThread) [custom_components.mypyllant] Creating API and logging in with xxx in realm belgium
2024-06-22 10:30:07.982 DEBUG (MainThread) [custom_components.mypyllant] Refreshing SystemCoordinator
2024-06-22 10:30:07.982 DEBUG (MainThread) [custom_components.mypyllant.coordinator] Starting async update data for SystemCoordinator
2024-06-22 10:30:07.982 DEBUG (MainThread) [custom_components.mypyllant.coordinator] Waiting 119s until token refresh for xxx
2024-06-22 10:30:07.983 DEBUG (MainThread) [myPyllant.http_client] Starting request TraceRequestStartParams(method='GET', url=URL('https://api.vaillant-group.com/service-connected-control/end-user-app-api/v1/homes')
2024-06-22 10:30:08.704 DEBUG (MainThread) [myPyllant.http_client] Got response [{"homeName":"hname","address":{"street":"street","extension":null,"city":"city","postalCode":"zip","countryCode":"BE"},"serialNumber":"sn","systemId":"sysid","productMetadata":{"productType":"VR921","productionYear":"22","productionWeek":"07","articleNumber":"0020260965"},"state":"CLAIMED","migrationState":null,"migrationFinishedAt":null,"onlineState":"ONLINE","firmware":{"version":"0357.40.35","connectedToOldIoTPlatform":null,"updateEnabled":true,"updateRequired":false},"nomenclature":"VR 921","cag":false,"countryCode":"BE","productInformation":"VR921","firmwareVersion":"0357.40.35"}]
2024-06-22 10:30:08.705 DEBUG (MainThread) [myPyllant.http_client] Starting request TraceRequestStartParams(method='GET', url=URL('https://api.vaillant-group.com/service-connected-control/end-user-app-api/v1/systems/sid/meta-info/time-zone'), headers=auth, 'x-app-identifier': 'VAILLANT', 'Accept-Language': 'en-GB', 'Accept': 'application/json, text/plain, /', 'x-client-locale': 'en-GB', 'x-idm-identifier': 'KEYCLOAK', 'ocp-apim-subscription-key': 'key', 'User-Agent': 'okhttp/4.9.2', 'Connection': 'keep-alive')>)
2024-06-22 10:30:09.293 DEBUG (MainThread) [myPyllant.http_client] Got response {"timeZone":"Europe/Brussels"}
2024-06-22 10:30:09.300 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open inside the event loop by custom integration 'mypyllant' at custom_components/mypyllant/coordinator.py, line 169: data = [ (offender: /usr/local/lib/python3.12/site-packages/dateutil/tz/tz.py, line 464: fileobj = open(fileobj, 'rb')), please create a bug report at https://github.com/signalkraft/mypyllant-component/issues
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "/usr/src/homeassistant/homeassistant/main.py", line 223, in
sys.exit(main())
File "/usr/src/homeassistant/homeassistant/main.py", line 209, in main
exit_code = runner.run(runtime_conf)
File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run
return loop.run_until_complete(setup_and_run_hass(runtime_config))
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 672, in run_until_complete
self.run_forever()
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 639, in run_forever
self._run_once()
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1988, in _run_once
handle._run()
File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 742, in async_setup_locked
await self.async_setup(hass, integration=integration)
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup
result = await component.async_setup_entry(hass, self)
File "/config/custom_components/mypyllant/init.py", line 122, in async_setup_entry
await system_coordinator.async_refresh()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 288, in async_refresh
await self._async_refresh(log_failures=True)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 312, in _async_refresh
self.data = await self._async_update_data()
File "/config/custom_components/mypyllant/coordinator.py", line 169, in _async_update_data
data = [

2024-06-22 10:30:09.302 DEBUG (MainThread) [myPyllant.http_client] Starting request TraceRequestStartParams(method='GET', url=URL('https://api.vaillant-group.com/service-connected-control/end-user-app-api/v1/systems/sid/meta-info/control-identifier'), headers=auth, 'x-app-identifier': 'VAILLANT', 'Accept-Language': 'en-GB', 'Accept': 'application/json, text/plain, /', 'x-client-locale': 'en-GB', 'x-idm-identifier': 'KEYCLOAK', 'ocp-apim-subscription-key': 'key', 'User-Agent': 'okhttp/4.9.2', 'Connection': 'keep-alive')>)
2024-06-22 10:30:09.635 DEBUG (MainThread) [myPyllant.http_client] Got response {"controlIdentifier":"none"}
2024-06-22 10:30:09.635 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 312, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/mypyllant/coordinator.py", line 169, in _async_update_data
data = [
^
File "/usr/local/lib/python3.12/site-packages/myPyllant/api.py", line 335, 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 1068, in get_control_identifier
return ControlIdentifier(control_identifier)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/enum.py", line 744, in call
return cls.new(cls, value)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/enum.py", line 1158, in new
raise ve_exc
ValueError: 'none' is not a valid ControlIdentifier
2024-06-22 10:30:09.641 DEBUG (MainThread) [custom_components.mypyllant.coordinator] Finished fetching myVAILLANT data in 1.659 seconds (success: False)
2024-06-22 10:30:09.641 DEBUG (MainThread) [custom_components.mypyllant] Refreshing DailyDataCoordinator
2024-06-22 10:30:09.641 DEBUG (MainThread) [custom_components.mypyllant.coordinator] Starting async update data for DailyDataCoordinator
2024-06-22 10:30:09.641 DEBUG (MainThread) [custom_components.mypyllant.coordinator] Waiting 118s until token refresh for girts.niedra@gmail.com
2024-06-22 10:30:09.642 DEBUG (MainThread) [myPyllant.http_client] Starting request TraceRequestStartParams(method='GET', url=URL('https://api.vaillant-group.com/service-connected-control/end-user-app-api/v1/homes'), headers=auth, 'x-app-identifier': 'VAILLANT', 'Accept-Language': 'en-GB', 'Accept': 'application/json, text/plain, /', 'x-client-locale': 'en-GB', 'x-idm-identifier': 'KEYCLOAK', 'ocp-apim-subscription-key': 'key', 'User-Agent': 'okhttp/4.9.2', 'Connection': 'keep-alive')>)
2024-06-22 10:30:10.060 DEBUG (MainThread) [myPyllant.http_client] Got response [{"homeName":"home","address":{"street":"street","extension":null,"city":"city","postalCode":"zip","countryCode":"BE"},"serialNumber":"sn","systemId":"sid","productMetadata":{"productType":"VR921","productionYear":"22","productionWeek":"07","articleNumber":"0020260965"},"state":"CLAIMED","migrationState":null,"migrationFinishedAt":null,"onlineState":"ONLINE","firmware":{"version":"0357.40.35","connectedToOldIoTPlatform":null,"updateEnabled":true,"updateRequired":false},"nomenclature":"VR 921","cag":false,"countryCode":"BE","productInformation":"VR921","firmwareVersion":"0357.40.35"}]
2024-06-22 10:30:10.060 DEBUG (MainThread) [myPyllant.http_client] Starting request TraceRequestStartParams(method='GET', url=URL('https://api.vaillant-group.com/service-connected-control/end-user-app-api/v1/systems/sid/meta-info/time-zone'), headers=auth 'x-app-identifier': 'VAILLANT', 'Accept-Language': 'en-GB', 'Accept': 'application/json, text/plain, /', 'x-client-locale': 'en-GB', 'x-idm-identifier': 'KEYCLOAK', 'ocp-apim-subscription-key': 'key', 'User-Agent': 'okhttp/4.9.2', 'Connection': 'keep-alive')>)
2024-06-22 10:30:10.780 DEBUG (MainThread) [myPyllant.http_client] Got response {"timeZone":"Europe/Brussels"}
2024-06-22 10:30:10.780 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 312, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/mypyllant/coordinator.py", line 203, 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 335, 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 1068, in get_control_identifier
return ControlIdentifier(control_identifier)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/enum.py", line 744, in call
return cls.new(cls, value)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/enum.py", line 1158, in new
raise ve_exc
ValueError: 'none' is not a valid ControlIdentifier
2024-06-22 10:30:10.782 DEBUG (MainThread) [custom_components.mypyllant.coordinator] Finished fetching myVAILLANT data in 1.141 seconds (success: False)

@signalkraft
Copy link
Owner

the mobile app also does not show any control information

So there's nothing in the MyVAILLANT app? Or is it working? If it works, you would probably need to reverse engineer the API to find out what values are being sent.

@girtsn
Copy link
Author

girtsn commented Jul 2, 2024

The MyVAILLANT app is not gshowing any controls, but it does show statistics of gas and electricity usage.

@signalkraft
Copy link
Owner

I wasn't aware that this case exists. Could you try reverse engineering to find out what API calls are being made and what they return in your case?

Generating test data may also help.

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

2 participants