(window.webpackJsonp=window.webpackJsonp||[]).push([[15],{86:function(e,t,a){"use strict";a.r(t),a.d(t,"frontMatter",(function(){returnc})),a.d(t,"metadata",(function(){returno})),a.d(t,"toc",(function(){returns})),a.d(t,"default",(function(){returnd}));varn=a(3),r=a(7),i=(a(0),a(96)),c={id:"mqtt",title:"MQTT"},o={unversionedId:"usage/mqtt",id:"usage/mqtt",isDocsHomePage:!1,title:"MQTT",description:"These are the MQTT messages generated by Frigate. The default topic_prefix is frigate, but can be changed in the config file.",source:"@site/docs/usage/mqtt.md",slug:"/usage/mqtt",permalink:"/frigate/usage/mqtt",editUrl:"https://github.com/blakeblackshear/frigate/edit/master/docs/docs/usage/mqtt.md",version:"current",sidebar:"docs",previous:{title:"HTTP API",permalink:"/frigate/usage/api"}},s=[{value:"<code>frigate/available</code>",id:"frigateavailable",children:[]},{value:"<code>frigate/<camera_name>/<object_name></code>",id:"frigatecamera_nameobject_name",children:[]},{value:"<code>frigate/<zone_name>/<object_name></code>",id:"frigatezone_nameobject_name",children:[]},{value:"<code>frigate/<camera_name>/<object_name>/snapshot</code>",id:"frigatecamera_nameobject_namesnapshot",children:[]},{value:"<code>frigate/events</code>",id:"frigateevents",children:[]},{value:"<code>frigate/stats</code>",id:"frigatestats",children:[]},{value:"<code>frigate/<camera_name>/detect/set</code>",id:"frigatecamera_namedetectset",children:[]},{value:"<code>frigate/<camera_name>/detect/state</code>",id:"frigatecamera_namedetectstate",children:[]},{value:"<code>frigate/<camera_name>/clips/set</code>",id:"frigatecamera_nameclipsset",children:[]},{value:"<code>frigate/<camera_name>/clips/state</code>",id:"frigatecamera_nameclipsstate",children:[]},{value:"<code>frigate/<camera_name>/snapshots/set</code>",id:"frigatecamera_namesnapshotsset",children:[]},{value:"<code>frigate/<camera_name>/snapshots/state</code>",id:"frigatecamera_namesnapshotsstate",children:[]}],l={toc:s};functiond(e){vart=e.components,a=Object(r.a)(e,["components"]);returnObject(i.b)("wrapper",Object(n.a)({},l,a,{components:t,mdxType:"MDXLayout"}),Object(i.b)("p",null,"These are the MQTT messages generated by Frigate. The default topic_prefix is ",Object(i.b)("inlineCode",{parentName:"p"},"frigate"),", but can be changed in the config file."),Object(i.b)("h3",{id:"frigateavailable"},Object(i.b)("inlineCode",{parentName:"h3"},"frigate/available")),Object(i.b)("p",null,'Designed to be used as an availability topic with HomeAssistant. Possible message are:\n"online": published when frigate is running (on startup)\n"offline": published right before frigate stops'),Object(i.b)("h3",{id:"frigatecamera_nameobject_name"},Object(i.b)("inlineCode",{parentName:"h3"},"frigate/<camera_name>/<object_name>")),Object(i.b)("p",null,"Publishes the count of objects for the camera for use as a sensor in HomeAssistant."),Object(i.b)("h3",{id:"frigatezone_nameobject_name"},Object(i.b)("inlineCode",{parentName:"h3"},"frigate/<zone_name>/<object_name>")),Object(i.b)("p",null,"Publishes the count of objects for the zone for use as a sensor in HomeAssistant."),Object(i.b)("h3",{id:"frigatecamera_nameobject_namesnapshot"},Object(i.b)("inlineCode",{parentName:"h3"},"frigate/<camera_name>/<object_name>/snapshot")),Object(i.b)("p",null,"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\nis published again."),Object(i.b)("p",null,"The height and crop of snapshots can be configured in the config."),Object(i.b)("h3",{id:"frigateevents"},Object(i.b)("inlineCode",{parentName:"h3"},"frigate/events")),Object(i.b)("p",null,"Messagepublishedforeachchangedevent.Thefirstmessageispublishedwhenthetrackedobjectisnolongermarkedasafalse_positive.Whenfrigatefindsabettersnapshotofthetrackedobjectorwhenazonechangeoccurs,itwillpublishamessagewiththesameid.Whentheeventends,afinalmessagei