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)
Parameter Type Required Default Description
camera_id string no “” Protect camera id. Empty (default) returns motion across all cameras.
limit integer no 50 Maximum number of events returned. Defaults to 50.
hours_back integer no 24 Look-back window in hours from now. Defaults to 24.
controller string no “default” Name of the UniFi controller to target. Defaults to "default".