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

ComfoConnect disconnecting. #13

Closed
tnagels opened this issue Apr 26, 2023 · 6 comments
Closed

ComfoConnect disconnecting. #13

tnagels opened this issue Apr 26, 2023 · 6 comments

Comments

@tnagels
Copy link

tnagels commented Apr 26, 2023

Since a few days the integration keeps disconnecting from my Comfocontrol. When I try to set the fan speed, I get an error. Setting the speed with the official app works. After restarting the integration, the comfocontrol is connected again.

EDIT: the problems seem to be intermittent. After a few tries I does work again. About 1/3 of the attempts are succesful.

There is a related error in the log:

Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/comfoconnect/fan.py:156
Integration: Home Assistant WebSocket API ([documentation](https://www.home-assistant.io/integrations/websocket_api), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+websocket_api%22))
First occurred: 25 april 2023 om 23:33:48 (4 occurrences)
Last logged: 11:44:23

[140536807260608]
[140536740357184]
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 199, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1820, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1857, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 216, in handle_service
    await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 798, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 977, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 838, in _handle_entity_call
    await result
  File "/config/custom_components/comfoconnect/fan.py", line 156, in async_set_percentage
    await self._ccb.set_speed(speed)
  File "/usr/local/lib/python3.10/site-packages/aiocomfoconnect/comfoconnect.py", line 210, in set_speed
    await self.cmd_rmi_request(bytes([0x84, UNIT_SCHEDULE, SUBUNIT_01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03]))
  File "/usr/local/lib/python3.10/site-packages/aiocomfoconnect/bridge.py", line 320, in cmd_rmi_request
    return self._send(
  File "/usr/local/lib/python3.10/site-packages/aiocomfoconnect/bridge.py", line 123, in _send
    raise AioComfoConnectNotConnected()
aiocomfoconnect.exceptions.AioComfoConnectNotConnected
@tnagels
Copy link
Author

tnagels commented May 15, 2023

UPDATE:

As I could not resolve the issue, I rolled back to the official integration. That integration keeps working. So there seems to be an issue specifically with how this HACS integration handles login and (I assume) token expiry.

@michaelarnauts
Copy link
Owner

I'm sorry. I've already improved the code in the library and this integration, but didn't came to making a release for this.

@tnagels
Copy link
Author

tnagels commented May 15, 2023

No worries, thanks for the work. Just wanted to help to track down the issue in case you had not found it yet. I'm just grateful people like you are putting in the work to build these great integrations so I would not want to complain if something was not working as expected.

@tnagels
Copy link
Author

tnagels commented May 30, 2023

Has this issue been resolved in a new release? I would like to re-install this component, but only if the issue has been solved. Thanks.

@michaelarnauts
Copy link
Owner

I just merged a merge request that should improve the reconnection logic a lot. I think this should fix your issue.

@michaelarnauts
Copy link
Owner

Closing since I want to migrate all these issues in one issue. See #43 for a possible solution and follow-up.

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