Frigate icon

Frigate

Control Frigate over its real-time /ws API

Set Motion Mask

AI-generated

Summary

Enable or disable a named motion mask on a Frigate camera

Inputs

  • camera (required) — The camera name as configured in Frigate
  • value (required) — Whether to turn the motion mask on or off
  • maskName (required) — The configured mask name
  • awaitState — Whether to keep the socket open and wait for the /state read-back to confirm the new value
  • awaitTimeoutMs — How long to wait for the /state read-back before giving up (milliseconds)

Output shape

A JSON object representing the publish result; it always contains operation, topic, payload and published:true, and may additionally include confirmed and stateValue when awaitState is true

When awaitState is true the returned object also includes a boolean confirmed indicating whether the new value was confirmed by Frigate and the returned stateValue; otherwise these fields are absent

Examples

Example 1: Enable driveway motion mask

camera=front_door, value=ON, maskName=driveway_mask, awaitState=true

Example 2: Disable motion mask without waiting

camera=front_door, value=OFF, maskName=driveway_mask, awaitState=false

Example 3: Toggle mask with timeout

camera=front_door, value=ON, maskName=driveway_mask, awaitState=true, awaitTimeoutMs=10000

Links

Discussion