get_motion_events
Retrieve recent UniFi Protect camera motion events with camera names and timestamps. Filter by camera or lookback window to review raw motion activity.
Instructions
Return recent camera motion events, resolved to camera names and timestamps.
Read-only operation: it queries Protect motion events over the lookback window, maps each event to its camera name and a human-readable timestamp, and returns the count and per-event list. Requires Protect username/password credentials configured for the console. Use get_smart_detections instead when you need AI classification (person/vehicle/animal/package) rather than raw motion; use get_protect_event_summary for aggregate counts.
Args: hours: Lookback window in hours from now (default 24). limit: Maximum number of events to return (default 50). camera_id: Optional Protect camera identifier or name to filter events to one camera; omit for all cameras. device: Optional Protect console name to target a specific UniFi Protect device; omit to use the first Protect-enabled device.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hours | No | Lookback window in hours from now (default 24). | |
| limit | No | Maximum number of events to return (default 50). | |
| device | No | Optional Protect console name to target a specific UniFi Protect device; omit to use the first Protect-enabled device. | |
| camera_id | No | Optional Protect camera identifier or name to filter events to one camera; omit for all cameras. |