Closed ttcole1254 closed 3 years ago
Same here. Since the move to python, I have started getting WARNING asyncio socket.send() raised exception in the log. Would it be possible to fix this? Would also be great to implement some kind of a health check.
my doorbell lose connection after one hour this is the output in the addon of home assistant:
Traceback (most recent call last): File "/usr/lib/python3.8/asyncio/selector_events.py", line 860, in _read_ready__data_received self._protocol.data_received(data) File "/app/DahuaVTO.py", line 119, in data_received message_id = message.get("id") AttributeError: 'NoneType' object has no attribute 'get' 2021-01-07 19:55:08,769 ERROR main server closed the connection 2021-01-07 19:56:03,619 INFO main Keep alive 2021-01-07 19:56:58,619 INFO main Keep alive 2021-01-07 19:57:53,620 INFO main Keep alive 2021-01-07 19:58:48,621 INFO main Keep alive 2021-01-07 19:59:43,621 INFO main Keep alive 2021-01-07 19:59:43,622 WARNING asyncio socket.send() raised exception. 2021-01-07 20:00:38,622 INFO main Keep alive 2021-01-07 20:00:38,623 WARNING asyncio socket.send() raised exception. 2021-01-07 20:01:33,623 INFO main Keep alive 2021-01-07 20:01:33,623 WARNING asyncio socket.send() raised exception.
I have found a hackish way to get this accomplished. as i am having the same issue. I submitted a PR to hopefully get it working.
thanks, having the same issue here
you can see the doorbell reboots (don't know why), after that it's only giving this error and doesn't recover. Thanks a lot for that PR @Spartan-II-117, looking forward to it!
I will check it over the weekend
@elad-bar the problem isn't solved with your update. I'm still receiving 'WARNING asyncio socket.send() raised exception.' with version 1.0.12. this is after the mandatory mainentance restart of the VTO.
Maybe consider crashing the service if it cannot recover on its own - this would enable my homeassistant plugin to restart.
I'm not sure if this can be fixed, but currently when power is cut to the doorbell or it reboots, the script will read "ERROR main server closed the connection" and "WARNING asyncio socket.send() raised exception." It will keep repeating the second warning until the docker container is reset, even if the doorbell comes back online. This causes the code to fail weekly when the doorbell does its reboot. Is there a way to have this fail gracefully, and re-attempt the connection? Otherwise everything works perfectly, great job with this!