Dominevo
ReferenceDevice capabilities

native-object-detection

On-camera AI object detection cap.

On-camera AI object detection cap. Surfaces per-device the classes the firmware can detect and the last-seen instance of each. The provider also fan-outs these to the global detection.camera-native event bus with source: 'onboard' so cross-cutting system services (alert-center, advanced-notifier, recording-engine) can subscribe once and receive events from every camera.

Distinct from motion-detection (ML pipeline) and motion (hardware PIR or firmware motion pulse): this cap is specifically the AI classifier output coming FROM the camera, not the local pipeline.

At a glance

Capabilitynative-object-detection
Provided byThe device's own driver provides it: each device registers its own provider.
Active providers per deviceone
Device typescamera
Sourcepackages/types/src/capabilities/native-object-detection.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
getOptionsqueryyesdefault
setSettingsmutationyesadmin
setEnabledmutationyesadmin

getOptions

query

Input

No fields besides deviceId.

Output

FieldTypeRequiredDescription
supportedClasses("person" | "vehicle" | "animal" | "face" | "package" | "other")[]yesClasses this firmware can detect — the same list the status reports.
geometry"boxed" | "while-streaming" | "flag-only"yesWhat a detection from this camera carries.

setSettings

mutation

Input

FieldTypeRequiredDescription
settings{ enabled?: boolean }yes

Output

Nothing.

setEnabled

mutation

Input

FieldTypeRequiredDescription
enabledbooleanyes

Output

Nothing.

Actions (offered in automations and on device cards)

ActionLabelSets
nativeDetection.onOn-camera detection on
nativeDetection.offOn-camera detection off

Runtime state

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

FieldTypeRequiredDescription
lastByClassRecord<"person" | "vehicle" | "animal" | "face" | "package" | "other", { class: "person" | "vehicle" | "animal" | "face" | "package" | "other"; timestamp: number; confidence?: number } | null>yes
supportedClasses("person" | "vehicle" | "animal" | "face" | "package" | "other")[]yes
enabledbooleanyes
lastFetchedAtnumberyesRequired by createRuntimeStateBridge — epoch ms of last refresh.

Status

FieldTypeRequiredDescription
lastByClassRecord<"person" | "vehicle" | "animal" | "face" | "package" | "other", { class: "person" | "vehicle" | "animal" | "face" | "package" | "other"; timestamp: number; confidence?: number } | null>yesLast observed instance per class. Missing entries mean the class is supported but nothing has been seen since the provider started. MUST be a partial record: providers seed an empty {} on cold-start and write one class at a time as detections arrive. In Zod 4 z.record(enum, …) is EXHAUSTIVE (requires every enum key), so a partial write throws "expected object, received undefined" for every unseen class. z.partialRecord keeps the enum-key narrowing while allowing the sparse shape the providers actually write.
supportedClasses("person" | "vehicle" | "animal" | "face" | "package" | "other")[]yesClasses the firmware is capable of detecting — enumerated at device register.
enabledbooleanyesWhether forwarding of onboard AI detections is enabled for this device. Cold-start OFF on every camera. A vendor does not decide which detector a camera runs — that is the operator's choice, and it is made where every other detection choice is made. geometry on { choice would buy this particular camera.

Events

onDetected

FieldTypeRequiredDescription
deviceIdnumberyes
detection{ class: "person" | "vehicle" | "animal" | "face" | "package" | "other"; timestamp: number; confidence?: number }yes