sebr / bhyve-home-assistant

Orbit BHyve custom component for Home Assistant
MIT License
260 stars 42 forks source link

Error doing job: Task exception was never retrieved (None) / Websocket exception: Cannot write to closing transport #251

Open dinan5 opened 4 months ago

dinan5 commented 4 months ago

Describe the bug I get these two error messages on numerous occasions during the day - Error doing job: Task exception was never retrieved (None) / Websocket exception: Cannot write to closing transport

Expected behaviour I expect to not experience these errors.

BHyve devices Obit Sprinkler Controller - WT25E-0001 by Orbit BHyve Firmware: 0096 Hardware: WT25E-0001

Obit Smart Hose Tap Timer - HT25-0000 by Orbit BHyve Firmware: 0041 Hardware: HT25-0000

Device Diagnostics 2024-07-02 09:48:21.790 DEBUG (MainThread) [custom_components.bhyve.pybhyve.websocket] msg received WSMessage(type=<WSMsgType.CLOSE: 8>, data=0, extra='') 2024-07-02 09:48:21.790 DEBUG (MainThread) [custom_components.bhyve.pybhyve.websocket] Websocket received CLOSE message, ignoring 2024-07-02 09:48:21.790 INFO (MainThread) [custom_components.bhyve.pybhyve.websocket] Websocket closed? True 2024-07-02 09:48:21.790 WARNING (MainThread) [custom_components.bhyve.pybhyve.websocket] Websocket exception: Cannot write to closing transport 2024-07-02 09:48:21.796 INFO (MainThread) [custom_components.bhyve.pybhyve.websocket] Reconnecting websocket; state: stopped 2024-07-02 09:48:21.796 INFO (MainThread) [custom_components.bhyve.pybhyve.websocket] Reconnecting to Orbit in 5; state: stopped 2024-07-02 09:48:21.799 DEBUG (MainThread) [custom_components.bhyve.pybhyve.websocket] msg received WSMessage(type=<WSMsgType.CLOSE: 8>, data=0, extra='') 2024-07-02 09:48:21.799 DEBUG (MainThread) [custom_components.bhyve.pybhyve.websocket] Websocket received CLOSE message, ignoring 2024-07-02 09:48:21.799 INFO (MainThread) [custom_components.bhyve.pybhyve.websocket] Websocket closed? True 2024-07-02 09:48:21.799 WARNING (MainThread) [custom_components.bhyve.pybhyve.websocket] Websocket exception: Cannot write to closing transport 2024-07-02 09:48:21.804 INFO (MainThread) [custom_components.bhyve.pybhyve.websocket] Reconnecting websocket; state: stopped 2024-07-02 09:48:21.804 INFO (MainThread) [custom_components.bhyve.pybhyve.websocket] Reconnecting to Orbit in 5; state: stopped 2024-07-02 09:48:21.805 DEBUG (MainThread) [custom_components.bhyve.pybhyve.websocket] msg received WSMessage(type=<WSMsgType.CLOSE: 8>, data=0, extra='') 2024-07-02 09:48:21.805 DEBUG (MainThread) [custom_components.bhyve.pybhyve.websocket] Websocket received CLOSE message, ignoring 2024-07-02 09:48:21.805 INFO (MainThread) [custom_components.bhyve.pybhyve.websocket] Websocket closed? True 2024-07-02 09:48:21.805 WARNING (MainThread) [custom_components.bhyve.pybhyve.websocket] Websocket exception: Cannot write to closing transport 2024-07-02 09:48:21.807 INFO (MainThread) [custom_components.bhyve.pybhyve.websocket] Reconnecting websocket; state: stopped 2024-07-02 09:48:21.807 INFO (MainThread) [custom_components.bhyve.pybhyve.websocket] Reconnecting to Orbit in 5; state: stopped 2024-07-02 09:48:21.810 DEBUG (MainThread) [custom_components.bhyve.pybhyve.websocket] msg received WSMessage(type=<WSMsgType.CLOSE: 8>, data=0, extra='') 2024-07-02 09:48:21.810 DEBUG (MainThread) [custom_components.bhyve.pybhyve.websocket] Websocket received CLOSE message, ignoring 2024-07-02 09:48:21.810 INFO (MainThread) [custom_components.bhyve.pybhyve.websocket] Websocket closed? True 2024-07-02 09:48:21.810 WARNING (MainThread) [custom_components.bhyve.pybhyve.websocket] Websocket exception: Cannot write to closing transport 2024-07-02 09:48:21.814 INFO (MainThread) [custom_components.bhyve.pybhyve.websocket] Reconnecting websocket; state: stopped 2024-07-02 09:48:21.814 INFO (MainThread) [custom_components.bhyve.pybhyve.websocket] Reconnecting to Orbit in 5; state: stopped 2024-07-02 09:48:21.816 DEBUG (MainThread) [custom_components.bhyve.pybhyve.websocket] msg received WSMessage(type=<WSMsgType.CLOSE: 8>, data=0, extra='') 2024-07-02 09:48:21.816 DEBUG (MainThread) [custom_components.bhyve.pybhyve.websocket] Websocket received CLOSE message, ignoring 2024-07-02 09:48:21.816 INFO (MainThread) [custom_components.bhyve.pybhyve.websocket] Websocket closed? True 2024-07-02 09:48:21.816 WARNING (MainThread) [custom_components.bhyve.pybhyve.websocket] Websocket exception: Cannot write to closing transport 2024-07-02 09:48:21.817 INFO (MainThread) [custom_components.bhyve.pybhyve.websocket] Reconnecting websocket; state: stopped 2024-07-02 09:48:21.817 INFO (MainThread) [custom_components.bhyve.pybhyve.websocket] Reconnecting to Orbit in 5; state: stopped 2024-07-02 09:48:21.825 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None) 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 2024-07-02 09:48:21.834 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None) 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 2024-07-02 09:48:21.842 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None) 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 2024-07-02 09:48:21.845 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None) 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 2024-07-02 09:48:21.850 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None) 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 2024-07-02 09:48:27.172 INFO (MainThread) [custom_components.bhyve.pybhyve.websocket] Authenticating websocket 2024-07-02 09:48:27.174 INFO (MainThread) [custom_components.bhyve.pybhyve.websocket] Websocket connected 2024-07-02 09:48:27.179 INFO (MainThread) [custom_components.bhyve.pybhyve.websocket] Authenticating websocket 2024-07-02 09:48:27.180 INFO (MainThread) [custom_components.bhyve.pybhyve.websocket] Websocket connected 2024-07-02 09:48:27.185 INFO (MainThread) [custom_components.bhyve.pybhyve.websocket] Authenticating websocket 2024-07-02 09:48:27.187 INFO (MainThread) [custom_components.bhyve.pybhyve.websocket] Websocket connected 2024-07-02 09:48:27.200 INFO (MainThread) [custom_components.bhyve.pybhyve.websocket] Authenticating websocket 2024-07-02 09:48:27.202 INFO (MainThread) [custom_components.bhyve.pybhyve.websocket] Websocket connected 2024-07-02 09:48:27.206 INFO (MainThread) [custom_components.bhyve.pybhyve.websocket] Authenticating websocket 2024-07-02 09:48:27.208 INFO (MainThread) [custom_components.bhyve.pybhyve.websocket] Websocket connected 2024-07-02 09:49:24.668 DEBUG (MainThread) [custom_components.bhyve.pybhyve.websocket] msg received WSMessage(type=<WSMsgType.CLOSE: 8>, data=0, extra='') 2024-07-02 09:49:24.668 DEBUG (MainThread) [custom_components.bhyve.pybhyve.websocket] Websocket received CLOSE message, ignoring 2024-07-02 09:49:24.668 INFO (MainThread) [custom_components.bhyve.pybhyve.websocket] Websocket closed? True 2024-07-02 09:49:24.668 WARNING (MainThread) [custom_components.bhyve.pybhyve.websocket] Websocket exception: Cannot write to closing transport 2024-07-02 09:49:24.668 INFO (MainThread) [custom_components.bhyve.pybhyve.websocket] Reconnecting websocket; state: stopped 2024-07-02 09:49:24.668 INFO (MainThread) [custom_components.bhyve.pybhyve.websocket] Reconnecting to Orbit in 5; state: stopped 2024-07-02 09:49:24.669 DEBUG (MainThread) [custom_components.bhyve.pybhyve.websocket] msg received WSMessage(type=<WSMsgType.CLOSE: 8>, data=0, extra='') 2024-07-02 09:49:24.669 DEBUG (MainThread) [custom_components.bhyve.pybhyve.websocket] Websocket received CLOSE message, ignoring 2024-07-02 09:49:24.669 INFO (MainThread) [custom_components.bhyve.pybhyve.websocket] Websocket closed? True 2024-07-02 09:49:24.669 WARNING (MainThread) [custom_components.bhyve.pybhyve.websocket] Websocket exception: Cannot write to closing transport 2024-07-02 09:49:24.676 INFO (MainThread) [custom_components.bhyve.pybhyve.websocket] Reconnecting websocket; state: stopped 2024-07-02 09:49:24.677 INFO (MainThread) [custom_components.bhyve.pybhyve.websocket] Reconnecting to Orbit in 5; state: stopped 2024-07-02 09:49:24.677 DEBUG (MainThread) [custom_components.bhyve.pybhyve.websocket] msg received WSMessage(type=<WSMsgType.CLOSE: 8>, data=0, extra='') 2024-07-02 09:49:24.677 DEBUG (MainThread) [custom_components.bhyve.pybhyve.websocket] Websocket received CLOSE message, ignoring 2024-07-02 09:49:24.677 INFO (MainThread) [custom_components.bhyve.pybhyve.websocket] Websocket closed? True 2024-07-02 09:49:24.678 WARNING (MainThread) [custom_components.bhyve.pybhyve.websocket] Websocket exception: Cannot write to closing transport 2024-07-02 09:49:24.678 INFO (MainThread) [custom_components.bhyve.pybhyve.websocket] Reconnecting websocket; state: stopped 2024-07-02 09:49:24.678 INFO (MainThread) [custom_components.bhyve.pybhyve.websocket] Reconnecting to Orbit in 5; state: stopped 2024-07-02 09:49:24.686 DEBUG (MainThread) [custom_components.bhyve.pybhyve.websocket] msg received WSMessage(type=<WSMsgType.CLOSE: 8>, data=0, extra='') 2024-07-02 09:49:24.686 DEBUG (MainThread) [custom_components.bhyve.pybhyve.websocket] Websocket received CLOSE message, ignoring 2024-07-02 09:49:24.686 INFO (MainThread) [custom_components.bhyve.pybhyve.websocket] Websocket closed? True 2024-07-02 09:49:24.686 WARNING (MainThread) [custom_components.bhyve.pybhyve.websocket] Websocket exception: Cannot write to closing transport 2024-07-02 09:49:24.687 INFO (MainThread) [custom_components.bhyve.pybhyve.websocket] Reconnecting websocket; state: stopped 2024-07-02 09:49:24.687 INFO (MainThread) [custom_components.bhyve.pybhyve.websocket] Reconnecting to Orbit in 5; state: stopped 2024-07-02 09:49:24.689 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None) 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 2024-07-02 09:49:24.692 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None) 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 2024-07-02 09:49:24.701 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None) 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 2024-07-02 09:49:24.703 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None) 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 2024-07-02 09:49:30.025 INFO (MainThread) [custom_components.bhyve.pybhyve.websocket] Authenticating websocket 2024-07-02 09:49:30.027 INFO (MainThread) [custom_components.bhyve.pybhyve.websocket] Websocket connected 2024-07-02 09:49:30.032 INFO (MainThread) [custom_components.bhyve.pybhyve.websocket] Authenticating websocket 2024-07-02 09:49:30.033 INFO (MainThread) [custom_components.bhyve.pybhyve.websocket] Websocket connected 2024-07-02 09:49:30.045 INFO (MainThread) [custom_components.bhyve.pybhyve.websocket] Authenticating websocket 2024-07-02 09:49:30.046 INFO (MainThread) [custom_components.bhyve.pybhyve.websocket] Websocket connected 2024-07-02 09:49:30.048 INFO (MainThread) [custom_components.bhyve.pybhyve.websocket] Authenticating websocket 2024-07-02 09:49:30.050 INFO (MainThread) [custom_components.bhyve.pybhyve.websocket] Websocket connected 2024-07-02 09:49:58.069 DEBUG (MainThread) [custom_components.bhyve.sensor] 15JS Smart Hose Tap Timer battery: {'percent': 93, 'charging': False, 'low_battery_at': '2023-10-26T05:33:25.000Z'} 2024-07-02 09:52:38.330 DEBUG (MainThread) [custom_components.bhyve.pybhyve.websocket] msg received WSMessage(type=<WSMsgType.CLOSE: 8>, data=0, extra='') 2024-07-02 09:52:38.331 DEBUG (MainThread) [custom_components.bhyve.pybhyve.websocket] Websocket received CLOSE message, ignoring 2024-07-02 09:52:38.331 INFO (MainThread) [custom_components.bhyve.pybhyve.websocket] Websocket closed? True 2024-07-02 09:52:38.331 WARNING (MainThread) [custom_components.bhyve.pybhyve.websocket] Websocket exception: Cannot write to closing transport 2024-07-02 09:52:38.331 INFO (MainThread) [custom_components.bhyve.pybhyve.websocket] Reconnecting websocket; state: stopped 2024-07-02 09:52:38.331 INFO (MainThread) [custom_components.bhyve.pybhyve.websocket] Reconnecting to Orbit in 5; state: stopped 2024-07-02 09:52:38.337 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None) 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 2024-07-02 09:52:43.703 INFO (MainThread) [custom_components.bhyve.pybhyve.websocket] Authenticating websocket 2024-07-02 09:52:43.704 INFO (MainThread) [custom_components.bhyve.pybhyve.websocket] Websocket connected

-->