tydom2mqtt icon indicating copy to clipboard operation
tydom2mqtt copied to clipboard

Addon should auto restart

Open MaisonGF opened this issue 1 year ago • 1 comments
trafficstars

I got those errors last night after a brief electricity shortage :

websockets.exceptions.ConnectionClosedOK: sent 1000 (OK); then received 1000 (OK)
2024-11-16 23:54:17,127 - asyncio              - ERROR   - Future exception was never retrieved
future: <Future finished exception=ConnectionClosedOK(Close(code=1000, reason=''), Close(code=<CloseCode.NORMAL_CLOSURE: 1000>, reason=''), False)>
websockets.exceptions.ConnectionClosedOK: sent 1000 (OK); then received 1000 (OK)
2024-11-16 23:54:17,127 - asyncio              - ERROR   - Future exception was never retrieved
future: <Future finished exception=ConnectionClosedOK(Close(code=1000, reason=''), Close(code=<CloseCode.NORMAL_CLOSURE: 1000>, reason=''), False)>
websockets.exceptions.ConnectionClosedOK: sent 1000 (OK); then received 1000 (OK)
2024-11-16 23:54:17,145 - asyncio              - ERROR   - Future exception was never retrieved
future: <Future finished exception=ConnectionClosedOK(Close(code=1000, reason=''), Close(code=<CloseCode.NORMAL_CLOSURE: 1000>, reason=''), False)>
websockets.exceptions.ConnectionClosedOK: sent 1000 (OK); then received 1000 (OK)
2024-11-16 23:54:18,280 - Starting tydom2mqtt
2024-11-16 23:54:18,281 - Hassio environment detected: loading configuration from /data/options.json
2024-11-16 23:54:18,281 - Validating configuration ({

2024-11-16 23:54:18,280 - Starting tydom2mqtt - I restarted manually and no issue after that.

The add-on should crash on error to allow HA to reboot it, or reboot itself, otherwise it's not solid. On the original mrwiwi version the add-on rebooted itself (forever.py rebooted the main script after a crash), IMHO it was a lot more resilient (but it's not working anymore)

Could you please allow the add-on to reboot itself after 2 errors for example ?

Thanks in advance and for the good work !

MaisonGF avatar Nov 17 '24 09:11 MaisonGF