snowzach / doods

DOODS - Dedicated Open Object Detection Service
MIT License
303 stars 31 forks source link

Doos as HA repository #53

Closed mmatesic01 closed 2 years ago

mmatesic01 commented 3 years ago

I have managed to install DOODS through Home Assistant Add-on store repository https://github.com/snowzach/hassio-addons My HA runs on VirtualBox on intel NUC i5 , is has enough PC resources to run good and it runs good.

I am also using Doods with Coral USB accelerator. And works fine, most of the time.. This is my configuration: server: port: '8080' auth_key: '' doods.detectors:

Section from the log: 2021-01-18T10:24:39.495Z INFO tflite/detector.go:399 Detection Complete {"package": "detector.tflite", "name": "default", "id": "", "duration": 0.073187448, "detections": 20, "device": {"Type":1,"Path":"/sys/bus/usb/devices/2-1"}} 2021-01-18T10:24:39.496Z INFO server/server.go:139 HTTP Request {"status": 200, "took": 0.084034516, "request": "/detect", "method": "POST", "package": "server.request", "request-id": "d5f40609-doods/M2Bq3DJE8O-000152", "remote": "192.168.XX.XX:44530"}

But through the day I am getting these errors, and I do not know hot to minimize them as much as possible:

2021-01-17 20:15:43 WARNING (MainThread) [homeassistant.helpers.entity] Update of image_processing.doods_terasa is taking over 10 seconds 2021-01-17 20:15:45 WARNING (MainThread) [homeassistant.components.image_processing] Updating doods image_processing took longer than the scheduled update interval 0:00:03 2021-01-17 20:15:48 WARNING (MainThread) [homeassistant.components.image_processing] Updating doods image_processing took longer than the scheduled update interval 0:00:03 2021-01-17 20:15:51 WARNING (MainThread) [homeassistant.components.image_processing] Updating doods image_processing took longer than the scheduled update interval 0:00:03 2021-01-17 20:15:54 WARNING (MainThread) [homeassistant.components.image_processing] Updating doods image_processing took longer than the scheduled update interval 0:00:03 2021-01-17 20:15:57 WARNING (MainThread) [homeassistant.components.image_processing] Updating doods image_processing took longer than the scheduled update interval 0:00:03 2021-01-17 20:16:00 WARNING (MainThread) [homeassistant.components.image_processing] Updating doods image_processing took longer than the scheduled update interval 0:00:03 2021-01-17 20:16:03 WARNING (MainThread) [homeassistant.components.image_processing] Updating doods image_processing took longer than the scheduled update interval 0:00:03 2021-01-17 20:16:04 ERROR (MainThread) [homeassistant.helpers.entity] Update for image_processing.doods_terasa fails Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 699, in urlopen httplib_response = self._make_request( File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 445, in _make_request six.raise_from(e, None) File "", line 3, in raise_from File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 440, in _make_request httplib_response = conn.getresponse() File "/usr/local/lib/python3.8/http/client.py", line 1347, in getresponse response.begin() File "/usr/local/lib/python3.8/http/client.py", line 307, in begin version, status, reason = self._read_status() File "/usr/local/lib/python3.8/http/client.py", line 276, in _read_status raise RemoteDisconnected("Remote end closed connection without" http.client.RemoteDisconnected: Remote end closed connection without response During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 439, in send resp = conn.urlopen( File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 755, in urlopen retries = retries.increment( File "/usr/local/lib/python3.8/site-packages/urllib3/util/retry.py", line 531, in increment raise six.reraise(type(error), error, _stacktrace) File "/usr/local/lib/python3.8/site-packages/urllib3/packages/six.py", line 734, in reraise raise value.with_traceback(tb) File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 699, in urlopen httplib_response = self._make_request( File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 445, in _make_request six.raise_from(e, None) File "", line 3, in raise_from File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 440, in _make_request httplib_response = conn.getresponse() File "/usr/local/lib/python3.8/http/client.py", line 1347, in getresponse response.begin() File "/usr/local/lib/python3.8/http/client.py", line 307, in begin version, status, reason = self._read_status() File "/usr/local/lib/python3.8/http/client.py", line 276, in _read_status raise RemoteDisconnected("Remote end closed connection without" urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 482, in async_device_update await task File "/usr/src/homeassistant/homeassistant/components/image_processing/init.py", line 132, in async_update await self.async_process_image(image.content) File "/usr/src/homeassistant/homeassistant/components/image_processing/init.py", line 112, in async_process_image return await self.hass.async_add_executor_job(self.process_image, image) File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, self.kwargs) File "/usr/src/homeassistant/homeassistant/components/doods/image_processing.py", line 299, in process_image response = self._doods.detect( File "/usr/local/lib/python3.8/site-packages/pydoods/init.py", line 29, in detect response = requests.post( File "/usr/local/lib/python3.8/site-packages/requests/api.py", line 119, in post return request('post', url, data=data, json=json, kwargs) File "/usr/local/lib/python3.8/site-packages/requests/api.py", line 61, in request return session.request(method=method, url=url, kwargs) File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 542, in request resp = self.send(prep, send_kwargs) File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 655, in send r = adapter.send(request, **kwargs) File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 498, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

snowzach commented 3 years ago

If the DOODS log is saying detection complete and the hass side is showing connection timeout then I would almost guess that you have some sort of networking issue going on there.