Not able to add comfoair to home assistant: timeout error
When trying to add my comfoair q350 to home assistant with this integration, I always get a timeout error. Comfoconnect U1.1.10
Logger: aiocomfoconnect.bridge Bron: custom_components/comfoconnect/config_flow.py:123 integratie: Zehnder ComfoAir Q Eerst voorgekomen: 10 november 2024 om 23:42:19 (8 gebeurtenissen) Laatst gelogd: 17:30:00
Timeout while waiting for response from bridge
I also get a timeout error. (Disclaimer: I am a very new HA user and this is my first custom integration) Running: HA OS 2024.12.5 on RPi 5, ComfoAir Q R1.10.0 with ComfoConnect Gateway R1.5.1
I installed HACS, added github repository, downloaded Home Assistant Zehnder ComfoAirQ / ComfoCoolQ integration. When I try to add integration, Zehnder ComfoAir Q is found, it even finds ComfoConnect LAN C bridge and offers 192.168.2.113 IP, which is correct. Then when I click submit, in a few seconds Unknown error occurred message is displayed.
home-assistant.log has the following entry:
2024-12-25 21:59:24.957 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None) Traceback (most recent call last): File "/usr/local/lib/python3.13/site-packages/aiocomfoconnect/bridge.py", line 218, in _process_message message = await self._read() ^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.13/site-packages/aiocomfoconnect/bridge.py", line 181, in _read msg_len_buf = await self._reader.readexactly(4) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.13/asyncio/streams.py", line 767, in readexactly raise exceptions.IncompleteReadError(incomplete, n) asyncio.exceptions.IncompleteReadError: 0 bytes read on a total of 4 expected bytes
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/usr/local/lib/python3.13/site-packages/aiocomfoconnect/bridge.py", line 113, in _read_messages await self._process_message() File "/usr/local/lib/python3.13/site-packages/aiocomfoconnect/bridge.py", line 252, in _process_message raise AioComfoConnectNotConnected("The connection was closed.") from exc aiocomfoconnect.exceptions.AioComfoConnectNotConnected: The connection was closed.
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/usr/local/lib/python3.13/site-packages/aiocomfoconnect/bridge.py", line 121, in _read_messages raise AioComfoConnectNotConnected("We have been disconnected") from exc aiocomfoconnect.exceptions.AioComfoConnectNotConnected: We have been disconnected 2024-12-25 21:59:29.958 WARNING (MainThread) [aiocomfoconnect.bridge] Timeout while waiting for response from bridge 2024-12-25 21:59:29.958 ERROR (MainThread) [aiohttp.server] Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.13/asyncio/tasks.py", line 507, in wait_for return await fut ^^^^^^^^^ asyncio.exceptions.CancelledError
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/usr/local/lib/python3.13/site-packages/aiocomfoconnect/bridge.py", line 173, in _send return await asyncio.wait_for(fut, TIMEOUT) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.13/asyncio/tasks.py", line 506, in wait_for async with timeouts.timeout(timeout): ~~~~~~~~~~~~~~~~^^^^^^^^^ File "/usr/local/lib/python3.13/asyncio/timeouts.py", line 116, in aexit raise TimeoutError from exc_val TimeoutError
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/usr/local/lib/python3.13/site-packages/aiohttp/web_protocol.py", line 480, in _handle_request resp = await request_handler(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.13/site-packages/aiohttp/web_app.py", line 569, in _handle return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.13/site-packages/aiohttp/web_middlewares.py", line 117, in impl return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 83, in forwarded_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 86, in ban_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 242, in auth_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 32, in headers_middleware response = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle result = await handler(request, **request.match_info) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 81, in with_admin return await func(self, request, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 222, in post return await super().post(request, flow_id) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 74, in wrapper return await method(view, request, data, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 122, in post result = await self._flow_mgr.async_configure(flow_id, data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 367, in async_configure result = await self._async_configure(flow_id, user_input) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 414, in _async_configure result = await self._async_handle_step( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ flow, cur_step["step_id"], user_input ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 517, in _async_handle_step result: _FlowResultT = await getattr(flow, method)(user_input) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/comfoconnect/config_flow.py", line 64, in async_step_user return await self._register() ^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/comfoconnect/config_flow.py", line 123, in _register await self.bridge.cmd_register_app( ...<3 lines>... ) File "/usr/local/lib/python3.13/site-packages/aiocomfoconnect/bridge.py", line 177, in _send raise AioComfoConnectTimeout("Timeout while waiting for response from bridge") from exc aiocomfoconnect.exceptions.AioComfoConnectTimeout: Timeout while waiting for response from bridge
If i try to add the following to the configuration.yaml:
comfoconnect: host: 192.168.2.113 token: "00000000000000000000000000000002" pin: 4210
sensor:
- platform: comfoconnect resources:
- air_flow_exhaust
- air_flow_supply
- bypass_state
- current_humidity
- current_rmot
- current_temperature
- days_to_replace_filter
- exhaust_fan_duty
- exhaust_fan_speed
- exhaust_humidity
- exhaust_temperature
- outside_humidity
- outside_temperature
- power_total
- power_usage
- preheater_power_total
- preheater_power_usage
- supply_fan_duty
- supply_fan_speed
- supply_humidity
- supply_temperature
I get very similar logs:
2024-12-25 22:11:37.116 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration comfoconnect 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-12-25 22:11:37.117 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-12-25 22:11:39.624 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None) Traceback (most recent call last): File "/usr/local/lib/python3.13/site-packages/aiocomfoconnect/bridge.py", line 218, in _process_message message = await self._read() ^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.13/site-packages/aiocomfoconnect/bridge.py", line 181, in _read msg_len_buf = await self._reader.readexactly(4) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.13/asyncio/streams.py", line 767, in readexactly raise exceptions.IncompleteReadError(incomplete, n) asyncio.exceptions.IncompleteReadError: 0 bytes read on a total of 4 expected bytes
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/usr/local/lib/python3.13/site-packages/aiocomfoconnect/bridge.py", line 113, in _read_messages await self._process_message() File "/usr/local/lib/python3.13/site-packages/aiocomfoconnect/bridge.py", line 252, in _process_message raise AioComfoConnectNotConnected("The connection was closed.") from exc aiocomfoconnect.exceptions.AioComfoConnectNotConnected: The connection was closed.
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/usr/local/lib/python3.13/site-packages/aiocomfoconnect/bridge.py", line 121, in _read_messages raise AioComfoConnectNotConnected("We have been disconnected") from exc aiocomfoconnect.exceptions.AioComfoConnectNotConnected: We have been disconnected 2024-12-25 22:11:44.624 WARNING (MainThread) [aiocomfoconnect.bridge] Timeout while waiting for response from bridge 2024-12-25 22:11:44.624 ERROR (MainThread) [homeassistant.components.sensor] The comfoconnect platform for the sensor integration does not support platform setup. Please remove it from your config.
Note also that I may have misread the instructions to manually configure configuration.yaml file where token should be added as a string, and default should be in quotes. If there are no quotes additional exceptions are thrown when trying to convert to hex.
I have also tried other combinations of pins and tokens, but no success.
The Zehnder app on the phone works perfectly.
Thank you!
Same error.
I think the porblem is the ComfoConnect PRO module is not compatibel!
I have ComfoConnect LAN C interface but am unable to connect.
I have also tried connecting directly using python library aiocomfoconnect on my computer but also failed. bridges = await discover_bridges() responds in one bridge at 192.168.2.113 with UID different to 32 zeros. However await comfoconnect.connect(local_uuid) never returns.
Any ideas or help how to continue? Thank you in advance!