Dominevo
ReferenceDevice capabilities

zones

Zones capability — per-camera CRUD over polygon detection zones.

Zones capability — per-camera CRUD over polygon detection zones.

Provider lives in addon-pipeline-orchestrator (hub-only). Persists to per-device settings and mirrors into the zones device-state slice on every mutation, so downstream consumers can subscribe via dev.state.zones.onChanged.

The cap surface only handles geometry + identity; filtering behaviour (per-class, include/exclude, threshold) lives in the consumer addons' rule arrays — see ZoneRuleSchema exported from capabilities/schemas/zone-rule.js.

At a glance

Capabilityzones
Provided byOne addon provides it for every device and answers by device id.
Active providers per deviceone
Device typescamera
Sourcepackages/types/src/capabilities/zones.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
listZonesqueryyesdefault
addZonemutationyesadmin
removeZonemutationyesadmin
updateZonemutationyesadmin

listZones

query

Input

No fields besides deviceId.

Output

({ id: string; name: string; kind?: "polygon" | "tripwire"; polygon: ({ x: number; y: number })[]; color?: string })[]

addZone

mutation

Input

FieldTypeRequiredDescription
zone{ id: string; name: string; kind?: "polygon" | "tripwire"; polygon: ({ x: number; y: number })[]; color?: string }yes

Output

Nothing.

removeZone

mutation

Input

FieldTypeRequiredDescription
zoneIdstringyes

Output

Nothing.

updateZone

mutation

Input

FieldTypeRequiredDescription
zone{ id: string; name: string; kind?: "polygon" | "tripwire"; polygon: ({ x: number; y: number })[]; color?: string }yes

Output

Nothing.

Runtime state

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

Runtime-state slice — the live zone catalogue mirrored by the orchestrator on every CRUD mutation. Consumers read via device.state.zones.value / .watch(...) without round-tripping the cap, and the codegen DeviceProxy auto-wires the reactive handle. Slice shape is { zones: Zone[] } so future extensions (e.g. zone groupings) can sit alongside the polygon list.

FieldTypeRequiredDescription
zones({ id: string; name: string; kind?: "polygon" | "tripwire"; polygon: ({ x: number; y: number })[]; color?: string })[]yes