NVR with realtime local object detection for IP cameras
TypeScript aicameragoogle-coralhome-assistanthome-automationhomeautomationmqttnvrobject-detectionrealtimertsptensorflow
Support all audio type in MQTT (#19768)
Nicolas Mowen195f7056169d
diff --git a/docs/docs/integrations/mqtt.md b/docs/docs/integrations/mqtt.mdindex 2c4b4fc743..dbcc82188e 100644--- a/docs/docs/integrations/mqtt.md+++ b/docs/docs/integrations/mqtt.md@@ -279,6 +279,8 @@ The height and crop of snapshots can be configured in the config.Publishes "ON" when a type of audio is detected and "OFF" when it is not for the camera for use as a sensor in Home Assistant.+`all` can be used as the audio_type for the status of all audio types.+### `frigate/<camera_name>/audio/dBFS`Publishes the dBFS value for audio detected on this camera.diff --git a/frigate/camera/activity_manager.py b/frigate/camera/activity_manager.pyindex 93e8bcd23a..c2dfa891da 100644--- a/frigate/camera/activity_manager.py+++ b/frigate/camera/activity_manager.py@@ -181,6 +181,10 @@ class AudioActivityManager:new_detections = new_activity[camera].get("detections", [])if self.compare_audio_activity(camera, new_detections, now):logger.debug(f"Audio detections for {camera}: {new_activity}")+ self.publish(+ f"{camera}/audio/all",+ "ON" if len(self.current_audio_detections[camera]) > 0 else "OFF",+ )self.publish("audio_detections",json.dumps(self.current_audio_detections),