list_motion_events
list_motion_events
Section titled “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.
Example
Section titled “Example”list_motion_events(camera_id="65f...", limit=20, hours_back=6)Parameters
Section titled “Parameters”| 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". |