This commit is contained in:
Josh Hawkins 2025-02-11 08:43:00 -06:00
parent 663ebccc3f
commit 050b2d4317
3 changed files with 3 additions and 35 deletions

View File

@ -340,7 +340,7 @@ objects:
review:
# Optional: alerts configuration
alerts:
# Optional: enables alerts for the camera (default: True)
# Optional: enables alerts for the camera (default: shown below)
enabled: True
# Optional: labels that qualify as an alert (default: shown below)
labels:
@ -354,7 +354,7 @@ review:
- driveway
# Optional: detections configuration
detections:
# Optional: enables detections for the camera (default: True)
# Optional: enables detections for the camera (default: shown below)
enabled: True
# Optional: labels that qualify as a detection (default: all labels that are tracked / listened to)
labels:

View File

@ -202,9 +202,7 @@ class EventProcessor(threading.Thread):
Event.end_time: end_time,
Event.zones: list(event_data["entered_zones"]),
Event.thumbnail: event_data["thumbnail"],
Event.has_clip: event_data["has_clip"]
if event_data.get("max_severity")
else False,
Event.has_clip: event_data["has_clip"],
Event.has_snapshot: event_data["has_snapshot"],
Event.model_hash: first_detector.model.model_hash,
Event.model_type: first_detector.model.model_type,

View File

@ -459,38 +459,8 @@ class ReviewSegmentMaintainer(threading.Thread):
if updated_review_topic:
camera_name = updated_review_topic.rpartition("/")[-1]
old_alerts_enabled = self.config.cameras[
camera_name
].review.alerts.enabled
old_detections_enabled = self.config.cameras[
camera_name
].review.detections.enabled
self.config.cameras[camera_name].review = updated_review_config
# Check if alerts.enabled or detections.enabled has changed
if (
old_alerts_enabled
!= self.config.cameras[camera_name].review.alerts.enabled
or old_detections_enabled
!= self.config.cameras[camera_name].review.detections.enabled
):
segment = self.active_review_segments.get(camera_name)
if segment:
if (
not self.config.cameras[
camera_name
].review.alerts.enabled
and segment.severity == SeverityEnum.alert
):
self.end_segment(camera_name)
elif (
not self.config.cameras[
camera_name
].review.detections.enabled
and segment.severity == SeverityEnum.detection
):
self.end_segment(camera_name)
(topic, data) = self.detection_subscriber.check_for_update(timeout=1)
if not topic: