Add MQTT topic to expose current camera review status (#17276)

* Add MQTT topic to expose current camera review status

* Formatting
This commit is contained in:
Nicolas Mowen 2025-03-20 10:51:08 -06:00 committed by GitHub
parent be56305b4e
commit 0308a88111
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 0 deletions

View File

@ -305,6 +305,10 @@ Topic to adjust motion contour area for a camera. Expected value is an integer.
Topic with current motion contour area for a camera. Published value is an integer.
### `frigate/<camera_name>/review_status`
Topic with current activity status of the camera. Possible values are `NONE`, `DETECTION`, or `ALERT`.
### `frigate/<camera_name>/ptz`
Topic to send PTZ commands to camera.

View File

@ -181,6 +181,9 @@ class ReviewSegmentMaintainer(threading.Thread):
}
),
)
self.requestor.send_data(
f"{segment.camera}/review_status", segment.severity.value.upper()
)
def _publish_segment_update(
self,
@ -206,6 +209,9 @@ class ReviewSegmentMaintainer(threading.Thread):
}
),
)
self.requestor.send_data(
f"{segment.camera}/review_status", segment.severity.value.upper()
)
def _publish_segment_end(
self,
@ -225,6 +231,7 @@ class ReviewSegmentMaintainer(threading.Thread):
}
),
)
self.requestor.send_data(f"{segment.camera}/review_status", "NONE")
self.active_review_segments[segment.camera] = None
def end_segment(self, camera: str) -> None: