Dominevo
ReferenceDevice capabilities

motion-detection

The motion-detection device capability: methods, state and events.

The definition carries no description.

At a glance

Capabilitymotion-detection
Provided byAn addon wraps the device and provides it. It is bound to a device through the device bindings and can be bound automatically to compatible devices.
Active providers per deviceone
Device typescamera
Sourcepackages/types/src/capabilities/motion-detection.cap.ts

Methods

MethodKindRequired of a providerAccess
analyzemutationyesdefault
removeCameramutationyesdefault
resetmutationyesdefault

analyze

mutation

Exactly one of frame / frameHandle carries the pixels. frame ships gray pixels inline (today's path). frameHandle (CB5) names the same shm ring slot so a hub-local motion provider reads pixels back zero-copy instead of re-serialising them over UDS. A recycled slot / foreign handle yields a null read → empty result (the runner ships frame as the fallback, queue-depth gated). The pipeline's own frame analysis: never a viewer's call.

Input

FieldTypeRequiredDescription
deviceIdnumberyes
frame{ data: binary or opaque value; format: "jpeg" | "rgb" | "bgr" | "yuv420" | "gray"; width: number; height: number; timestamp: number }no
frameHandle{ shmId: string; slot: number; seq: number; width: number; height: number; format: "jpeg" | "rgb" | "bgr" | "yuv420" | "gray"; pts: number; byteLength: number; nodeId: string; slotCount: number }no

Output

FieldTypeRequiredDescription
detectedbooleanyes
regionCountnumberyes
regions({ bbox: { x: number; y: number; w: number; h: number }; pixelCount: number; intensity: number })[]yesRegions passing minArea filter — used for pipeline triggering.
rawRegions({ bbox: { x: number; y: number; w: number; h: number }; pixelCount: number; intensity: number })[]yesAll raw regions from CCL before minArea filter — used for UI debug overlay.
frameWidthnumberyes
frameHeightnumberyes
analysisMsnumberyes

removeCamera

mutation

Input

FieldTypeRequiredDescription
deviceIdnumberyes

Output

Nothing.

reset

mutation

Input

void

Output

Nothing.

Events

onMotion

FieldTypeRequiredDescription
deviceIdnumberyes
detectedbooleanyes
regionCountnumberyes