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