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).
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).
Why a NEW cap rather than overloading ptz:
ptzmoves a gimbal on a fixed camera (pan/tilt/zoom of the lens). A robot vacuum has no gimbal — the whole chassis drives, turns and spins. The two are different physical models: PTZ is absolute-position + presets, navigation is momentary drive nudges + discrete robot ACTIONS (dock / spot-clean / follow-pet / go-to-point / …).- This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than the reverse:
- a native Dominevo navigation panel (data-driven from
listActions/getOptions), and - the PTZ surface — a thin adapter mimics
ptzfromnavigationso a robot camera shows up in the existing PTZ control path without every PTZ provider learning about robots. The mapping lives in the adapter, not here (see the addon design note): ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt}) ptz.stop() → navigation.stop() ptz.goHome() → navigation.runAction('goHome') ptz.getPresets() → navigation.listActions() (id→preset) ptz.goToPreset(id) → navigation.runAction(id)
At a glance
| Capability | navigation |
| Provided by | The device's own driver provides it: each device registers its own provider. |
| Active providers per device | one |
| Device types | camera |
| Device settings | Yes: its settings section on the device page is built from this capability's methods. |
| Source | packages/types/src/capabilities/navigation.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 |
|---|---|---|---|
move | mutation | yes | default |
stop | mutation | yes | default |
goToPoint | mutation | yes | default |
listActions | query | yes | default |
runAction | mutation | yes | default |
playSound | mutation | yes | default |
setLightOn | mutation | yes | default |
setLightMode | mutation | yes | default |
setLightLevel | mutation | yes | default |
getFeatures | query | yes | default |
move
mutation
Momentary drive nudge (the robot moves). protected — mirrors ptz.continuousMove so the Viewer navigation panel (and the PTZ-mimic path) works for any authenticated user, not admin-only. The UI sends these at ~1 Hz while a control is held; the provider forwards each one to a single drive write WITHOUT debouncing.
Input
| Field | Type | Required | Description |
|---|---|---|---|
pan | number | no | |
tilt | number | no | |
speed | number | no |
Output
Nothing.
stop
mutation
Halt all motion immediately (zero drive vector).
Input
No fields besides deviceId.
Output
Nothing.
Actions (offered in automations and on device cards)
| Action | Label | Sets |
|---|---|---|
navigation.stop | Stop |
goToPoint
mutation
Send the robot to a point on its live map.
Input
| Field | Type | Required | Description |
|---|---|---|---|
x | number | yes | |
y | number | yes |
Output
Nothing.
listActions
query
Enumerate the discrete controls THIS device supports (data-driven UI + PTZ mimic). Camera-probed subset of {
Input
No fields besides deviceId.
Output
({ id: string; kind: "action" | "sound"; label: string; icon: string; soundId?: number; enabled: boolean })[]
runAction
mutation
Run one discrete action (a kind:'action' dictionary entry). Invalid / unsupported action ids are rejected by the provider.
Input
| Field | Type | Required | Description |
|---|---|---|---|
actionId | "goHome" | "locate" | "spotClean" | "findPet" | "personFollow" | "stop" | "startClean" | "pauseClean" | "dockWash" | "autoEmpty" | "flashOn" | "flashOff" | yes |
Output
Nothing.
Actions (offered in automations and on device cards)
| Action | Label | Sets |
|---|---|---|
navigation.runAction | Run a routine |
playSound
mutation
Play a sound by its wire id (the soundId of a kind:'sound' entry).
Input
| Field | Type | Required | Description |
|---|---|---|---|
soundId | number | yes |
Output
Nothing.
Actions (offered in automations and on device cards)
| Action | Label | Sets |
|---|---|---|
navigation.playSound | Play sound |
setLightOn
mutation
Turn the on-camera fill light on / off (the OpenFullLight control — works anytime, no active stream required).
Input
| Field | Type | Required | Description |
|---|---|---|---|
on | boolean | yes |
Output
Nothing.
Actions (offered in automations and on device cards)
| Action | Label | Sets |
|---|---|---|
navigation.lightOn | Light on | |
navigation.lightOff | Light off |
setLightMode
mutation
Set the fill-light mode (auto vs manual). manual optionally carries the initial level. The auto/manual + level control is a CAMERA-service action that generally needs an active camera stream/monitor session — the UI shows the manual level slider ONLY when mode === 'manual'.
Input
| Field | Type | Required | Description |
|---|---|---|---|
mode | "auto" | "manual" | yes | |
level | number | no |
Output
Nothing.
Actions (offered in automations and on device cards)
| Action | Label | Sets |
|---|---|---|
navigation.lightAuto | Light automatic |
setLightLevel
mutation
Set the MANUAL fill-light level (40..100). Implies manual mode.
Input
| Field | Type | Required | Description |
|---|---|---|---|
level | number | yes |
Output
Nothing.
Actions (offered in automations and on device cards)
| Action | Label | Sets |
|---|---|---|
navigation.lightLevel | Set light level |
getFeatures
query
Per-device FEATURE-FLAG report for the general primitives — drives which controls the UI shows (the per-entry flags for the dictionary come back on listActions).
Input
No fields besides deviceId.
Output
── Per-device feature flags (getFeatures) ──────────────────────────
Per-device FEATURE-FLAG report for the general (non-dictionary) primitives. The cap reports which are enabled so the UI / PTZ render only the controls that are turned on for THIS device. Data-driven: the provider derives these from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags live on { that are not dictionary entries.
move/stop— the momentary drive joystick.goToPoint— send-to-map-coordinate. Ships OFF on Dreame until the map-coordinate plumbing is wired.runAction— the discrete action buttons (dictionarykind:'action').playSound— the sound buttons (dictionarykind:'sound').light— the on/off fill-light toggle (works anytime).lightMode— the auto/manual selector + manual level slider (a camera-service control; needs an active stream).
| Field | Type | Required | Description |
|---|---|---|---|
move | boolean | yes | |
stop | boolean | yes | |
goToPoint | boolean | yes | |
runAction | boolean | yes | |
playSound | boolean | yes | |
light | boolean | yes | |
lightMode | boolean | yes |
Runtime state
The state Dominevo keeps for each device with this capability, readable without calling the provider.
Runtime-state slice mirrored by the kernel. The navigation panel watches it for live mode / follow / flash changes.
| Field | Type | Required | Description |
|---|---|---|---|
mode | "idle" | "cleaning" | "spot" | "following" | "goto" | "returning" | "paused" | "unknown" | yes | |
following | boolean | yes | |
flash | boolean | yes | |
lightMode | "auto" | "manual" | yes | |
lightLevel | number | yes | |
lastChangedAt | number | yes | |
lastFetchedAt | number | yes |
Status
| Field | Type | Required | Description |
|---|---|---|---|
mode | "idle" | "cleaning" | "spot" | "following" | "goto" | "returning" | "paused" | "unknown" | yes | |
following | boolean | yes | |
flash | boolean | yes | |
lightMode | "auto" | "manual" | yes | |
lightLevel | number | yes | |
lastChangedAt | number | yes | Ms epoch when the slice was last updated. |
Events
onStatusChanged
| Field | Type | Required | Description |
|---|---|---|---|
deviceId | number | yes | |
status | { mode: "idle" | "cleaning" | "spot" | "following" | "goto" | "returning" | "paused" | "unknown"; following: boolean; flash: boolean; lightMode: "auto" | "manual"; lightLevel: number; lastChangedAt: number } | yes |