Dominevo
ReferenceDevice capabilities

motion

Span timeout for a camera's attached sensors.

Span timeout for a camera's attached sensors. This is the pipeline-runner motionCooldownMs default: the window after which a heartbeat-only edge no longer counts. The span does not declare a separate cooldown.

At a glance

Capabilitymotion
Provided byThe device's own driver provides it: each device registers its own provider.
Active providers per deviceone
Device typescamera, sensor
Sourcepackages/types/src/capabilities/motion.cap.ts

Methods

Every method takes the device id (deviceId) to address the device; the input tables below list the other fields.

MethodKindRequired of a providerAccess
isDetectedqueryyesdefault

isDetected

query

Pull the current motion state synchronously. Convenience shortcut for consumers that don't need the full status object. A composed group answers from its slice: unknown throws, it is not off.

Input

No fields besides deviceId.

Output

boolean

Runtime state

The state Dominevo keeps for each device with this capability, readable without calling the provider.

Runtime-state slice — the last observed motion snapshot, mirrored by the kernel and readable cross-process via device.state.motion.value. Reads never invoke the provider, so UIs and other addons can poll the cached state safely.

FieldTypeRequiredDescription
detectedbooleanyes
lastDetectedAtnumber | nullyesMs epoch of the last detected-true observation. Null if never detected.
autoClearAfterMsnumber | nullyesMOTION_CLOSE_AFTER_MS while detected: true on a Camera device, null while false and on every Sensor device — see that constant's doc for the one-authority rule.

Events

onMotionChanged

Fires every time the runner transitions a camera between watching and active phases. source carries which motion path drove the transition; regions is populated only for source: 'analyzer' (frame-diff regions from the ML motion detector) — onboard sources don't carry per-frame regions here (camera-provided zones / AI metadata live in dedicated channels: detection.camera-native, future zone capability).

Consumers that want all motion pushes (even with detected unchanged) should subscribe to the status subscription via device-manager.subscribeDeviceStatusAggregate instead.

FieldTypeRequiredDescription
deviceIdnumberyes
detectedbooleanyes
timestampnumberyes
source"onboard" | "analyzer" | "device-activity"yes
regions({ bbox: { x: number; y: number; w: number; h: number }; pixelCount: number; intensity: number })[]no
triggeredBy{ kind: "camera" } | { kind: "sensor"; deviceId: number }noWho started it. Absent = the camera itself. Only onboard carries sensor.