Skip to content

set_camera_recording_mode

Set a camera’s recording mode (always, motion, or never).

Side effects:

  • PATCHes recordingSettings.mode on the camera. Takes effect immediately; never halts new clip writes.
  • Mutates controller state. Use dry_run=True to preview the change without applying.
set_camera_recording_mode(camera_id="65f...", mode="motion")
ParameterTypeRequiredDefaultDescription
camera_idstringyesProtect camera id.
modestringyesOne of "always", "motion", "never".
controllerstringno”default”Name of the UniFi controller to target. Defaults to "default".
dry_runbooleannofalsePreview the change without applying it. Returns the predicted change set.