mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-10-10 16:52:47 +03:00
Camera Health Status (#19709)
* Send status of camera streams to mqtt * Update docs * Formatting * Fix frontend querying fps
This commit is contained in:
@@ -356,6 +356,7 @@ class AudioEventMaintainer(threading.Thread):
|
||||
self.chunk_size,
|
||||
self.audio_listener,
|
||||
)
|
||||
self.requestor.send_data(f"{self.camera_config.name}/status/audio", "online")
|
||||
|
||||
def read_audio(self) -> None:
|
||||
def log_and_restart() -> None:
|
||||
@@ -371,6 +372,9 @@ class AudioEventMaintainer(threading.Thread):
|
||||
|
||||
if not chunk:
|
||||
if self.audio_listener.poll() is not None:
|
||||
self.requestor.send_data(
|
||||
f"{self.camera_config.name}/status/audio", "offline"
|
||||
)
|
||||
self.logger.error("ffmpeg process is not running, restarting...")
|
||||
log_and_restart()
|
||||
return
|
||||
@@ -396,6 +400,9 @@ class AudioEventMaintainer(threading.Thread):
|
||||
)
|
||||
self.start_or_restart_ffmpeg()
|
||||
else:
|
||||
self.requestor.send_data(
|
||||
f"{self.camera_config.name}/status/audio", "disabled"
|
||||
)
|
||||
self.logger.debug(
|
||||
f"Disabling audio detections for {self.camera_config.name}, ending events"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user