synesthesiam / homeassistant-satellite

Streaming audio satellite for Home Assistant
MIT License
188 stars 23 forks source link

No reconnect when home assistant was rebooted #48

Open stalakerob opened 1 year ago

stalakerob commented 1 year ago

When I reboot home assistant, ha-satellite cannot reconnect to HA after it has rebooted. Its caught in a loop with the following error:

`Oct 22 15:47:26 raspi3b run[747]: ERROR:asyncio:Task exception was never retrieved

Oct 22 15:47:26 raspi3b run[747]: future: <Task finished name='Task-328149' coro=<ClientWebSocketResponse.send_bytes() done, defined at /home/pi/homeassistant-satellite/.venv/lib/python3.9/site-packages/aiohttp/client_ws.py:153> exception=ConnectionResetError('Cannot write to closing transport')> Oct 22 15:47:26 raspi3b run[747]: Traceback (most recent call last): Oct 22 15:47:26 raspi3b run[747]: File "/home/pi/homeassistant-satellite/.venv/lib/python3.9/site-packages/aiohttp/client_ws.py", line 156, in send_bytes Oct 22 15:47:26 raspi3b run[747]: await self._writer.send(data, binary=True, compress=compress) Oct 22 15:47:26 raspi3b run[747]: File "/home/pi/homeassistant-satellite/.venv/lib/python3.9/site-packages/aiohttp/http_websocket.py", line 688, in send Oct 22 15:47:26 raspi3b run[747]: await self._send_frame(message, WSMsgType.BINARY, compress) Oct 22 15:47:26 raspi3b run[747]: File "/home/pi/homeassistant-satellite/.venv/lib/python3.9/site-packages/aiohttp/http_websocket.py", line 601, in _send_frame Oct 22 15:47:26 raspi3b run[747]: raise ConnectionResetError("Cannot write to closing transport") Oct 22 15:47:26 raspi3b run[747]: ConnectionResetError: Cannot write to closing transport `

cburghardt commented 1 year ago

Same as #28

Emile86 commented 1 year ago

Same problem here and also very annoying that speaker keep making sound and i have to reboot rasberry pi with connected speaker to it otherwise it will keep playing sound

stalakerob commented 1 year ago

I had that once too that it played the awake-sound over and over.

and i have to reboot rasberry pi

Does "sudo systemctl restart homeassistant-satellite.service" not fix it?

Emile86 commented 1 year ago

I had that once too that it played the awake-sound over and over.

and i have to reboot rasberry pi

Does "sudo systemctl restart homeassistant-satellite.service" not fix it?

Yes it's also possible but in all cases it requires me to manually interact with the raspberry. And if I'm not at home then is my wife not so happy :)

stu247 commented 1 year ago

I am also seeing this issue. Whenever Home Assistant is restarted, homeassistant-satellite does not reconnect and prints this message continuously, around 100 times a second. The files /var/log/syslog and /var/log/daemon.log become huge and after a number of hours there is no space left on the root file system.

bouton commented 1 year ago

Yep. Happens with me as well.

j3mu5 commented 1 year ago

Yes, this behaviour currently prevents me from testing the reliability of the system.