diff --git a/plugins/core/package-lock.json b/plugins/core/package-lock.json index 479ca720d..96eb5ae36 100644 --- a/plugins/core/package-lock.json +++ b/plugins/core/package-lock.json @@ -1,12 +1,12 @@ { "name": "@scrypted/core", - "version": "0.0.153", + "version": "0.0.154", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@scrypted/core", - "version": "0.0.153", + "version": "0.0.154", "license": "Apache-2.0", "dependencies": { "@koush/wrtc": "^0.5.0", diff --git a/plugins/core/package.json b/plugins/core/package.json index 5ace15f0f..bfd460bf4 100644 --- a/plugins/core/package.json +++ b/plugins/core/package.json @@ -1,6 +1,6 @@ { "name": "@scrypted/core", - "version": "0.0.153", + "version": "0.0.154", "description": "Scrypted Core plugin. Provides the UI, websocket, and engine.io APIs.", "author": "Scrypted", "license": "Apache-2.0", diff --git a/plugins/core/ui/src/interfaces/Setting.vue b/plugins/core/ui/src/interfaces/Setting.vue index 5802d5916..c83b3d8ab 100644 --- a/plugins/core/ui/src/interfaces/Setting.vue +++ b/plugins/core/ui/src/interfaces/Setting.vue @@ -12,6 +12,10 @@ @change="save" :class="lazyValue.description ? 'mb-2' : ''" > +
+ {{ lazyValue.title }} + {{ lazyValue.description }} +
`${d.detection.className} (${d.detection.score}, ${d.detection.id})`).join(', ')); + } + if (found.length || showAll) { this.console.log('current detections:', this.currentDetections.map(d => `${d.detection.className} (${d.detection.score}, ${d.detection.id})`).join(', ')); if (detectionResult.running) this.extendedObjectDetect(); } } - async peopleDetected(detectionResult: ObjectsDetected) { - if (!detectionResult?.people) { - return; - } - - const found: DenoisedDetectionEntry[] = []; - denoiseDetections(this.currentPeople, detectionResult.people.map(detection => ({ - id: detection.id, - name: detection.label, - detection, - })), { - timeout: this.detectionTimeout * 1000, - added: d => found.push(d), - removed: d => { - this.console.log('expired detection:', `${d.detection.label} (${d.detection.score}, ${d.detection.id})`); - if (detectionResult.running) - this.extendedFaceDetect(); - } - }); - if (found.length) { - this.console.log('new detection:', found.map(d => `${d.detection.label} (${d.detection.score}, ${d.detection.id})`).join(', ')); - this.console.log('current detections:', this.currentDetections.map(d => `${d.detection.className} (${d.detection.score}, ${d.detection.id})`).join(', ')); - this.extendedFaceDetect(); - } - } - - async extendedFaceDetect() { - this.objectDetection?.detectObjects(undefined, { - detectionId: this.detectionId, - duration: 60000, - }); - } - setDetection(detectionId: string, detectionInput: DetectionInput) { // this.detections.set(detectionId, detectionInput); // setTimeout(() => { @@ -398,11 +367,22 @@ class ObjectDetectionMixin extends SettingsMixinDeviceBase { - const vs = value.toString(); + const vs = value?.toString(); this.storage.setItem(key, vs); if (key === 'detectionDuration') { this.detectionDuration = parseInt(vs) || defaultDetectionDuration; @@ -423,6 +403,11 @@ class ObjectDetectionMixin extends SettingsMixinDeviceBase