architecture icon indicating copy to clipboard operation
architecture copied to clipboard

Change default behaviour of image_processing from periodic scan

Open robmarkcole opened this issue 6 years ago • 3 comments

Currently image_processing components perform a scan at a default interval of 10 seconds. This is a bit arbitrary, and it would make more sense to do a scan when a new frame is available. Also for components which are calling a cloud service, a new user could easily rack up a bill without realising they are calling the service every 10 seconds, unless they configure a long scan_interval.

robmarkcole avatar Apr 27 '19 05:04 robmarkcole

I agree. We should probably have it set to manual update only for any cloud based integration.

balloob avatar Apr 27 '19 17:04 balloob

How about making the scan_interval be able to be changed via script / automation ... so the default can be set to 10,000 seconds (as the documentation states), and then upon motion, we can change it temporarily for a period of time via a service automation eg:

....
  action:
  - data:
      name: 'deepstack' #name would have to be added under the image_processing objects ... currently this is not supported
      scan_interval: 1
      for: 60 #seconds
    service: image_processing.tempalterscaninterval

This would make things much easier ... as I want it for 60 seconds AFTER motion stops Thanks!

i00 avatar Nov 27 '19 22:11 i00

In the sighthound integration we are disabling scanning with:

    @property
    def should_poll(self):
        """Return the polling state."""
        return False

Perhaps this should just be the default for ImageProcessingEntity

robmarkcole avatar Feb 14 '20 08:02 robmarkcole

This architecture issue is old, stale, and possibly obsolete. Things changed a lot over the years. Additionally, we have been moving to discussions for these architectural discussions.

For that reason, I'm going to close this issue.

../Frenck

frenck avatar May 11 '23 14:05 frenck