소스 검색

add mqtt messages to readme

Blake Blackshear 4 년 전
부모
커밋
5dbe6c5f36
1개의 변경된 파일69개의 추가작업 그리고 0개의 파일을 삭제
  1. 69 0
      README.md

+ 69 - 0
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/<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
 Models for both CPU and EdgeTPU (Coral) are bundled in the image. You can use your own models with volume mounts: