robmarkcole / HASS-Deepstack-object

Home Assistant custom component for using Deepstack object detection
https://community.home-assistant.io/t/face-and-person-detection-with-deepstack-local-and-free/92041
MIT License
434 stars 97 forks source link

Feature request: Fire Event Data Scan Completed #235

Open tuanha2000vn opened 3 years ago

tuanha2000vn commented 3 years ago

Currently addon have 'deepstack.object_detected' event

It's great to have 'deepstack.scan_completed' event, That will serve as a sequence camera scan to avoid server overload

For example:

robmarkcole commented 3 years ago

I see you documented a solution https://github.com/robmarkcole/HASS-Deepstack-object/discussions/234

tuanha2000vn commented 3 years ago

Well it rely on external intergration and the folder_watcher is cpu/disk heavy loading.

I don't know much about python and I've blindly add this line to your image_processing.py to fire and event on scan completed and it work.

self.hass.bus.fire("deepstack.scan_completed", {"entity_id": self._name})

I do recommend you add this feature.

robmarkcole commented 3 years ago

@tuanha2000vn please create a PR with the update and instructions in the readme, thanks