add mqtt messages to readme

This commit is contained in:
Blake Blackshear 2020-07-12 09:18:25 -05:00
parent 16732aa5b3
commit 5dbe6c5f36

View File

@ -138,6 +138,75 @@ You can access a higher resolution mjpeg stream by appending `h=height-in-pixels
Debug info is available at `http://localhost:5000/debug/stats` Debug info is available at `http://localhost:5000/debug/stats`
## MQTT Messages
These are the MQTT messages generated by Frigate. The default topic_prefix is `frigate`, but can be changed in the config file.
### frigate/available
Designed to be used as an availability topic with HomeAssistant. Possible message are:
"online": published when frigate is running (on startup)
"offline": published right before frigate stops
### frigate/<camera_name>/<object_name>
Publishes `ON` or `OFF` and is designed to be used a as a binary sensor in HomeAsistant for whether or not that object type is detected.
### 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.
### frigate/<camera_name>/events/start
Message published at the start of any tracked object. JSON looks as follows:
```json
{
"label": "person",
"score": 0.7890625,
"box": [
468,
446,
550,
592
],
"area": 11972,
"region": [
403,
395,
613,
605
],
"frame_time": 1594298020.819046,
"centroid": [
509,
519
],
"id": "1594298020.819046-0",
"start_time": 1594298020.819046,
"top_score": 0.7890625,
"history": [
{
"score": 0.7890625,
"box": [
468,
446,
550,
592
],
"region": [
403,
395,
613,
605
],
"centroid": [
509,
519
],
"frame_time": 1594298020.819046
}
]
}
```
### frigate/<camera_name>/events/end
Same as `frigate/<camera_name>/events/start`, but with an `end_time` property as well.
## Using a custom model ## Using a custom model
Models for both CPU and EdgeTPU (Coral) are bundled in the image. You can use your own models with volume mounts: Models for both CPU and EdgeTPU (Coral) are bundled in the image. You can use your own models with volume mounts: