From 5dbe6c5f364a18a8a17a1b939fed6c734c1e60ac Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Sun, 12 Jul 2020 09:18:25 -0500 Subject: [PATCH] add mqtt messages to readme --- README.md | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/README.md b/README.md index 1af7295b6..14bc33f14 100644 --- a/README.md +++ b/README.md @@ -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` +## 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// +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///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//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//events/end +Same as `frigate//events/start`, but with an `end_time` property as well. ## 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: