Motion events¶
vision.detect.motion
Optic receives ONVIF camera events and stores them as episodes.
Camera events¶
ONVIF events become episodes:
- Motion — CellMotion
IsMotionand MotionAlarm:truemeans motion is present;falsemeans it has stopped. - Human and vehicle detection — Events carry the camera analytics results.
- Digital inputs — The camera reports input triggers.
- Inactivity timeout — The streamer closes episodes that stop receiving events.
The streamer maintains one motion episode per stream. It tracks all active motion sources on the camera; the waiting window starts when the last active source reports that motion has stopped.
Merging motion episodes (debounce)¶
After a signal that motion has stopped, the streamer waits 30 seconds before finally closing the episode. This window combines short gaps in motion into one episode.
- Gap shorter than 30 seconds — A new motion signal continues the previous episode with the same ID and start time. For example, motion returning after 5 seconds does not create a separate episode.
- Gap of 30 seconds or longer — The previous episode closes; subsequent motion creates a new one.
- The camera sends no motion-stop signal — A separate fallback timeout applies: 15 seconds without a new signal that motion is present.
Repeated false signals without a new true signal do not extend the waiting window.
When the window expires, the episode end time is the time of the last motion-stop signal. The 30-second wait is not added to the episode duration.
Example:
| Time | Event | Result |
|---|---|---|
| 10:00:00 | Motion starts | Episode starts |
| 10:00:10 | Motion stops | Waiting starts |
| 10:00:15 | Motion returns | The same episode continues |
| 10:00:20 | Motion stops | A new waiting window starts |
| From 10:00:50 | Motion has not returned | Episode closes with end time 10:00:20 |
The streamer sets the 30-second window; there is no separate field for it in the UI. The camera motion detection area is configured with a cell mask.
When the stream stops, its open episodes close immediately; the waiting window does not continue after the stop.
Configuring the detection area¶
Select the cells on the Analytics tab and save the rule; see motion detector cell settings.