Skip to content

Commit

Permalink
Fix small audio events details (blakeblackshear#6978)
Browse files Browse the repository at this point in the history
* Fix missed audio details

* Add mqtt docs

* Delete instead of setting to None
  • Loading branch information
NickM-27 authored Jul 1, 2023
1 parent c3b313a commit 7ee17c7
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
5 changes: 3 additions & 2 deletions docs/docs/configuration/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:https://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
Expand Down
12 changes: 10 additions & 2 deletions docs/docs/integrations/mqtt.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,19 @@ Same data available at `/api/stats` published at a configurable interval.

### `frigate/<camera_name>/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/<camera_name>/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/<camera_name>/audio/set`

Topic to turn audio detection for a camera on and off. Expected values are `ON` and `OFF`.

### `frigate/<camera_name>/audio/state`

Topic with current state of audio detection for a camera. Published values are `ON` and `OFF`.

### `frigate/<camera_name>/recordings/set`

Expand Down
1 change: 1 addition & 0 deletions frigate/comms/mqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ def _start(self) -> None:
"recordings",
"snapshots",
"detect",
"audio",
"motion",
"improve_contrast",
"motion_threshold",
Expand Down
2 changes: 1 addition & 1 deletion frigate/events/audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def expire_detections(self) -> None:
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={
Expand Down

0 comments on commit 7ee17c7

Please sign in to comment.