Open TonKro opened 1 year ago
Since the last update somehow my HA does crash now and then pointing to jablotron 100:
2023-05-12 10:48:57.062 ERROR (ThreadPoolExecutor-2_1) [custom_components.jablotron100] Write error: Event loop is closed 2023-05-12 10:48:57.066 ERROR (stream_worker) [root] Uncaught thread exception Traceback (most recent call last): File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/local/lib/python3.10/threading.py", line 953, in run self._target(*self._args, self._kwargs) File "/usr/src/homeassistant/homeassistant/components/stream/init.py", line 424, in _run_worker stream_worker( File "/usr/src/homeassistant/homeassistant/components/stream/worker.py", line 624, in stream_worker muxer.mux_packet(packet) File "/usr/src/homeassistant/homeassistant/components/stream/worker.py", line 265, in mux_packet self.check_flush_part(packet) File "/usr/src/homeassistant/homeassistant/components/stream/worker.py", line 304, in check_flush_part self.flush(packet, last_part=False) File "/usr/src/homeassistant/homeassistant/components/stream/worker.py", line 353, in flush self._hass.loop.call_soon_threadsafe( File "/usr/local/lib/python3.10/asyncio/base_events.py", line 798, in call_soon_threadsafe self._check_closed() File "/usr/local/lib/python3.10/asyncio/base_events.py", line 515, in _check_closed raise RuntimeError('Event loop is closed') RuntimeError: Event loop is closed 2023-05-12 10:48:57.570 ERROR (ThreadPoolExecutor-2_1) [custom_components.jablotron100] Write error: Event loop is closed 2023-05-12 10:48:59.458 ERROR (ThreadPoolExecutor-2_1) [custom_components.jablotron100] Write error: Event loop is closed 2023-05-12 10:49:00.514 ERROR (Thread-2 (alert_stream)) [root] Uncaught thread exception Traceback (most recent call last): File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/local/lib/python3.10/threading.py", line 953, in run self._target(*self._args, *self._kwargs) File "/usr/local/lib/python3.10/site-packages/pyhik/hikvision.py", line 537, in alert_stream self.process_stream(tree) File "/usr/local/lib/python3.10/site-packages/pyhik/hikvision.py", line 629, in process_stream self.publish_changes(etype, echid) File "/usr/local/lib/python3.10/site-packages/pyhik/hikvision.py", line 660, in publish_changes self._do_update_callback('{}.{}.{}'.format(self.cam_id, etype, echid)) File "/usr/local/lib/python3.10/site-packages/pyhik/hikvision.py", line 233, in _do_update_callback callback(msg) File "/usr/src/homeassistant/homeassistant/components/hikvision/binary_sensor.py", line 287, in _update_callback self._timer = track_point_in_utc_time( File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 129, in factory async_remove = run_callbackthreadsafe( File "/usr/src/homeassistant/homeassistant/util/async.py", line 46, in run_callback_threadsafe loop.call_soon_threadsafe(run_callback) File "/usr/local/lib/python3.10/asyncio/base_events.py", line 798, in call_soon_threadsafe self._check_closed() File "/usr/local/lib/python3.10/asyncio/base_events.py", line 515, in _check_closed raise RuntimeError('Event loop is closed') RuntimeError: Event loop is closed 2023-05-12 10:49:01.972 ERROR (ThreadPoolExecutor-2_1) [custom_components.jablotron100] Write error: Event loop is closed 2023-05-12 10:49:02.477 ERROR (ThreadPoolExecutor-2_1) [custom_components.jablotron100] Write error: Event loop is closed 2023-05-12 10:49:02.533 ERROR (Thread-3 (_thread_main)) [paho.mqtt.client] Caught exception in on_message: Event loop is closed 2023-05-12 10:49:02.585 ERROR (Thread-3 (_thread_main)) [root] Uncaught thread exception Traceback (most recent call last): File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/local/lib/python3.10/threading.py", line 953, in run self._target(self._args, self._kwargs) File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3591, in _thread_main self.loop_forever(retry_first_connection=True) File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 1756, in loop_forever rc = self._loop(timeout) File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 1164, in _loop rc = self.loop_read() File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 1556, in loop_read rc = self._packet_read() File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 2439, in _packet_read rc = self._packet_handle() File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3033, in _packet_handle return self._handle_publish() File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3327, in _handle_publish self._handle_on_message(message) File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3570, in _handle_on_message on_message(self, self._userdata, message) File "/usr/src/homeassistant/homeassistant/components/mqtt/client.py", line 768, in _mqtt_on_message self.hass.add_job(self._mqtt_handle_message, msg) File "/usr/src/homeassistant/homeassistant/core.py", line 417, in add_job self.loop.call_soon_threadsafe(self.async_add_job, target, *args) File "/usr/local/lib/python3.10/asyncio/base_events.py", line 798, in call_soon_threadsafe self._check_closed() File "/usr/local/lib/python3.10/asyncio/base_events.py", line 515, in _check_closed raise RuntimeError('Event loop is closed') RuntimeError: Event loop is closed 2023-05-12 10:49:02.982 ERROR (ThreadPoolExecutor-2_1) [custom_components.jablotron100] Write error: Event loop is closed 2023-05-12 10:49:03.488 ERROR (ThreadPoolExecutor-2_1) [custom_components.jablotron100] Write error: Event loop is closed 2023-05-12 10:49:03.995 ERROR (ThreadPoolExecutor-2_1) [custom_components.jablotron100] Write error: Event loop is closed 2023-05-12 10:49:04.239 ERROR (ThreadPoolExecutor-2_0) [custom_components.jablotron100] Read error: Event loop is closed
Any update? I do have this issue regularly, like every some days.
Since the last update somehow my HA does crash now and then pointing to jablotron 100:
2023-05-12 10:48:57.062 ERROR (ThreadPoolExecutor-2_1) [custom_components.jablotron100] Write error: Event loop is closed 2023-05-12 10:48:57.066 ERROR (stream_worker) [root] Uncaught thread exception Traceback (most recent call last): File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/local/lib/python3.10/threading.py", line 953, in run self._target(*self._args, self._kwargs) File "/usr/src/homeassistant/homeassistant/components/stream/init.py", line 424, in _run_worker stream_worker( File "/usr/src/homeassistant/homeassistant/components/stream/worker.py", line 624, in stream_worker muxer.mux_packet(packet) File "/usr/src/homeassistant/homeassistant/components/stream/worker.py", line 265, in mux_packet self.check_flush_part(packet) File "/usr/src/homeassistant/homeassistant/components/stream/worker.py", line 304, in check_flush_part self.flush(packet, last_part=False) File "/usr/src/homeassistant/homeassistant/components/stream/worker.py", line 353, in flush self._hass.loop.call_soon_threadsafe( File "/usr/local/lib/python3.10/asyncio/base_events.py", line 798, in call_soon_threadsafe self._check_closed() File "/usr/local/lib/python3.10/asyncio/base_events.py", line 515, in _check_closed raise RuntimeError('Event loop is closed') RuntimeError: Event loop is closed 2023-05-12 10:48:57.570 ERROR (ThreadPoolExecutor-2_1) [custom_components.jablotron100] Write error: Event loop is closed 2023-05-12 10:48:59.458 ERROR (ThreadPoolExecutor-2_1) [custom_components.jablotron100] Write error: Event loop is closed 2023-05-12 10:49:00.514 ERROR (Thread-2 (alert_stream)) [root] Uncaught thread exception Traceback (most recent call last): File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/local/lib/python3.10/threading.py", line 953, in run self._target(*self._args, *self._kwargs) File "/usr/local/lib/python3.10/site-packages/pyhik/hikvision.py", line 537, in alert_stream self.process_stream(tree) File "/usr/local/lib/python3.10/site-packages/pyhik/hikvision.py", line 629, in process_stream self.publish_changes(etype, echid) File "/usr/local/lib/python3.10/site-packages/pyhik/hikvision.py", line 660, in publish_changes self._do_update_callback('{}.{}.{}'.format(self.cam_id, etype, echid)) File "/usr/local/lib/python3.10/site-packages/pyhik/hikvision.py", line 233, in _do_update_callback callback(msg) File "/usr/src/homeassistant/homeassistant/components/hikvision/binary_sensor.py", line 287, in _update_callback self._timer = track_point_in_utc_time( File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 129, in factory async_remove = run_callbackthreadsafe( File "/usr/src/homeassistant/homeassistant/util/async.py", line 46, in run_callback_threadsafe loop.call_soon_threadsafe(run_callback) File "/usr/local/lib/python3.10/asyncio/base_events.py", line 798, in call_soon_threadsafe self._check_closed() File "/usr/local/lib/python3.10/asyncio/base_events.py", line 515, in _check_closed raise RuntimeError('Event loop is closed') RuntimeError: Event loop is closed 2023-05-12 10:49:01.972 ERROR (ThreadPoolExecutor-2_1) [custom_components.jablotron100] Write error: Event loop is closed 2023-05-12 10:49:02.477 ERROR (ThreadPoolExecutor-2_1) [custom_components.jablotron100] Write error: Event loop is closed 2023-05-12 10:49:02.533 ERROR (Thread-3 (_thread_main)) [paho.mqtt.client] Caught exception in on_message: Event loop is closed 2023-05-12 10:49:02.585 ERROR (Thread-3 (_thread_main)) [root] Uncaught thread exception Traceback (most recent call last): File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/local/lib/python3.10/threading.py", line 953, in run self._target(self._args, self._kwargs) File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3591, in _thread_main self.loop_forever(retry_first_connection=True) File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 1756, in loop_forever rc = self._loop(timeout) File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 1164, in _loop rc = self.loop_read() File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 1556, in loop_read rc = self._packet_read() File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 2439, in _packet_read rc = self._packet_handle() File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3033, in _packet_handle return self._handle_publish() File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3327, in _handle_publish self._handle_on_message(message) File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3570, in _handle_on_message on_message(self, self._userdata, message) File "/usr/src/homeassistant/homeassistant/components/mqtt/client.py", line 768, in _mqtt_on_message self.hass.add_job(self._mqtt_handle_message, msg) File "/usr/src/homeassistant/homeassistant/core.py", line 417, in add_job self.loop.call_soon_threadsafe(self.async_add_job, target, *args) File "/usr/local/lib/python3.10/asyncio/base_events.py", line 798, in call_soon_threadsafe self._check_closed() File "/usr/local/lib/python3.10/asyncio/base_events.py", line 515, in _check_closed raise RuntimeError('Event loop is closed') RuntimeError: Event loop is closed 2023-05-12 10:49:02.982 ERROR (ThreadPoolExecutor-2_1) [custom_components.jablotron100] Write error: Event loop is closed 2023-05-12 10:49:03.488 ERROR (ThreadPoolExecutor-2_1) [custom_components.jablotron100] Write error: Event loop is closed 2023-05-12 10:49:03.995 ERROR (ThreadPoolExecutor-2_1) [custom_components.jablotron100] Write error: Event loop is closed 2023-05-12 10:49:04.239 ERROR (ThreadPoolExecutor-2_0) [custom_components.jablotron100] Read error: Event loop is closed