From d7201a16a783a4c7a2ebee886a26c7075a808158 Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Fri, 15 Dec 2023 10:56:20 -0800 Subject: [PATCH] snapshot/videoanalysis: publish --- plugins/objectdetector/package-lock.json | 4 ++-- plugins/objectdetector/package.json | 2 +- plugins/objectdetector/src/main.ts | 19 ++++++++++--------- plugins/snapshot/package-lock.json | 4 ++-- plugins/snapshot/package.json | 2 +- 5 files changed, 16 insertions(+), 15 deletions(-) diff --git a/plugins/objectdetector/package-lock.json b/plugins/objectdetector/package-lock.json index 579598011..cabffefcc 100644 --- a/plugins/objectdetector/package-lock.json +++ b/plugins/objectdetector/package-lock.json @@ -1,12 +1,12 @@ { "name": "@scrypted/objectdetector", - "version": "0.1.14", + "version": "0.1.15", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@scrypted/objectdetector", - "version": "0.1.14", + "version": "0.1.15", "license": "Apache-2.0", "dependencies": { "@scrypted/common": "file:../../common", diff --git a/plugins/objectdetector/package.json b/plugins/objectdetector/package.json index 272338abf..32037b2e0 100644 --- a/plugins/objectdetector/package.json +++ b/plugins/objectdetector/package.json @@ -1,6 +1,6 @@ { "name": "@scrypted/objectdetector", - "version": "0.1.14", + "version": "0.1.15", "description": "Scrypted Video Analysis Plugin. Installed alongside a detection service like OpenCV or TensorFlow.", "author": "Scrypted", "license": "Apache-2.0", diff --git a/plugins/objectdetector/src/main.ts b/plugins/objectdetector/src/main.ts index 61faf0dca..be0f78f57 100644 --- a/plugins/objectdetector/src/main.ts +++ b/plugins/objectdetector/src/main.ts @@ -15,7 +15,7 @@ import { getAllDevices, safeParseJson } from './util'; const { systemManager } = sdk; -const defaultMinimumDetectionDuration = 30; +const defaultPostMotionAnalysisDuration = 20; const defaultMotionDuration = 30; const BUILTIN_MOTION_SENSOR_ASSIST = 'Assist'; @@ -63,12 +63,12 @@ class ObjectDetectionMixin extends SettingsMixinDeviceBase { if (!this.cameraDevice.motionDetected) { - const minimumEndTme = this.detectionStartTime + this.storageSettings.values.minimumDetectionDuration * 1000; - const sleepTime = minimumEndTme - Date.now(); + // const minimumEndTme = this.detectionStartTime + this.storageSettings.values.minimumDetectionDuration * 1000; + // const sleepTime = minimumEndTme - Date.now(); + const sleepTime = this.storageSettings.values.postMotionAnalysisDuration * 1000; if (sleepTime > 0) { this.console.log('Motion stopped. Waiting additional time for minimum detection duration:', sleepTime); @@ -665,7 +666,7 @@ class ObjectDetectionMixin extends SettingsMixinDeviceBase