Add audio topics to mqtt docs and add mqtt headers

This commit is contained in:
Nick Mowen 2023-07-14 07:58:11 -06:00
parent 2d9f2c6325
commit 8cd6a2c94f

View File

@ -5,6 +5,8 @@ title: MQTT
These are the MQTT messages generated by Frigate. The default topic_prefix is `frigate`, but can be changed in the config file. These are the MQTT messages generated by Frigate. The default topic_prefix is `frigate`, but can be changed in the config file.
## General Frigate Topics
### `frigate/available` ### `frigate/available`
Designed to be used as an availability topic with Home Assistant. Possible message are: Designed to be used as an availability topic with Home Assistant. Possible message are:
@ -15,23 +17,6 @@ Designed to be used as an availability topic with Home Assistant. Possible messa
Causes Frigate to exit. Docker should be configured to automatically restart the container on exit. Causes Frigate to exit. Docker should be configured to automatically restart the container on exit.
### `frigate/<camera_name>/<object_name>`
Publishes the count of objects for the camera for use as a sensor in Home Assistant.
`all` can be used as the object_name for the count of all objects for the camera.
### `frigate/<zone_name>/<object_name>`
Publishes the count of objects for the zone for use as a sensor in Home Assistant.
`all` can be used as the object_name for the count of all objects for the zone.
### `frigate/<camera_name>/<object_name>/snapshot`
Publishes a jpeg encoded frame of the detected object type. When the object is no longer detected, the highest confidence image is published or the original image
is published again.
The height and crop of snapshots can be configured in the config.
### `frigate/events` ### `frigate/events`
Message published for each changed event. The first message is published when the tracked object is no longer marked as a false_positive. When Frigate finds a better snapshot of the tracked object or when a zone change occurs, it will publish a message with the same id. When the event ends, a final message is published with `end_time` set. Message published for each changed event. The first message is published when the tracked object is no longer marked as a false_positive. When Frigate finds a better snapshot of the tracked object or when a zone change occurs, it will publish a message with the same id. When the event ends, a final message is published with `end_time` set.
@ -111,6 +96,41 @@ Message published for each changed event. The first message is published when th
Same data available at `/api/stats` published at a configurable interval. Same data available at `/api/stats` published at a configurable interval.
## Frigate Camera Topics
### `frigate/<camera_name>/<object_name>`
Publishes the count of objects for the camera for use as a sensor in Home Assistant.
`all` can be used as the object_name for the count of all objects for the camera.
### `frigate/<zone_name>/<object_name>`
Publishes the count of objects for the zone for use as a sensor in Home Assistant.
`all` can be used as the object_name for the count of all objects for the zone.
### `frigate/<camera_name>/<object_name>/snapshot`
Publishes a jpeg encoded frame of the detected object type. When the object is no longer detected, the highest confidence image is published or the original image
is published again.
The height and crop of snapshots can be configured in the config.
### `frigate/<camera_name>/audio/<audio_type>`
Publishes True when a type of audio is detected and False when it is not for the camera for use as a sensor in Home Assistant.
### `frigate/<camera_name>/audio/dBFS`
Publishes the dBFS value for audio detected on this camera.
**NOTE:** Requires audio detection to be enabled
### `frigate/<camera_name>/audio/rms`
Publishes the rms value for audio detected on this camera.
**NOTE:** Requires audio detection to be enabled
### `frigate/<camera_name>/detect/set` ### `frigate/<camera_name>/detect/set`
Topic to turn object 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`.