Skip to content

list_motion_events

List motion events in the last hours_back hours.

Side effects: None (read-only).

Filters Protect’s event stream to entries with type == "motion" within the requested window. camera_id narrows the result set to one camera; an empty string returns motion across every bonded camera.

list_motion_events(camera_id="65f...", limit=20, hours_back=6)
ParameterTypeRequiredDefaultDescription
camera_idstringno""Protect camera id. Empty (default) returns motion across all cameras.
limitintegerno50Maximum number of events returned. Defaults to 50.
hours_backintegerno24Look-back window in hours from now. Defaults to 24.
controllerstringno”default”Name of the UniFi controller to target. Defaults to "default".