@camstack/addon-decoder-nodeav 1.2.70 → 1.2.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +307 -0
- package/dist/index.mjs +307 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -26945,6 +26945,203 @@ DeviceType.Camera, method(object({ deviceId: number() }), PtzAutotrackStatusSche
|
|
|
26945
26945
|
deviceId: number(),
|
|
26946
26946
|
status: PtzAutotrackStatusSchema
|
|
26947
26947
|
});
|
|
26948
|
+
/**
|
|
26949
|
+
* `navigation` — a device-scoped capability that natively expresses the FULL
|
|
26950
|
+
* navigation / action surface of a robot that DRIVES ITSELF and carries an
|
|
26951
|
+
* on-board camera (the Dreame robot-vacuum camera is the first provider).
|
|
26952
|
+
*
|
|
26953
|
+
* Why a NEW cap rather than overloading `ptz`:
|
|
26954
|
+
* - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
|
|
26955
|
+
* robot vacuum has no gimbal — the whole chassis drives, turns and spins.
|
|
26956
|
+
* The two are different physical models: PTZ is absolute-position + presets,
|
|
26957
|
+
* navigation is momentary drive nudges + discrete robot ACTIONS
|
|
26958
|
+
* (dock / spot-clean / follow-pet / go-to-point / …).
|
|
26959
|
+
* - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
|
|
26960
|
+
* the reverse:
|
|
26961
|
+
* 1. a native CamStack navigation panel (data-driven from `listActions`
|
|
26962
|
+
* / `getOptions`), and
|
|
26963
|
+
* 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
|
|
26964
|
+
* robot camera shows up in the existing PTZ control path without every
|
|
26965
|
+
* PTZ provider learning about robots. The mapping lives in the adapter,
|
|
26966
|
+
* not here (see the addon design note):
|
|
26967
|
+
* ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
|
|
26968
|
+
* ptz.stop() → navigation.stop()
|
|
26969
|
+
* ptz.goHome() → navigation.runAction('goHome')
|
|
26970
|
+
* ptz.getPresets() → navigation.listActions() (id→preset)
|
|
26971
|
+
* ptz.goToPreset(id) → navigation.runAction(id)
|
|
26972
|
+
*
|
|
26973
|
+
* ## Continuous drive
|
|
26974
|
+
*
|
|
26975
|
+
* `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
|
|
26976
|
+
* sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
|
|
26977
|
+
* one `stop()` on release — exactly like the robot app's remote-drive joystick.
|
|
26978
|
+
* The provider forwards EACH `move` to one drive write; it must NOT debounce or
|
|
26979
|
+
* coalesce them. The UI owns the cadence.
|
|
26980
|
+
*
|
|
26981
|
+
* ## The action dictionary
|
|
26982
|
+
*
|
|
26983
|
+
* The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
|
|
26984
|
+
* are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
|
|
26985
|
+
* carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
|
|
26986
|
+
* native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
|
|
26987
|
+
* vendor-specific list. `kind: 'action'` entries are triggered with
|
|
26988
|
+
* `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
|
|
26989
|
+
* (the entry carries the `soundId` to pass). The general primitives — `move`,
|
|
26990
|
+
* `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
|
|
26991
|
+
*
|
|
26992
|
+
* NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
|
|
26993
|
+
* `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
|
|
26994
|
+
* that the currently-published `@apocaliss92/nodedreame` already exposes on
|
|
26995
|
+
* every device handle. A future nodedreame publish adds a typed
|
|
26996
|
+
* `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
|
|
26997
|
+
* provider can then swap the raw calls for the typed methods with no change to
|
|
26998
|
+
* THIS contract.
|
|
26999
|
+
*/
|
|
27000
|
+
/**
|
|
27001
|
+
* A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
|
|
27002
|
+
* keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
|
|
27003
|
+
* halts it.
|
|
27004
|
+
*
|
|
27005
|
+
* - `pan` — turn: negative = left, positive = right, 0 = straight.
|
|
27006
|
+
* - `tilt` — throttle: positive = forward, negative = spin / turn-around.
|
|
27007
|
+
* - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
|
|
27008
|
+
* vector by it (drivers without proportional drive ignore it).
|
|
27009
|
+
*
|
|
27010
|
+
* `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
|
|
27011
|
+
* axis alone; an all-undefined nudge is a no-op.
|
|
27012
|
+
*/
|
|
27013
|
+
var NavigationMoveCommandSchema = object({
|
|
27014
|
+
pan: number().min(-1).max(1).optional(),
|
|
27015
|
+
tilt: number().min(-1).max(1).optional(),
|
|
27016
|
+
speed: number().min(0).max(1).optional()
|
|
27017
|
+
});
|
|
27018
|
+
/**
|
|
27019
|
+
* The enumerated discrete actions a navigation-capable robot can perform via
|
|
27020
|
+
* `runAction`. This is the CLOSED vocabulary; a given device advertises the
|
|
27021
|
+
* subset it supports through `listActions`. Sounds are NOT here — they go through
|
|
27022
|
+
* `playSound` (see the `sound` dictionary entries).
|
|
27023
|
+
*/
|
|
27024
|
+
var NavigationActionIdSchema = _enum([
|
|
27025
|
+
"goHome",
|
|
27026
|
+
"locate",
|
|
27027
|
+
"spotClean",
|
|
27028
|
+
"findPet",
|
|
27029
|
+
"personFollow",
|
|
27030
|
+
"stop",
|
|
27031
|
+
"startClean",
|
|
27032
|
+
"pauseClean",
|
|
27033
|
+
"dockWash",
|
|
27034
|
+
"autoEmpty",
|
|
27035
|
+
"flashOn",
|
|
27036
|
+
"flashOff"
|
|
27037
|
+
]);
|
|
27038
|
+
/** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
|
|
27039
|
+
var NavigationEntryKindSchema = _enum(["action", "sound"]);
|
|
27040
|
+
/**
|
|
27041
|
+
* One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
|
|
27042
|
+
* native panel and the PTZ mimic render as a button.
|
|
27043
|
+
*
|
|
27044
|
+
* - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
|
|
27045
|
+
* (pass to `runAction`); for `kind:'sound'` it is a namespaced id
|
|
27046
|
+
* (`sound:meow`) whose `soundId` is passed to `playSound`.
|
|
27047
|
+
* - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
|
|
27048
|
+
* - `label` — operator-facing English label.
|
|
27049
|
+
* - `soundId` — wire sound id, present only on `kind:'sound'` entries.
|
|
27050
|
+
* - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
|
|
27051
|
+
* PTZ render ONLY enabled entries. Data-driven: the provider
|
|
27052
|
+
* flips it from config, never by editing code.
|
|
27053
|
+
*/
|
|
27054
|
+
var NavigationActionEntrySchema = object({
|
|
27055
|
+
id: string(),
|
|
27056
|
+
kind: NavigationEntryKindSchema,
|
|
27057
|
+
label: string(),
|
|
27058
|
+
icon: string(),
|
|
27059
|
+
/** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
|
|
27060
|
+
soundId: number().int().optional(),
|
|
27061
|
+
/** Per-device feature flag — render this entry only when true. */
|
|
27062
|
+
enabled: boolean()
|
|
27063
|
+
});
|
|
27064
|
+
/** Coordinates for `goToPoint` — a point on the robot's live map. */
|
|
27065
|
+
var NavigationPointSchema = object({
|
|
27066
|
+
x: number(),
|
|
27067
|
+
y: number()
|
|
27068
|
+
});
|
|
27069
|
+
/**
|
|
27070
|
+
* Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
|
|
27071
|
+
* The cap reports which are enabled so the UI / PTZ render only the controls
|
|
27072
|
+
* that are turned on for THIS device. Data-driven: the provider derives these
|
|
27073
|
+
* from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
|
|
27074
|
+
* live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
|
|
27075
|
+
* that are not dictionary entries.
|
|
27076
|
+
*
|
|
27077
|
+
* - `move` / `stop` — the momentary drive joystick.
|
|
27078
|
+
* - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
|
|
27079
|
+
* map-coordinate plumbing is wired.
|
|
27080
|
+
* - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
|
|
27081
|
+
* - `playSound` — the sound buttons (dictionary `kind:'sound'`).
|
|
27082
|
+
* - `light` — the on/off fill-light toggle (works anytime).
|
|
27083
|
+
* - `lightMode` — the auto/manual selector + manual level slider (a
|
|
27084
|
+
* camera-service control; needs an active stream).
|
|
27085
|
+
*/
|
|
27086
|
+
var NavigationFeaturesSchema = object({
|
|
27087
|
+
move: boolean(),
|
|
27088
|
+
stop: boolean(),
|
|
27089
|
+
goToPoint: boolean(),
|
|
27090
|
+
runAction: boolean(),
|
|
27091
|
+
playSound: boolean(),
|
|
27092
|
+
light: boolean(),
|
|
27093
|
+
lightMode: boolean()
|
|
27094
|
+
});
|
|
27095
|
+
/** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
|
|
27096
|
+
var NavigationLightModeSchema = _enum(["auto", "manual"]);
|
|
27097
|
+
/**
|
|
27098
|
+
* Live navigation state so the UI can reflect what the robot is doing:
|
|
27099
|
+
* - `mode` — coarse activity (idle / cleaning / following / …).
|
|
27100
|
+
* - `following` — person/pet follow is currently armed.
|
|
27101
|
+
* - `flash` — the on-camera fill light is on.
|
|
27102
|
+
* - `lightMode` — auto vs manual fill-light mode.
|
|
27103
|
+
* - `lightLevel` — manual fill-light level (40..100); meaningful when
|
|
27104
|
+
* `lightMode === 'manual'`.
|
|
27105
|
+
*/
|
|
27106
|
+
var NavigationStatusSchema = object({
|
|
27107
|
+
mode: _enum([
|
|
27108
|
+
"idle",
|
|
27109
|
+
"cleaning",
|
|
27110
|
+
"spot",
|
|
27111
|
+
"following",
|
|
27112
|
+
"goto",
|
|
27113
|
+
"returning",
|
|
27114
|
+
"paused",
|
|
27115
|
+
"unknown"
|
|
27116
|
+
]),
|
|
27117
|
+
following: boolean(),
|
|
27118
|
+
flash: boolean(),
|
|
27119
|
+
lightMode: NavigationLightModeSchema,
|
|
27120
|
+
lightLevel: number().min(40).max(100),
|
|
27121
|
+
/** Ms epoch when the slice was last updated. */
|
|
27122
|
+
lastChangedAt: number()
|
|
27123
|
+
});
|
|
27124
|
+
NavigationStatusSchema.extend({ lastFetchedAt: number() });
|
|
27125
|
+
DeviceType.Camera, method(NavigationMoveCommandSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(NavigationPointSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), array(NavigationActionEntrySchema)), method(object({
|
|
27126
|
+
deviceId: number(),
|
|
27127
|
+
actionId: NavigationActionIdSchema
|
|
27128
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
27129
|
+
deviceId: number(),
|
|
27130
|
+
soundId: number().int()
|
|
27131
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
27132
|
+
deviceId: number(),
|
|
27133
|
+
on: boolean()
|
|
27134
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
27135
|
+
deviceId: number(),
|
|
27136
|
+
mode: NavigationLightModeSchema,
|
|
27137
|
+
level: number().min(40).max(100).optional()
|
|
27138
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
27139
|
+
deviceId: number(),
|
|
27140
|
+
level: number().min(40).max(100)
|
|
27141
|
+
}), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
|
|
27142
|
+
deviceId: number(),
|
|
27143
|
+
status: NavigationStatusSchema
|
|
27144
|
+
});
|
|
26948
27145
|
DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
|
|
26949
27146
|
kind: "mutation",
|
|
26950
27147
|
auth: "admin"
|
|
@@ -32009,6 +32206,66 @@ Object.freeze({
|
|
|
32009
32206
|
addonId: null,
|
|
32010
32207
|
access: "create"
|
|
32011
32208
|
},
|
|
32209
|
+
"navigation.getFeatures": {
|
|
32210
|
+
capName: "navigation",
|
|
32211
|
+
capScope: "device",
|
|
32212
|
+
addonId: null,
|
|
32213
|
+
access: "view"
|
|
32214
|
+
},
|
|
32215
|
+
"navigation.goToPoint": {
|
|
32216
|
+
capName: "navigation",
|
|
32217
|
+
capScope: "device",
|
|
32218
|
+
addonId: null,
|
|
32219
|
+
access: "create"
|
|
32220
|
+
},
|
|
32221
|
+
"navigation.listActions": {
|
|
32222
|
+
capName: "navigation",
|
|
32223
|
+
capScope: "device",
|
|
32224
|
+
addonId: null,
|
|
32225
|
+
access: "view"
|
|
32226
|
+
},
|
|
32227
|
+
"navigation.move": {
|
|
32228
|
+
capName: "navigation",
|
|
32229
|
+
capScope: "device",
|
|
32230
|
+
addonId: null,
|
|
32231
|
+
access: "create"
|
|
32232
|
+
},
|
|
32233
|
+
"navigation.playSound": {
|
|
32234
|
+
capName: "navigation",
|
|
32235
|
+
capScope: "device",
|
|
32236
|
+
addonId: null,
|
|
32237
|
+
access: "create"
|
|
32238
|
+
},
|
|
32239
|
+
"navigation.runAction": {
|
|
32240
|
+
capName: "navigation",
|
|
32241
|
+
capScope: "device",
|
|
32242
|
+
addonId: null,
|
|
32243
|
+
access: "create"
|
|
32244
|
+
},
|
|
32245
|
+
"navigation.setLightLevel": {
|
|
32246
|
+
capName: "navigation",
|
|
32247
|
+
capScope: "device",
|
|
32248
|
+
addonId: null,
|
|
32249
|
+
access: "create"
|
|
32250
|
+
},
|
|
32251
|
+
"navigation.setLightMode": {
|
|
32252
|
+
capName: "navigation",
|
|
32253
|
+
capScope: "device",
|
|
32254
|
+
addonId: null,
|
|
32255
|
+
access: "create"
|
|
32256
|
+
},
|
|
32257
|
+
"navigation.setLightOn": {
|
|
32258
|
+
capName: "navigation",
|
|
32259
|
+
capScope: "device",
|
|
32260
|
+
addonId: null,
|
|
32261
|
+
access: "create"
|
|
32262
|
+
},
|
|
32263
|
+
"navigation.stop": {
|
|
32264
|
+
capName: "navigation",
|
|
32265
|
+
capScope: "device",
|
|
32266
|
+
addonId: null,
|
|
32267
|
+
access: "create"
|
|
32268
|
+
},
|
|
32012
32269
|
"networkAccess.getEndpoint": {
|
|
32013
32270
|
capName: "network-access",
|
|
32014
32271
|
capScope: "system",
|
|
@@ -36104,6 +36361,56 @@ Object.freeze({
|
|
|
36104
36361
|
form: "single",
|
|
36105
36362
|
optional: false
|
|
36106
36363
|
}],
|
|
36364
|
+
"navigation.getFeatures": [{
|
|
36365
|
+
name: "deviceId",
|
|
36366
|
+
form: "single",
|
|
36367
|
+
optional: false
|
|
36368
|
+
}],
|
|
36369
|
+
"navigation.goToPoint": [{
|
|
36370
|
+
name: "deviceId",
|
|
36371
|
+
form: "single",
|
|
36372
|
+
optional: false
|
|
36373
|
+
}],
|
|
36374
|
+
"navigation.listActions": [{
|
|
36375
|
+
name: "deviceId",
|
|
36376
|
+
form: "single",
|
|
36377
|
+
optional: false
|
|
36378
|
+
}],
|
|
36379
|
+
"navigation.move": [{
|
|
36380
|
+
name: "deviceId",
|
|
36381
|
+
form: "single",
|
|
36382
|
+
optional: false
|
|
36383
|
+
}],
|
|
36384
|
+
"navigation.playSound": [{
|
|
36385
|
+
name: "deviceId",
|
|
36386
|
+
form: "single",
|
|
36387
|
+
optional: false
|
|
36388
|
+
}],
|
|
36389
|
+
"navigation.runAction": [{
|
|
36390
|
+
name: "deviceId",
|
|
36391
|
+
form: "single",
|
|
36392
|
+
optional: false
|
|
36393
|
+
}],
|
|
36394
|
+
"navigation.setLightLevel": [{
|
|
36395
|
+
name: "deviceId",
|
|
36396
|
+
form: "single",
|
|
36397
|
+
optional: false
|
|
36398
|
+
}],
|
|
36399
|
+
"navigation.setLightMode": [{
|
|
36400
|
+
name: "deviceId",
|
|
36401
|
+
form: "single",
|
|
36402
|
+
optional: false
|
|
36403
|
+
}],
|
|
36404
|
+
"navigation.setLightOn": [{
|
|
36405
|
+
name: "deviceId",
|
|
36406
|
+
form: "single",
|
|
36407
|
+
optional: false
|
|
36408
|
+
}],
|
|
36409
|
+
"navigation.stop": [{
|
|
36410
|
+
name: "deviceId",
|
|
36411
|
+
form: "single",
|
|
36412
|
+
optional: false
|
|
36413
|
+
}],
|
|
36107
36414
|
"networkQuality.getDeviceStats": [{
|
|
36108
36415
|
name: "deviceId",
|
|
36109
36416
|
form: "single",
|
package/dist/index.mjs
CHANGED
|
@@ -26941,6 +26941,203 @@ DeviceType.Camera, method(object({ deviceId: number() }), PtzAutotrackStatusSche
|
|
|
26941
26941
|
deviceId: number(),
|
|
26942
26942
|
status: PtzAutotrackStatusSchema
|
|
26943
26943
|
});
|
|
26944
|
+
/**
|
|
26945
|
+
* `navigation` — a device-scoped capability that natively expresses the FULL
|
|
26946
|
+
* navigation / action surface of a robot that DRIVES ITSELF and carries an
|
|
26947
|
+
* on-board camera (the Dreame robot-vacuum camera is the first provider).
|
|
26948
|
+
*
|
|
26949
|
+
* Why a NEW cap rather than overloading `ptz`:
|
|
26950
|
+
* - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
|
|
26951
|
+
* robot vacuum has no gimbal — the whole chassis drives, turns and spins.
|
|
26952
|
+
* The two are different physical models: PTZ is absolute-position + presets,
|
|
26953
|
+
* navigation is momentary drive nudges + discrete robot ACTIONS
|
|
26954
|
+
* (dock / spot-clean / follow-pet / go-to-point / …).
|
|
26955
|
+
* - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
|
|
26956
|
+
* the reverse:
|
|
26957
|
+
* 1. a native CamStack navigation panel (data-driven from `listActions`
|
|
26958
|
+
* / `getOptions`), and
|
|
26959
|
+
* 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
|
|
26960
|
+
* robot camera shows up in the existing PTZ control path without every
|
|
26961
|
+
* PTZ provider learning about robots. The mapping lives in the adapter,
|
|
26962
|
+
* not here (see the addon design note):
|
|
26963
|
+
* ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
|
|
26964
|
+
* ptz.stop() → navigation.stop()
|
|
26965
|
+
* ptz.goHome() → navigation.runAction('goHome')
|
|
26966
|
+
* ptz.getPresets() → navigation.listActions() (id→preset)
|
|
26967
|
+
* ptz.goToPreset(id) → navigation.runAction(id)
|
|
26968
|
+
*
|
|
26969
|
+
* ## Continuous drive
|
|
26970
|
+
*
|
|
26971
|
+
* `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
|
|
26972
|
+
* sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
|
|
26973
|
+
* one `stop()` on release — exactly like the robot app's remote-drive joystick.
|
|
26974
|
+
* The provider forwards EACH `move` to one drive write; it must NOT debounce or
|
|
26975
|
+
* coalesce them. The UI owns the cadence.
|
|
26976
|
+
*
|
|
26977
|
+
* ## The action dictionary
|
|
26978
|
+
*
|
|
26979
|
+
* The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
|
|
26980
|
+
* are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
|
|
26981
|
+
* carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
|
|
26982
|
+
* native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
|
|
26983
|
+
* vendor-specific list. `kind: 'action'` entries are triggered with
|
|
26984
|
+
* `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
|
|
26985
|
+
* (the entry carries the `soundId` to pass). The general primitives — `move`,
|
|
26986
|
+
* `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
|
|
26987
|
+
*
|
|
26988
|
+
* NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
|
|
26989
|
+
* `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
|
|
26990
|
+
* that the currently-published `@apocaliss92/nodedreame` already exposes on
|
|
26991
|
+
* every device handle. A future nodedreame publish adds a typed
|
|
26992
|
+
* `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
|
|
26993
|
+
* provider can then swap the raw calls for the typed methods with no change to
|
|
26994
|
+
* THIS contract.
|
|
26995
|
+
*/
|
|
26996
|
+
/**
|
|
26997
|
+
* A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
|
|
26998
|
+
* keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
|
|
26999
|
+
* halts it.
|
|
27000
|
+
*
|
|
27001
|
+
* - `pan` — turn: negative = left, positive = right, 0 = straight.
|
|
27002
|
+
* - `tilt` — throttle: positive = forward, negative = spin / turn-around.
|
|
27003
|
+
* - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
|
|
27004
|
+
* vector by it (drivers without proportional drive ignore it).
|
|
27005
|
+
*
|
|
27006
|
+
* `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
|
|
27007
|
+
* axis alone; an all-undefined nudge is a no-op.
|
|
27008
|
+
*/
|
|
27009
|
+
var NavigationMoveCommandSchema = object({
|
|
27010
|
+
pan: number().min(-1).max(1).optional(),
|
|
27011
|
+
tilt: number().min(-1).max(1).optional(),
|
|
27012
|
+
speed: number().min(0).max(1).optional()
|
|
27013
|
+
});
|
|
27014
|
+
/**
|
|
27015
|
+
* The enumerated discrete actions a navigation-capable robot can perform via
|
|
27016
|
+
* `runAction`. This is the CLOSED vocabulary; a given device advertises the
|
|
27017
|
+
* subset it supports through `listActions`. Sounds are NOT here — they go through
|
|
27018
|
+
* `playSound` (see the `sound` dictionary entries).
|
|
27019
|
+
*/
|
|
27020
|
+
var NavigationActionIdSchema = _enum([
|
|
27021
|
+
"goHome",
|
|
27022
|
+
"locate",
|
|
27023
|
+
"spotClean",
|
|
27024
|
+
"findPet",
|
|
27025
|
+
"personFollow",
|
|
27026
|
+
"stop",
|
|
27027
|
+
"startClean",
|
|
27028
|
+
"pauseClean",
|
|
27029
|
+
"dockWash",
|
|
27030
|
+
"autoEmpty",
|
|
27031
|
+
"flashOn",
|
|
27032
|
+
"flashOff"
|
|
27033
|
+
]);
|
|
27034
|
+
/** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
|
|
27035
|
+
var NavigationEntryKindSchema = _enum(["action", "sound"]);
|
|
27036
|
+
/**
|
|
27037
|
+
* One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
|
|
27038
|
+
* native panel and the PTZ mimic render as a button.
|
|
27039
|
+
*
|
|
27040
|
+
* - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
|
|
27041
|
+
* (pass to `runAction`); for `kind:'sound'` it is a namespaced id
|
|
27042
|
+
* (`sound:meow`) whose `soundId` is passed to `playSound`.
|
|
27043
|
+
* - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
|
|
27044
|
+
* - `label` — operator-facing English label.
|
|
27045
|
+
* - `soundId` — wire sound id, present only on `kind:'sound'` entries.
|
|
27046
|
+
* - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
|
|
27047
|
+
* PTZ render ONLY enabled entries. Data-driven: the provider
|
|
27048
|
+
* flips it from config, never by editing code.
|
|
27049
|
+
*/
|
|
27050
|
+
var NavigationActionEntrySchema = object({
|
|
27051
|
+
id: string(),
|
|
27052
|
+
kind: NavigationEntryKindSchema,
|
|
27053
|
+
label: string(),
|
|
27054
|
+
icon: string(),
|
|
27055
|
+
/** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
|
|
27056
|
+
soundId: number().int().optional(),
|
|
27057
|
+
/** Per-device feature flag — render this entry only when true. */
|
|
27058
|
+
enabled: boolean()
|
|
27059
|
+
});
|
|
27060
|
+
/** Coordinates for `goToPoint` — a point on the robot's live map. */
|
|
27061
|
+
var NavigationPointSchema = object({
|
|
27062
|
+
x: number(),
|
|
27063
|
+
y: number()
|
|
27064
|
+
});
|
|
27065
|
+
/**
|
|
27066
|
+
* Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
|
|
27067
|
+
* The cap reports which are enabled so the UI / PTZ render only the controls
|
|
27068
|
+
* that are turned on for THIS device. Data-driven: the provider derives these
|
|
27069
|
+
* from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
|
|
27070
|
+
* live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
|
|
27071
|
+
* that are not dictionary entries.
|
|
27072
|
+
*
|
|
27073
|
+
* - `move` / `stop` — the momentary drive joystick.
|
|
27074
|
+
* - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
|
|
27075
|
+
* map-coordinate plumbing is wired.
|
|
27076
|
+
* - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
|
|
27077
|
+
* - `playSound` — the sound buttons (dictionary `kind:'sound'`).
|
|
27078
|
+
* - `light` — the on/off fill-light toggle (works anytime).
|
|
27079
|
+
* - `lightMode` — the auto/manual selector + manual level slider (a
|
|
27080
|
+
* camera-service control; needs an active stream).
|
|
27081
|
+
*/
|
|
27082
|
+
var NavigationFeaturesSchema = object({
|
|
27083
|
+
move: boolean(),
|
|
27084
|
+
stop: boolean(),
|
|
27085
|
+
goToPoint: boolean(),
|
|
27086
|
+
runAction: boolean(),
|
|
27087
|
+
playSound: boolean(),
|
|
27088
|
+
light: boolean(),
|
|
27089
|
+
lightMode: boolean()
|
|
27090
|
+
});
|
|
27091
|
+
/** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
|
|
27092
|
+
var NavigationLightModeSchema = _enum(["auto", "manual"]);
|
|
27093
|
+
/**
|
|
27094
|
+
* Live navigation state so the UI can reflect what the robot is doing:
|
|
27095
|
+
* - `mode` — coarse activity (idle / cleaning / following / …).
|
|
27096
|
+
* - `following` — person/pet follow is currently armed.
|
|
27097
|
+
* - `flash` — the on-camera fill light is on.
|
|
27098
|
+
* - `lightMode` — auto vs manual fill-light mode.
|
|
27099
|
+
* - `lightLevel` — manual fill-light level (40..100); meaningful when
|
|
27100
|
+
* `lightMode === 'manual'`.
|
|
27101
|
+
*/
|
|
27102
|
+
var NavigationStatusSchema = object({
|
|
27103
|
+
mode: _enum([
|
|
27104
|
+
"idle",
|
|
27105
|
+
"cleaning",
|
|
27106
|
+
"spot",
|
|
27107
|
+
"following",
|
|
27108
|
+
"goto",
|
|
27109
|
+
"returning",
|
|
27110
|
+
"paused",
|
|
27111
|
+
"unknown"
|
|
27112
|
+
]),
|
|
27113
|
+
following: boolean(),
|
|
27114
|
+
flash: boolean(),
|
|
27115
|
+
lightMode: NavigationLightModeSchema,
|
|
27116
|
+
lightLevel: number().min(40).max(100),
|
|
27117
|
+
/** Ms epoch when the slice was last updated. */
|
|
27118
|
+
lastChangedAt: number()
|
|
27119
|
+
});
|
|
27120
|
+
NavigationStatusSchema.extend({ lastFetchedAt: number() });
|
|
27121
|
+
DeviceType.Camera, method(NavigationMoveCommandSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(NavigationPointSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), array(NavigationActionEntrySchema)), method(object({
|
|
27122
|
+
deviceId: number(),
|
|
27123
|
+
actionId: NavigationActionIdSchema
|
|
27124
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
27125
|
+
deviceId: number(),
|
|
27126
|
+
soundId: number().int()
|
|
27127
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
27128
|
+
deviceId: number(),
|
|
27129
|
+
on: boolean()
|
|
27130
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
27131
|
+
deviceId: number(),
|
|
27132
|
+
mode: NavigationLightModeSchema,
|
|
27133
|
+
level: number().min(40).max(100).optional()
|
|
27134
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
27135
|
+
deviceId: number(),
|
|
27136
|
+
level: number().min(40).max(100)
|
|
27137
|
+
}), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
|
|
27138
|
+
deviceId: number(),
|
|
27139
|
+
status: NavigationStatusSchema
|
|
27140
|
+
});
|
|
26944
27141
|
DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
|
|
26945
27142
|
kind: "mutation",
|
|
26946
27143
|
auth: "admin"
|
|
@@ -32005,6 +32202,66 @@ Object.freeze({
|
|
|
32005
32202
|
addonId: null,
|
|
32006
32203
|
access: "create"
|
|
32007
32204
|
},
|
|
32205
|
+
"navigation.getFeatures": {
|
|
32206
|
+
capName: "navigation",
|
|
32207
|
+
capScope: "device",
|
|
32208
|
+
addonId: null,
|
|
32209
|
+
access: "view"
|
|
32210
|
+
},
|
|
32211
|
+
"navigation.goToPoint": {
|
|
32212
|
+
capName: "navigation",
|
|
32213
|
+
capScope: "device",
|
|
32214
|
+
addonId: null,
|
|
32215
|
+
access: "create"
|
|
32216
|
+
},
|
|
32217
|
+
"navigation.listActions": {
|
|
32218
|
+
capName: "navigation",
|
|
32219
|
+
capScope: "device",
|
|
32220
|
+
addonId: null,
|
|
32221
|
+
access: "view"
|
|
32222
|
+
},
|
|
32223
|
+
"navigation.move": {
|
|
32224
|
+
capName: "navigation",
|
|
32225
|
+
capScope: "device",
|
|
32226
|
+
addonId: null,
|
|
32227
|
+
access: "create"
|
|
32228
|
+
},
|
|
32229
|
+
"navigation.playSound": {
|
|
32230
|
+
capName: "navigation",
|
|
32231
|
+
capScope: "device",
|
|
32232
|
+
addonId: null,
|
|
32233
|
+
access: "create"
|
|
32234
|
+
},
|
|
32235
|
+
"navigation.runAction": {
|
|
32236
|
+
capName: "navigation",
|
|
32237
|
+
capScope: "device",
|
|
32238
|
+
addonId: null,
|
|
32239
|
+
access: "create"
|
|
32240
|
+
},
|
|
32241
|
+
"navigation.setLightLevel": {
|
|
32242
|
+
capName: "navigation",
|
|
32243
|
+
capScope: "device",
|
|
32244
|
+
addonId: null,
|
|
32245
|
+
access: "create"
|
|
32246
|
+
},
|
|
32247
|
+
"navigation.setLightMode": {
|
|
32248
|
+
capName: "navigation",
|
|
32249
|
+
capScope: "device",
|
|
32250
|
+
addonId: null,
|
|
32251
|
+
access: "create"
|
|
32252
|
+
},
|
|
32253
|
+
"navigation.setLightOn": {
|
|
32254
|
+
capName: "navigation",
|
|
32255
|
+
capScope: "device",
|
|
32256
|
+
addonId: null,
|
|
32257
|
+
access: "create"
|
|
32258
|
+
},
|
|
32259
|
+
"navigation.stop": {
|
|
32260
|
+
capName: "navigation",
|
|
32261
|
+
capScope: "device",
|
|
32262
|
+
addonId: null,
|
|
32263
|
+
access: "create"
|
|
32264
|
+
},
|
|
32008
32265
|
"networkAccess.getEndpoint": {
|
|
32009
32266
|
capName: "network-access",
|
|
32010
32267
|
capScope: "system",
|
|
@@ -36100,6 +36357,56 @@ Object.freeze({
|
|
|
36100
36357
|
form: "single",
|
|
36101
36358
|
optional: false
|
|
36102
36359
|
}],
|
|
36360
|
+
"navigation.getFeatures": [{
|
|
36361
|
+
name: "deviceId",
|
|
36362
|
+
form: "single",
|
|
36363
|
+
optional: false
|
|
36364
|
+
}],
|
|
36365
|
+
"navigation.goToPoint": [{
|
|
36366
|
+
name: "deviceId",
|
|
36367
|
+
form: "single",
|
|
36368
|
+
optional: false
|
|
36369
|
+
}],
|
|
36370
|
+
"navigation.listActions": [{
|
|
36371
|
+
name: "deviceId",
|
|
36372
|
+
form: "single",
|
|
36373
|
+
optional: false
|
|
36374
|
+
}],
|
|
36375
|
+
"navigation.move": [{
|
|
36376
|
+
name: "deviceId",
|
|
36377
|
+
form: "single",
|
|
36378
|
+
optional: false
|
|
36379
|
+
}],
|
|
36380
|
+
"navigation.playSound": [{
|
|
36381
|
+
name: "deviceId",
|
|
36382
|
+
form: "single",
|
|
36383
|
+
optional: false
|
|
36384
|
+
}],
|
|
36385
|
+
"navigation.runAction": [{
|
|
36386
|
+
name: "deviceId",
|
|
36387
|
+
form: "single",
|
|
36388
|
+
optional: false
|
|
36389
|
+
}],
|
|
36390
|
+
"navigation.setLightLevel": [{
|
|
36391
|
+
name: "deviceId",
|
|
36392
|
+
form: "single",
|
|
36393
|
+
optional: false
|
|
36394
|
+
}],
|
|
36395
|
+
"navigation.setLightMode": [{
|
|
36396
|
+
name: "deviceId",
|
|
36397
|
+
form: "single",
|
|
36398
|
+
optional: false
|
|
36399
|
+
}],
|
|
36400
|
+
"navigation.setLightOn": [{
|
|
36401
|
+
name: "deviceId",
|
|
36402
|
+
form: "single",
|
|
36403
|
+
optional: false
|
|
36404
|
+
}],
|
|
36405
|
+
"navigation.stop": [{
|
|
36406
|
+
name: "deviceId",
|
|
36407
|
+
form: "single",
|
|
36408
|
+
optional: false
|
|
36409
|
+
}],
|
|
36103
36410
|
"networkQuality.getDeviceStats": [{
|
|
36104
36411
|
name: "deviceId",
|
|
36105
36412
|
form: "single",
|