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

ConnectionResetError: Cannot write to closing transport #156

Open
meremortals70 opened this issue Sep 1, 2022 · 9 comments
Open

ConnectionResetError: Cannot write to closing transport #156

meremortals70 opened this issue Sep 1, 2022 · 9 comments
Assignees

Comments

@meremortals70
Copy link

meremortals70 commented Sep 1, 2022

Describe the bug
System Error in HA Logs after installing 2022.9 beta

This error originated from a custom integration.

Logger: homeassistant
Source: custom_components/bhyve/pybhyve/websocket.py:57
Integration: Orbit B-hyve (documentation)
First occurred: 7:33:36 PM (1 occurrences)
Last logged: 7:33:36 PM

Error doing job: Task exception was never retrieved

Traceback (most recent call last):
  File "/config/custom_components/bhyve/pybhyve/websocket.py", line 57, in _ping
    await self._ws.send_str(json.dumps({"event": "ping"}))
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client_ws.py", line 151, in send_str
    await self._writer.send(data, binary=False, compress=compress)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/http_websocket.py", line 690, in send
    await self._send_frame(message, WSMsgType.TEXT, compress)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/http_websocket.py", line 601, in _send_frame
    raise ConnectionResetError("Cannot write to closing transport")
ConnectionResetError: Cannot write to closing transport

Please let me know if you need more. Can’t download the diagnostics on my iPad.

@sebr sebr changed the title Error in HA Logs System Error in HA Logs after installing 2022.9 beta Sep 2, 2022
@sebr
Copy link
Owner

sebr commented Jan 10, 2023

@meremortals70 sorry that I didn't follow up on this... lost track. Did this get resolved in a later version? I have never seen this issue.

@SeeThisIsMe
Copy link

I have had exactly the same issue for almost a year. Before that it worked fine. Still ongoing now with the latest version of HA and bhyve HACS integration.

I have 4 of the hose timer devices and always get this error with at least one of them every day. What happens is when the scheduled irrigation time comes around it start and then stops immediately with this error. If I then open the bhyve app it shows the watering working fine.

@sebr
Copy link
Owner

sebr commented Feb 12, 2023

Are all the hose timers configured to start irrigating at the same time?

@SeeThisIsMe
Copy link

Nope. The water pressure is a bit low for more than one at a time. So the schedules are in a sequence with 5-6 minutes between when one finishes and the next one starts.

@dinan5
Copy link

dinan5 commented Dec 10, 2023

I have the same exact issue. Thank you.

@sebr sebr changed the title System Error in HA Logs after installing 2022.9 beta Error doing job: Task exception was never retrieved Apr 23, 2024
@sebr sebr changed the title Error doing job: Task exception was never retrieved ConnectionResetError: Cannot write to closing transport Apr 23, 2024
@AnthonyBe
Copy link

AnthonyBe commented May 17, 2024

I'm seeing this only on HA start-up (best I can tell).
I'm currently running HA 2024.5.3 with Orbit integration v3.2.4.
I have 3 x Gen 1 Orbit B-Hyve BT tap timers connected to a B-Hyve WiFi Hub.

2024-05-17 14:39:27.308 WARNING (MainThread) [custom_components.bhyve.pybhyve.websocket] Websocket exception: Cannot write to closing transport
2024-05-17 14:39:27.310 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/config/custom_components/bhyve/pybhyve/websocket.py", line 57, in _ping
    await self._ws.send_str(json.dumps({"event": "ping"}))
  File "/usr/local/lib/python3.12/site-packages/aiohttp/client_ws.py", line 165, in send_str
    await self._writer.send(data, binary=False, compress=compress)
  File "/usr/local/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 729, in send
    await self._send_frame(message, WSMsgType.TEXT, compress)
  File "/usr/local/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 628, in _send_frame
    raise ConnectionResetError("Cannot write to closing transport")
ConnectionResetError: Cannot write to closing transport

Diagnostic file attached.
config_entry-bhyve-5bc4b4819e8722eb2f3b99b8df98a730.json

@dinan5
Copy link

dinan5 commented Jun 21, 2024

Are there any updates on this issue? Thank you.

@AnthonyBe
Copy link

Oddly, I haven't see the error for a while (I'm now on HA 2024.6.4)

@dinan5
Copy link

dinan5 commented Jun 22, 2024

I'm still having the issue. I have three HA instances that all connect to 2 Orbit controllers. I'm wondering if its too much traffic. I'm experimenting by disabling some of the instances.

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

5 participants