---
id: mqtt
title: MQTT
---

These are the MQTT messages generated by Frigate. The default topic_prefix is `frigate`, but can be changed in the config file.

:::info

MQTT requires a network connection to your broker. This is typically local, but will require internet if using a cloud-hosted MQTT broker. See [Network Requirements](/frigate/network_requirements#mqtt) for details.

:::

## General Frigate Topics

### `frigate/available`

Designed to be used as an availability topic with Home Assistant. Possible message are:
"online": published once Frigate is running and has published its initial state. Note that this is published on every connection to the broker, so it is republished if the broker restarts or the connection drops and recovers, without Frigate itself restarting.
"stopped": published when Frigate is stopped normally
"offline": published automatically by the MQTT broker if Frigate disconnects unexpectedly (via MQTT Will Message)

### `frigate/restart`

Causes Frigate to exit. Docker should be configured to automatically restart the container on exit.

### `frigate/events`

Message published for each changed tracked object. 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 tracked object ends, a final message is published with `end_time` set.

```json
{
  "type": "update", // new, update, end
  "before": {
    "id": "1607123955.475377-mxklsc",
    "camera": "front_door",
    "frame_time": 1607123961.837752,
    "snapshot": {
      "frame_time": 1607123965.975463,
      "box": [415, 489, 528, 700],
      "area": 12728,
      "region": [260, 446, 660, 846],
      "score": 0.77546,
      "attributes": []
    },
    "label": "person",
    "sub_label": null,
    "top_score": 0.958984375,
    "false_positive": false,
    "start_time": 1607123955.475377,
    "end_time": null,
    "score": 0.7890625,
    "box": [424, 500, 536, 712],
    "area": 23744,
    "ratio": 2.113207,
    "region": [264, 450, 667, 853],
    "current_zones": ["driveway"],
    "entered_zones": ["yard", "driveway"],
    "thumbnail": null,
    "has_snapshot": false,
    "has_clip": false,
    "active": true, // convenience attribute, this is strictly opposite of "stationary"
    "stationary": false, // whether or not the object is considered stationary
    "motionless_count": 0, // number of frames the object has been motionless
    "position_changes": 2, // number of times the object has moved from a stationary position
    "attributes": {
      "face": 0.64
    }, // attributes with top score that have been identified on the object at any point
    "current_attributes": [], // detailed data about the current attributes in this frame
    "current_estimated_speed": 0.71, // current estimated speed (mph or kph) for objects moving through zones with speed estimation enabled
    "average_estimated_speed": 14.3, // average estimated speed (mph or kph) for objects moving through zones with speed estimation enabled
    "velocity_angle": 180, // direction of travel relative to the frame for objects moving through zones with speed estimation enabled
    "recognized_license_plate": "ABC12345", // a recognized license plate for car objects
    "recognized_license_plate_score": 0.933451
  },
  "after": {
    "id": "1607123955.475377-mxklsc",
    "camera": "front_door",
    "frame_time": 1607123962.082975,
    "snapshot": {
      "frame_time": 1607123965.975463,
      "box": [415, 489, 528, 700],
      "area": 12728,
      "region": [260, 446, 660, 846],
      "score": 0.77546,
      "attributes": []
    },
    "label": "person",
    "sub_label": ["John Smith", 0.79],
    "top_score": 0.958984375,
    "false_positive": false,
    "start_time": 1607123955.475377,
    "end_time": null,
    "score": 0.87890625,
    "box": [432, 496, 544, 854],
    "area": 40096,
    "ratio": 1.251397,
    "region": [218, 440, 693, 915],
    "current_zones": ["yard", "driveway"],
    "entered_zones": ["yard", "driveway"],
    "thumbnail": null,
    "has_snapshot": false,
    "has_clip": false,
    "active": true, // convenience attribute, this is strictly opposite of "stationary"
    "stationary": false, // whether or not the object is considered stationary
    "motionless_count": 0, // number of frames the object has been motionless
    "position_changes": 2, // number of times the object has changed position
    "attributes": {
      "face": 0.86
    }, // attributes with top score that have been identified on the object at any point
    "current_attributes": [
      // detailed data about the current attributes in this frame
      {
        "label": "face",
        "box": [442, 506, 534, 524],
        "score": 0.86
      }
    ],
    "current_estimated_speed": 0.77, // current estimated speed (mph or kph) for objects moving through zones with speed estimation enabled
    "average_estimated_speed": 14.31, // average estimated speed (mph or kph) for objects moving through zones with speed estimation enabled
    "velocity_angle": 180, // direction of travel relative to the frame for objects moving through zones with speed estimation enabled
    "recognized_license_plate": "ABC12345", // a recognized license plate for car objects
    "recognized_license_plate_score": 0.933451
  }
}
```

### `frigate/tracked_object_update`

Message published for updates to tracked object metadata. All messages include an `id` field which is the tracked object's event ID, and can be used to look up the event via the API or match it to items in the UI.

#### Generative AI Description Update

```json
{
  "type": "description",
  "id": "1607123955.475377-mxklsc",
  "description": "The car is a red sedan moving away from the camera."
}
```

#### Face Recognition Update

Published after each recognition attempt, regardless of whether the score meets `recognition_threshold`. See the [Face Recognition](/configuration/face_recognition) documentation for details on how scoring works.

```json
{
  "type": "face",
  "id": "1607123955.475377-mxklsc",
  "name": "John", // best matching person, or null if no match
  "score": 0.95, // running weighted average across all recognition attempts
  "camera": "front_door_cam",
  "timestamp": 1607123958.748393
}
```

#### License Plate Recognition Update

Published when a license plate is recognized on a car object. See the [License Plate Recognition](/configuration/license_plate_recognition) documentation for details.

```json
{
  "type": "lpr",
  "id": "1607123955.475377-mxklsc",
  "name": "John's Car", // known name for the plate, or null
  "plate": "123ABC",
  "score": 0.95,
  "camera": "driveway_cam",
  "timestamp": 1607123958.748393,
  "plate_box": [917, 487, 1029, 529] // box coordinates of the detected license plate in the frame
}
```

#### Object Classification Update

Message published when [object classification](/configuration/custom_classification/object_classification) reaches consensus on a classification result.

**Sub label type:**

```json
{
  "type": "classification",
  "id": "1607123955.475377-mxklsc",
  "camera": "front_door_cam",
  "timestamp": 1607123958.748393,
  "model": "person_classifier",
  "sub_label": "delivery_person",
  "score": 0.87
}
```

**Attribute type:**

```json
{
  "type": "classification",
  "id": "1607123955.475377-mxklsc",
  "camera": "front_door_cam",
  "timestamp": 1607123958.748393,
  "model": "helmet_detector",
  "attribute": "yes",
  "score": 0.92
}
```

### `frigate/reviews`

Message published for each changed review item. The first message is published when the `detection` or `alert` is initiated.

An `update` with the same ID will be published when:

- The severity changes from `detection` to `alert`
- Additional objects are detected
- An object is recognized via face, lpr, etc.

When the review activity has ended a final `end` message is published.

```json
{
  "type": "update", // new, update, end
  "before": {
    "id": "1718987129.308396-fqk5ka", // review_id
    "camera": "front_cam",
    "start_time": 1718987129.308396,
    "end_time": null,
    "severity": "detection",
    "thumb_path": "/media/frigate/clips/review/thumb-front_cam-1718987129.308396-fqk5ka.webp",
    "data": {
      "detections": [
        // list of event IDs
        "1718987128.947436-g92ztx",
        "1718987148.879516-d7oq7r",
        "1718987126.934663-q5ywpt"
      ],
      "objects": ["person", "car"],
      "sub_labels": [],
      "zones": [],
      "audio": []
    }
  },
  "after": {
    "id": "1718987129.308396-fqk5ka",
    "camera": "front_cam",
    "start_time": 1718987129.308396,
    "end_time": null,
    "severity": "alert",
    "thumb_path": "/media/frigate/clips/review/thumb-front_cam-1718987129.308396-fqk5ka.webp",
    "data": {
      "detections": [
        "1718987128.947436-g92ztx",
        "1718987148.879516-d7oq7r",
        "1718987126.934663-q5ywpt"
      ],
      "objects": ["person", "car"],
      "sub_labels": ["Bob"],
      "zones": ["front_yard"],
      "audio": []
    }
  }
}
```

### `frigate/triggers`

Message published when a trigger defined in a camera's `semantic_search` configuration fires.

```json
{
  "name": "car_trigger",
  "camera": "driveway",
  "event_id": "1751565549.853251-b69j73",
  "type": "thumbnail",
  "score": 0.85
}
```

### `frigate/stats`

Same data available at `/api/stats` published at a configurable interval.

### `frigate/camera_activity`

Returns data about each camera, its current features, and if it is detecting motion, objects, etc. Can be triggered by publishing to `frigate/onConnect`

### `frigate/profile/set`

Topic to activate or deactivate a [profile](/configuration/profiles). Publish a profile name to activate it, or `none` to deactivate the current profile.

### `frigate/profile/state`

Topic with the currently active profile name. Published value is the profile name or `none` if no profile is active. This topic is retained.

### `frigate/notifications/set`

Topic to turn notifications on and off. Expected values are `ON` and `OFF`.

### `frigate/notifications/state`

Topic with current state of notifications. Published values are `ON` and `OFF`.

## Frigate Camera Topics

### `frigate/<camera_name>/status/<role>`

Publishes the current health status of each role that is enabled (`audio`, `detect`, `record`). Possible values are:

- `online`: Stream is running and being processed
- `offline`: Stream is offline and is being restarted
- `disabled`: Camera is currently turned off (either at runtime via the `enabled/set` topic, or persistently via the configuration file). See [Camera state](/configuration/live#camera-state) for the distinction.

These reflect the state of Frigate's process for that role, not the camera's reachability, so an unreachable camera alternates between `offline` and `online` as the watchdog restarts ffmpeg. Wait for the status to hold steady (for example with Home Assistant's `for:`) rather than acting on a single message.

### `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/<camera_name>/<object_name>/active`

Publishes the count of active 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 active 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/<zone_name>/<object_name>/active`

Publishes the count of active 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 "ON" when a type of audio is detected and "OFF" when it is not for the camera for use as a sensor in Home Assistant.

`all` can be used as the audio_type for the status of all audio types.

### `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>/audio/transcription`

Publishes transcribed text for audio detected on this camera.

**NOTE:** Requires audio detection and transcription to be enabled

### `frigate/<camera_name>/classification/<model_name>`

Publishes the current state detected by a state classification model for the camera. The topic name includes the model name as configured in your classification settings.
The published value is the detected state class name (e.g., `open`, `closed`, `on`, `off`). The state is only published when it changes, helping to reduce unnecessary MQTT traffic.

### `frigate/<camera_name>/enabled/set`

Topic to turn Frigate's processing of a camera on or off at runtime. Expected values are `ON` and `OFF`. The change is persisted across Frigate restarts (see [Runtime toggle persistence](/configuration/live#runtime-toggle-persistence)). To permanently change the configured value, use **Settings → Global configuration → Camera management** in the Frigate UI. See [Camera state](/configuration/live#camera-state) for the difference between turning a camera off and disabling it.

### `frigate/<camera_name>/enabled/state`

Topic with current runtime state of processing for a camera. Published values are `ON` and `OFF`.

### `frigate/<camera_name>/detect/set`

Topic to turn object detection for a camera on and off. Expected values are `ON` and `OFF`. The change is persisted across Frigate restarts (see [Runtime toggle persistence](/configuration/live#runtime-toggle-persistence)).

### `frigate/<camera_name>/detect/state`

Topic with current state of object detection for a camera. Published values are `ON` and `OFF`.

### `frigate/<camera_name>/audio/set`

Topic to turn audio detection for a camera on and off. Expected values are `ON` and `OFF`. The change is persisted across Frigate restarts (see [Runtime toggle persistence](/configuration/live#runtime-toggle-persistence)).

### `frigate/<camera_name>/audio/state`

Topic with current state of audio detection for a camera. Published values are `ON` and `OFF`.

### `frigate/<camera_name>/audio_transcription/set`

Topic to turn [live audio transcription](/configuration/audio_detectors#live-transcription) for a camera on and off. Expected values are `ON` and `OFF`. Transcribed text is published to `frigate/<camera_name>/audio/transcription`.

`ON` is ignored unless audio transcription is enabled in the config for the camera. Unlike the other camera toggles, this one is not persisted across Frigate restarts.

**NOTE:** Requires audio detection and transcription to be enabled

### `frigate/<camera_name>/audio_transcription/state`

Topic with current state of live audio transcription for a camera. Published values are `ON` and `OFF`.

### `frigate/<camera_name>/recordings/set`

Topic to turn recordings for a camera on and off. Expected values are `ON` and `OFF`. The change is persisted across Frigate restarts (see [Runtime toggle persistence](/configuration/live#runtime-toggle-persistence)).

### `frigate/<camera_name>/recordings/state`

Topic with current state of recordings for a camera. Published values are `ON` and `OFF`.

### `frigate/<camera_name>/snapshots/set`

Topic to turn snapshots for a camera on and off. Expected values are `ON` and `OFF`. The change is persisted across Frigate restarts (see [Runtime toggle persistence](/configuration/live#runtime-toggle-persistence)).

### `frigate/<camera_name>/snapshots/state`

Topic with current state of snapshots for a camera. Published values are `ON` and `OFF`.

### `frigate/<camera_name>/motion/set`

Topic to turn motion detection for a camera on and off. Expected values are `ON` and `OFF`.
NOTE: Turning off motion detection will fail if detection is not disabled.

### `frigate/<camera_name>/motion`

Whether camera_name is currently detecting motion. Expected values are `ON` and `OFF`.
NOTE: After motion is initially detected, `ON` will be set until no motion has
been detected for `mqtt_off_delay` seconds (30 by default).

### `frigate/<camera_name>/motion/state`

Topic with current state of motion detection for a camera. Published values are `ON` and `OFF`.

### `frigate/<camera_name>/improve_contrast/set`

Topic to turn improve_contrast for a camera on and off. Expected values are `ON` and `OFF`.

### `frigate/<camera_name>/improve_contrast/state`

Topic with current state of improve_contrast for a camera. Published values are `ON` and `OFF`.

### `frigate/<camera_name>/motion_threshold/set`

Topic to adjust motion threshold for a camera. Expected value is an integer.

### `frigate/<camera_name>/motion_threshold/state`

Topic with current motion threshold for a camera. Published value is an integer.

### `frigate/<camera_name>/motion_contour_area/set`

Topic to adjust motion contour area for a camera. Expected value is an integer.

### `frigate/<camera_name>/motion_contour_area/state`

Topic with current motion contour area for a camera. Published value is an integer.

### `frigate/<camera_name>/motion_mask/<mask_name>/set`

Topic to turn a specific motion mask for a camera on and off. Expected values are `ON` and `OFF`.

### `frigate/<camera_name>/motion_mask/<mask_name>/state`

Topic with current state of a specific motion mask for a camera. Published values are `ON` and `OFF`.

### `frigate/<camera_name>/object_mask/<mask_name>/set`

Topic to turn a specific object mask for a camera on and off. Expected values are `ON` and `OFF`.

### `frigate/<camera_name>/object_mask/<mask_name>/state`

Topic with current state of a specific object mask for a camera. Published values are `ON` and `OFF`.

### `frigate/<camera_name>/zone/<zone_name>/set`

Topic to turn a specific zone for a camera on and off. Expected values are `ON` and `OFF`.

### `frigate/<camera_name>/zone/<zone_name>/state`

Topic with current state of a specific zone for a camera. Published values are `ON` and `OFF`.

### `frigate/<camera_name>/review_status`

Topic with current activity status of the camera. Possible values are `NONE`, `DETECTION`, or `ALERT`.

### `frigate/<camera_name>/ptz`

Topic to send PTZ commands to camera.

| Command                | Description                                                                               |
| ---------------------- | ----------------------------------------------------------------------------------------- |
| `preset_<preset_name>` | send command to move to preset with name `<preset_name>`                                  |
| `MOVE_<dir>`           | send command to continuously move in `<dir>`, possible values are [UP, DOWN, LEFT, RIGHT] |
| `ZOOM_<dir>`           | send command to continuously zoom `<dir>`, possible values are [IN, OUT]                  |
| `STOP`                 | send command to stop moving                                                               |

### `frigate/<camera_name>/ptz_autotracker/set`

Topic to turn the PTZ autotracker for a camera on and off. Expected values are `ON` and `OFF`.

### `frigate/<camera_name>/ptz_autotracker/state`

Topic with current state of the PTZ autotracker for a camera. Published values are `ON` and `OFF`.

### `frigate/<camera_name>/ptz_autotracker/active`

Topic to determine if PTZ autotracker is actively tracking an object. Published values are `ON` and `OFF`.

### `frigate/<camera_name>/review_alerts/set`

Topic to turn review alerts for a camera on or off. Expected values are `ON` and `OFF`.

### `frigate/<camera_name>/review_alerts/state`

Topic with current state of review alerts for a camera. Published values are `ON` and `OFF`.

### `frigate/<camera_name>/review_detections/set`

Topic to turn review detections for a camera on or off. Expected values are `ON` and `OFF`.

### `frigate/<camera_name>/review_detections/state`

Topic with current state of review detections for a camera. Published values are `ON` and `OFF`.

### `frigate/<camera_name>/object_descriptions/set`

Topic to turn generative AI object descriptions for a camera on or off. Expected values are `ON` and `OFF`.

### `frigate/<camera_name>/object_descriptions/state`

Topic with current state of generative AI object descriptions for a camera. Published values are `ON` and `OFF`.

### `frigate/<camera_name>/review_descriptions/set`

Topic to turn generative AI review descriptions for a camera on or off. Expected values are `ON` and `OFF`.

### `frigate/<camera_name>/review_descriptions/state`

Topic with current state of generative AI review descriptions for a camera. Published values are `ON` and `OFF`.

### `frigate/<camera_name>/birdseye/set`

Topic to turn Birdseye for a camera on and off. Expected values are `ON` and `OFF`. Birdseye mode
must be enabled in the configuration.

### `frigate/<camera_name>/birdseye/state`

Topic with current state of Birdseye for a camera. Published values are `ON` and `OFF`.

### `frigate/<camera_name>/birdseye_mode/set`

Topic to set Birdseye mode for a camera. Birdseye offers different modes to customize under which circumstances the camera is shown.

_Note: Changing the value from `CONTINUOUS` -> `MOTION | OBJECTS` will take up to 30 seconds for
the camera to be removed from the view._

| Command      | Description                                                       |
| ------------ | ----------------------------------------------------------------- |
| `CONTINUOUS` | Always included                                                   |
| `MOTION`     | Show when detected motion within the last 30 seconds are included |
| `OBJECTS`    | Shown if an active object tracked within the last 30 seconds      |

### `frigate/<camera_name>/birdseye_mode/state`

Topic with current state of the Birdseye mode for a camera. Published values are `CONTINUOUS`, `MOTION`, `OBJECTS`.

### `frigate/<camera_name>/notifications/set`

Topic to turn notifications on and off. Expected values are `ON` and `OFF`.

### `frigate/<camera_name>/notifications/state`

Topic with current state of notifications. Published values are `ON` and `OFF`.

### `frigate/<camera_name>/notifications/suspend`

Topic to suspend notifications for a certain number of minutes. Expected value is an integer.

### `frigate/<camera_name>/notifications/suspended`

Topic with timestamp that notifications are suspended until. Published value is a UNIX timestamp, or 0 if notifications are not suspended.
