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
| Capability | native-object-detection |
| Provided by | The device's own driver provides it: each device registers its own provider. |
| Active providers per device | one |
| Device types | camera |
| Source | packages/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.
| Method | Kind | Required of a provider | Access |
|---|---|---|---|
getOptions | query | yes | default |
setSettings | mutation | yes | admin |
setEnabled | mutation | yes | admin |
getOptions
query
Input
No fields besides deviceId.
Output
| Field | Type | Required | Description |
|---|---|---|---|
supportedClasses | ("person" | "vehicle" | "animal" | "face" | "package" | "other")[] | yes | Classes this firmware can detect — the same list the status reports. |
geometry | "boxed" | "while-streaming" | "flag-only" | yes | What a detection from this camera carries. |
setSettings
mutation
Input
| Field | Type | Required | Description |
|---|---|---|---|
settings | { enabled?: boolean } | yes |
Output
Nothing.
setEnabled
mutation
Input
| Field | Type | Required | Description |
|---|---|---|---|
enabled | boolean | yes |
Output
Nothing.
Actions (offered in automations and on device cards)
| Action | Label | Sets |
|---|---|---|
nativeDetection.on | On-camera detection on | |
nativeDetection.off | On-camera detection off |
Runtime state
The state Dominevo keeps for each device with this capability, readable without calling the provider.
| Field | Type | Required | Description |
|---|---|---|---|
lastByClass | Record<"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 | |
enabled | boolean | yes | |
lastFetchedAt | number | yes | Required by createRuntimeStateBridge — epoch ms of last refresh. |
Status
| Field | Type | Required | Description |
|---|---|---|---|
lastByClass | Record<"person" | "vehicle" | "animal" | "face" | "package" | "other", { class: "person" | "vehicle" | "animal" | "face" | "package" | "other"; timestamp: number; confidence?: number } | null> | yes | Last 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")[] | yes | Classes the firmware is capable of detecting — enumerated at device register. |
enabled | boolean | yes | Whether 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
| Field | Type | Required | Description |
|---|---|---|---|
deviceId | number | yes | |
detection | { class: "person" | "vehicle" | "animal" | "face" | "package" | "other"; timestamp: number; confidence?: number } | yes |
motion-zones
Motion-zones share the same MaskShape vocabulary as privacy-mask — the on-camera motion-detection mask is a single grid region (a row-major boolean cell lattice the camera's onboard VMD evaluates).
navigation
navigation — a device-scoped capability that natively expresses the FULL navigation / action surface of a robot that DRIVES ITSELF and carries an on-board camera (the Dreame robot-vacuum camera is the first provider).