diff --git a/docs/docs/configuration/index.md b/docs/docs/configuration/index.md index 8915db6b3..f23a32270 100644 --- a/docs/docs/configuration/index.md +++ b/docs/docs/configuration/index.md @@ -467,10 +467,11 @@ cameras: # Required: the path to the stream # NOTE: path may include environment variables, which must begin with 'FRIGATE_' and be referenced in {} - path: rtsp://viewer:{FRIGATE_RTSP_PASSWORD}@10.0.10.10:554/cam/realmonitor?channel=1&subtype=2 - # Required: list of roles for this stream. valid values are: detect,record,rtmp - # NOTICE: In addition to assigning the record and rtmp roles, + # Required: list of roles for this stream. valid values are: audio,detect,record,rtmp + # NOTICE: In addition to assigning the audio, record, and rtmp roles, # they must also be enabled in the camera config. roles: + - audio - detect - record - rtmp diff --git a/docs/docs/integrations/mqtt.md b/docs/docs/integrations/mqtt.md index cde760559..229285676 100644 --- a/docs/docs/integrations/mqtt.md +++ b/docs/docs/integrations/mqtt.md @@ -109,11 +109,19 @@ Same data available at `/api/stats` published at a configurable interval. ### `frigate//detect/set` -Topic to turn detection for a camera on and off. Expected values are `ON` and `OFF`. +Topic to turn object detection for a camera on and off. Expected values are `ON` and `OFF`. ### `frigate//detect/state` -Topic with current state of detection for a camera. Published values are `ON` and `OFF`. +Topic with current state of object detection for a camera. Published values are `ON` and `OFF`. + +### `frigate//audio/set` + +Topic to turn audio detection for a camera on and off. Expected values are `ON` and `OFF`. + +### `frigate//audio/state` + +Topic with current state of audio detection for a camera. Published values are `ON` and `OFF`. ### `frigate//recordings/set` diff --git a/frigate/comms/mqtt.py b/frigate/comms/mqtt.py index 4ddfbe7f1..2859a04a2 100644 --- a/frigate/comms/mqtt.py +++ b/frigate/comms/mqtt.py @@ -149,6 +149,7 @@ class MqttClient(Communicator): # type: ignore[misc] "recordings", "snapshots", "detect", + "audio", "motion", "improve_contrast", "motion_threshold", diff --git a/frigate/events/audio.py b/frigate/events/audio.py index 4f40334d4..e1d25e018 100644 --- a/frigate/events/audio.py +++ b/frigate/events/audio.py @@ -206,7 +206,7 @@ class AudioEventMaintainer(threading.Thread): now - detection.get("last_detection", now) > self.config.audio.max_not_heard ): - self.detections[detection["label"]] = None + del self.detections[detection["label"]] requests.put( f"{FRIGATE_LOCALHOST}/api/events/{detection['id']}/end", json={