@camstack/addon-mqtt-broker 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/mqtt-broker.addon.js +307 -0
- package/dist/mqtt-broker.addon.mjs +307 -0
- package/package.json +1 -1
|
@@ -26912,6 +26912,203 @@ DeviceType.Camera, method(object({ deviceId: number() }), PtzAutotrackStatusSche
|
|
|
26912
26912
|
deviceId: number(),
|
|
26913
26913
|
status: PtzAutotrackStatusSchema
|
|
26914
26914
|
});
|
|
26915
|
+
/**
|
|
26916
|
+
* `navigation` — a device-scoped capability that natively expresses the FULL
|
|
26917
|
+
* navigation / action surface of a robot that DRIVES ITSELF and carries an
|
|
26918
|
+
* on-board camera (the Dreame robot-vacuum camera is the first provider).
|
|
26919
|
+
*
|
|
26920
|
+
* Why a NEW cap rather than overloading `ptz`:
|
|
26921
|
+
* - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
|
|
26922
|
+
* robot vacuum has no gimbal — the whole chassis drives, turns and spins.
|
|
26923
|
+
* The two are different physical models: PTZ is absolute-position + presets,
|
|
26924
|
+
* navigation is momentary drive nudges + discrete robot ACTIONS
|
|
26925
|
+
* (dock / spot-clean / follow-pet / go-to-point / …).
|
|
26926
|
+
* - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
|
|
26927
|
+
* the reverse:
|
|
26928
|
+
* 1. a native CamStack navigation panel (data-driven from `listActions`
|
|
26929
|
+
* / `getOptions`), and
|
|
26930
|
+
* 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
|
|
26931
|
+
* robot camera shows up in the existing PTZ control path without every
|
|
26932
|
+
* PTZ provider learning about robots. The mapping lives in the adapter,
|
|
26933
|
+
* not here (see the addon design note):
|
|
26934
|
+
* ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
|
|
26935
|
+
* ptz.stop() → navigation.stop()
|
|
26936
|
+
* ptz.goHome() → navigation.runAction('goHome')
|
|
26937
|
+
* ptz.getPresets() → navigation.listActions() (id→preset)
|
|
26938
|
+
* ptz.goToPreset(id) → navigation.runAction(id)
|
|
26939
|
+
*
|
|
26940
|
+
* ## Continuous drive
|
|
26941
|
+
*
|
|
26942
|
+
* `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
|
|
26943
|
+
* sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
|
|
26944
|
+
* one `stop()` on release — exactly like the robot app's remote-drive joystick.
|
|
26945
|
+
* The provider forwards EACH `move` to one drive write; it must NOT debounce or
|
|
26946
|
+
* coalesce them. The UI owns the cadence.
|
|
26947
|
+
*
|
|
26948
|
+
* ## The action dictionary
|
|
26949
|
+
*
|
|
26950
|
+
* The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
|
|
26951
|
+
* are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
|
|
26952
|
+
* carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
|
|
26953
|
+
* native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
|
|
26954
|
+
* vendor-specific list. `kind: 'action'` entries are triggered with
|
|
26955
|
+
* `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
|
|
26956
|
+
* (the entry carries the `soundId` to pass). The general primitives — `move`,
|
|
26957
|
+
* `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
|
|
26958
|
+
*
|
|
26959
|
+
* NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
|
|
26960
|
+
* `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
|
|
26961
|
+
* that the currently-published `@apocaliss92/nodedreame` already exposes on
|
|
26962
|
+
* every device handle. A future nodedreame publish adds a typed
|
|
26963
|
+
* `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
|
|
26964
|
+
* provider can then swap the raw calls for the typed methods with no change to
|
|
26965
|
+
* THIS contract.
|
|
26966
|
+
*/
|
|
26967
|
+
/**
|
|
26968
|
+
* A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
|
|
26969
|
+
* keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
|
|
26970
|
+
* halts it.
|
|
26971
|
+
*
|
|
26972
|
+
* - `pan` — turn: negative = left, positive = right, 0 = straight.
|
|
26973
|
+
* - `tilt` — throttle: positive = forward, negative = spin / turn-around.
|
|
26974
|
+
* - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
|
|
26975
|
+
* vector by it (drivers without proportional drive ignore it).
|
|
26976
|
+
*
|
|
26977
|
+
* `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
|
|
26978
|
+
* axis alone; an all-undefined nudge is a no-op.
|
|
26979
|
+
*/
|
|
26980
|
+
var NavigationMoveCommandSchema = object({
|
|
26981
|
+
pan: number().min(-1).max(1).optional(),
|
|
26982
|
+
tilt: number().min(-1).max(1).optional(),
|
|
26983
|
+
speed: number().min(0).max(1).optional()
|
|
26984
|
+
});
|
|
26985
|
+
/**
|
|
26986
|
+
* The enumerated discrete actions a navigation-capable robot can perform via
|
|
26987
|
+
* `runAction`. This is the CLOSED vocabulary; a given device advertises the
|
|
26988
|
+
* subset it supports through `listActions`. Sounds are NOT here — they go through
|
|
26989
|
+
* `playSound` (see the `sound` dictionary entries).
|
|
26990
|
+
*/
|
|
26991
|
+
var NavigationActionIdSchema = _enum([
|
|
26992
|
+
"goHome",
|
|
26993
|
+
"locate",
|
|
26994
|
+
"spotClean",
|
|
26995
|
+
"findPet",
|
|
26996
|
+
"personFollow",
|
|
26997
|
+
"stop",
|
|
26998
|
+
"startClean",
|
|
26999
|
+
"pauseClean",
|
|
27000
|
+
"dockWash",
|
|
27001
|
+
"autoEmpty",
|
|
27002
|
+
"flashOn",
|
|
27003
|
+
"flashOff"
|
|
27004
|
+
]);
|
|
27005
|
+
/** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
|
|
27006
|
+
var NavigationEntryKindSchema = _enum(["action", "sound"]);
|
|
27007
|
+
/**
|
|
27008
|
+
* One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
|
|
27009
|
+
* native panel and the PTZ mimic render as a button.
|
|
27010
|
+
*
|
|
27011
|
+
* - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
|
|
27012
|
+
* (pass to `runAction`); for `kind:'sound'` it is a namespaced id
|
|
27013
|
+
* (`sound:meow`) whose `soundId` is passed to `playSound`.
|
|
27014
|
+
* - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
|
|
27015
|
+
* - `label` — operator-facing English label.
|
|
27016
|
+
* - `soundId` — wire sound id, present only on `kind:'sound'` entries.
|
|
27017
|
+
* - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
|
|
27018
|
+
* PTZ render ONLY enabled entries. Data-driven: the provider
|
|
27019
|
+
* flips it from config, never by editing code.
|
|
27020
|
+
*/
|
|
27021
|
+
var NavigationActionEntrySchema = object({
|
|
27022
|
+
id: string(),
|
|
27023
|
+
kind: NavigationEntryKindSchema,
|
|
27024
|
+
label: string(),
|
|
27025
|
+
icon: string(),
|
|
27026
|
+
/** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
|
|
27027
|
+
soundId: number().int().optional(),
|
|
27028
|
+
/** Per-device feature flag — render this entry only when true. */
|
|
27029
|
+
enabled: boolean()
|
|
27030
|
+
});
|
|
27031
|
+
/** Coordinates for `goToPoint` — a point on the robot's live map. */
|
|
27032
|
+
var NavigationPointSchema = object({
|
|
27033
|
+
x: number(),
|
|
27034
|
+
y: number()
|
|
27035
|
+
});
|
|
27036
|
+
/**
|
|
27037
|
+
* Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
|
|
27038
|
+
* The cap reports which are enabled so the UI / PTZ render only the controls
|
|
27039
|
+
* that are turned on for THIS device. Data-driven: the provider derives these
|
|
27040
|
+
* from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
|
|
27041
|
+
* live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
|
|
27042
|
+
* that are not dictionary entries.
|
|
27043
|
+
*
|
|
27044
|
+
* - `move` / `stop` — the momentary drive joystick.
|
|
27045
|
+
* - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
|
|
27046
|
+
* map-coordinate plumbing is wired.
|
|
27047
|
+
* - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
|
|
27048
|
+
* - `playSound` — the sound buttons (dictionary `kind:'sound'`).
|
|
27049
|
+
* - `light` — the on/off fill-light toggle (works anytime).
|
|
27050
|
+
* - `lightMode` — the auto/manual selector + manual level slider (a
|
|
27051
|
+
* camera-service control; needs an active stream).
|
|
27052
|
+
*/
|
|
27053
|
+
var NavigationFeaturesSchema = object({
|
|
27054
|
+
move: boolean(),
|
|
27055
|
+
stop: boolean(),
|
|
27056
|
+
goToPoint: boolean(),
|
|
27057
|
+
runAction: boolean(),
|
|
27058
|
+
playSound: boolean(),
|
|
27059
|
+
light: boolean(),
|
|
27060
|
+
lightMode: boolean()
|
|
27061
|
+
});
|
|
27062
|
+
/** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
|
|
27063
|
+
var NavigationLightModeSchema = _enum(["auto", "manual"]);
|
|
27064
|
+
/**
|
|
27065
|
+
* Live navigation state so the UI can reflect what the robot is doing:
|
|
27066
|
+
* - `mode` — coarse activity (idle / cleaning / following / …).
|
|
27067
|
+
* - `following` — person/pet follow is currently armed.
|
|
27068
|
+
* - `flash` — the on-camera fill light is on.
|
|
27069
|
+
* - `lightMode` — auto vs manual fill-light mode.
|
|
27070
|
+
* - `lightLevel` — manual fill-light level (40..100); meaningful when
|
|
27071
|
+
* `lightMode === 'manual'`.
|
|
27072
|
+
*/
|
|
27073
|
+
var NavigationStatusSchema = object({
|
|
27074
|
+
mode: _enum([
|
|
27075
|
+
"idle",
|
|
27076
|
+
"cleaning",
|
|
27077
|
+
"spot",
|
|
27078
|
+
"following",
|
|
27079
|
+
"goto",
|
|
27080
|
+
"returning",
|
|
27081
|
+
"paused",
|
|
27082
|
+
"unknown"
|
|
27083
|
+
]),
|
|
27084
|
+
following: boolean(),
|
|
27085
|
+
flash: boolean(),
|
|
27086
|
+
lightMode: NavigationLightModeSchema,
|
|
27087
|
+
lightLevel: number().min(40).max(100),
|
|
27088
|
+
/** Ms epoch when the slice was last updated. */
|
|
27089
|
+
lastChangedAt: number()
|
|
27090
|
+
});
|
|
27091
|
+
NavigationStatusSchema.extend({ lastFetchedAt: number() });
|
|
27092
|
+
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({
|
|
27093
|
+
deviceId: number(),
|
|
27094
|
+
actionId: NavigationActionIdSchema
|
|
27095
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
27096
|
+
deviceId: number(),
|
|
27097
|
+
soundId: number().int()
|
|
27098
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
27099
|
+
deviceId: number(),
|
|
27100
|
+
on: boolean()
|
|
27101
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
27102
|
+
deviceId: number(),
|
|
27103
|
+
mode: NavigationLightModeSchema,
|
|
27104
|
+
level: number().min(40).max(100).optional()
|
|
27105
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
27106
|
+
deviceId: number(),
|
|
27107
|
+
level: number().min(40).max(100)
|
|
27108
|
+
}), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
|
|
27109
|
+
deviceId: number(),
|
|
27110
|
+
status: NavigationStatusSchema
|
|
27111
|
+
});
|
|
26915
27112
|
DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
|
|
26916
27113
|
kind: "mutation",
|
|
26917
27114
|
auth: "admin"
|
|
@@ -31976,6 +32173,66 @@ Object.freeze({
|
|
|
31976
32173
|
addonId: null,
|
|
31977
32174
|
access: "create"
|
|
31978
32175
|
},
|
|
32176
|
+
"navigation.getFeatures": {
|
|
32177
|
+
capName: "navigation",
|
|
32178
|
+
capScope: "device",
|
|
32179
|
+
addonId: null,
|
|
32180
|
+
access: "view"
|
|
32181
|
+
},
|
|
32182
|
+
"navigation.goToPoint": {
|
|
32183
|
+
capName: "navigation",
|
|
32184
|
+
capScope: "device",
|
|
32185
|
+
addonId: null,
|
|
32186
|
+
access: "create"
|
|
32187
|
+
},
|
|
32188
|
+
"navigation.listActions": {
|
|
32189
|
+
capName: "navigation",
|
|
32190
|
+
capScope: "device",
|
|
32191
|
+
addonId: null,
|
|
32192
|
+
access: "view"
|
|
32193
|
+
},
|
|
32194
|
+
"navigation.move": {
|
|
32195
|
+
capName: "navigation",
|
|
32196
|
+
capScope: "device",
|
|
32197
|
+
addonId: null,
|
|
32198
|
+
access: "create"
|
|
32199
|
+
},
|
|
32200
|
+
"navigation.playSound": {
|
|
32201
|
+
capName: "navigation",
|
|
32202
|
+
capScope: "device",
|
|
32203
|
+
addonId: null,
|
|
32204
|
+
access: "create"
|
|
32205
|
+
},
|
|
32206
|
+
"navigation.runAction": {
|
|
32207
|
+
capName: "navigation",
|
|
32208
|
+
capScope: "device",
|
|
32209
|
+
addonId: null,
|
|
32210
|
+
access: "create"
|
|
32211
|
+
},
|
|
32212
|
+
"navigation.setLightLevel": {
|
|
32213
|
+
capName: "navigation",
|
|
32214
|
+
capScope: "device",
|
|
32215
|
+
addonId: null,
|
|
32216
|
+
access: "create"
|
|
32217
|
+
},
|
|
32218
|
+
"navigation.setLightMode": {
|
|
32219
|
+
capName: "navigation",
|
|
32220
|
+
capScope: "device",
|
|
32221
|
+
addonId: null,
|
|
32222
|
+
access: "create"
|
|
32223
|
+
},
|
|
32224
|
+
"navigation.setLightOn": {
|
|
32225
|
+
capName: "navigation",
|
|
32226
|
+
capScope: "device",
|
|
32227
|
+
addonId: null,
|
|
32228
|
+
access: "create"
|
|
32229
|
+
},
|
|
32230
|
+
"navigation.stop": {
|
|
32231
|
+
capName: "navigation",
|
|
32232
|
+
capScope: "device",
|
|
32233
|
+
addonId: null,
|
|
32234
|
+
access: "create"
|
|
32235
|
+
},
|
|
31979
32236
|
"networkAccess.getEndpoint": {
|
|
31980
32237
|
capName: "network-access",
|
|
31981
32238
|
capScope: "system",
|
|
@@ -36071,6 +36328,56 @@ Object.freeze({
|
|
|
36071
36328
|
form: "single",
|
|
36072
36329
|
optional: false
|
|
36073
36330
|
}],
|
|
36331
|
+
"navigation.getFeatures": [{
|
|
36332
|
+
name: "deviceId",
|
|
36333
|
+
form: "single",
|
|
36334
|
+
optional: false
|
|
36335
|
+
}],
|
|
36336
|
+
"navigation.goToPoint": [{
|
|
36337
|
+
name: "deviceId",
|
|
36338
|
+
form: "single",
|
|
36339
|
+
optional: false
|
|
36340
|
+
}],
|
|
36341
|
+
"navigation.listActions": [{
|
|
36342
|
+
name: "deviceId",
|
|
36343
|
+
form: "single",
|
|
36344
|
+
optional: false
|
|
36345
|
+
}],
|
|
36346
|
+
"navigation.move": [{
|
|
36347
|
+
name: "deviceId",
|
|
36348
|
+
form: "single",
|
|
36349
|
+
optional: false
|
|
36350
|
+
}],
|
|
36351
|
+
"navigation.playSound": [{
|
|
36352
|
+
name: "deviceId",
|
|
36353
|
+
form: "single",
|
|
36354
|
+
optional: false
|
|
36355
|
+
}],
|
|
36356
|
+
"navigation.runAction": [{
|
|
36357
|
+
name: "deviceId",
|
|
36358
|
+
form: "single",
|
|
36359
|
+
optional: false
|
|
36360
|
+
}],
|
|
36361
|
+
"navigation.setLightLevel": [{
|
|
36362
|
+
name: "deviceId",
|
|
36363
|
+
form: "single",
|
|
36364
|
+
optional: false
|
|
36365
|
+
}],
|
|
36366
|
+
"navigation.setLightMode": [{
|
|
36367
|
+
name: "deviceId",
|
|
36368
|
+
form: "single",
|
|
36369
|
+
optional: false
|
|
36370
|
+
}],
|
|
36371
|
+
"navigation.setLightOn": [{
|
|
36372
|
+
name: "deviceId",
|
|
36373
|
+
form: "single",
|
|
36374
|
+
optional: false
|
|
36375
|
+
}],
|
|
36376
|
+
"navigation.stop": [{
|
|
36377
|
+
name: "deviceId",
|
|
36378
|
+
form: "single",
|
|
36379
|
+
optional: false
|
|
36380
|
+
}],
|
|
36074
36381
|
"networkQuality.getDeviceStats": [{
|
|
36075
36382
|
name: "deviceId",
|
|
36076
36383
|
form: "single",
|
|
@@ -26907,6 +26907,203 @@ DeviceType.Camera, method(object({ deviceId: number() }), PtzAutotrackStatusSche
|
|
|
26907
26907
|
deviceId: number(),
|
|
26908
26908
|
status: PtzAutotrackStatusSchema
|
|
26909
26909
|
});
|
|
26910
|
+
/**
|
|
26911
|
+
* `navigation` — a device-scoped capability that natively expresses the FULL
|
|
26912
|
+
* navigation / action surface of a robot that DRIVES ITSELF and carries an
|
|
26913
|
+
* on-board camera (the Dreame robot-vacuum camera is the first provider).
|
|
26914
|
+
*
|
|
26915
|
+
* Why a NEW cap rather than overloading `ptz`:
|
|
26916
|
+
* - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
|
|
26917
|
+
* robot vacuum has no gimbal — the whole chassis drives, turns and spins.
|
|
26918
|
+
* The two are different physical models: PTZ is absolute-position + presets,
|
|
26919
|
+
* navigation is momentary drive nudges + discrete robot ACTIONS
|
|
26920
|
+
* (dock / spot-clean / follow-pet / go-to-point / …).
|
|
26921
|
+
* - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
|
|
26922
|
+
* the reverse:
|
|
26923
|
+
* 1. a native CamStack navigation panel (data-driven from `listActions`
|
|
26924
|
+
* / `getOptions`), and
|
|
26925
|
+
* 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
|
|
26926
|
+
* robot camera shows up in the existing PTZ control path without every
|
|
26927
|
+
* PTZ provider learning about robots. The mapping lives in the adapter,
|
|
26928
|
+
* not here (see the addon design note):
|
|
26929
|
+
* ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
|
|
26930
|
+
* ptz.stop() → navigation.stop()
|
|
26931
|
+
* ptz.goHome() → navigation.runAction('goHome')
|
|
26932
|
+
* ptz.getPresets() → navigation.listActions() (id→preset)
|
|
26933
|
+
* ptz.goToPreset(id) → navigation.runAction(id)
|
|
26934
|
+
*
|
|
26935
|
+
* ## Continuous drive
|
|
26936
|
+
*
|
|
26937
|
+
* `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
|
|
26938
|
+
* sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
|
|
26939
|
+
* one `stop()` on release — exactly like the robot app's remote-drive joystick.
|
|
26940
|
+
* The provider forwards EACH `move` to one drive write; it must NOT debounce or
|
|
26941
|
+
* coalesce them. The UI owns the cadence.
|
|
26942
|
+
*
|
|
26943
|
+
* ## The action dictionary
|
|
26944
|
+
*
|
|
26945
|
+
* The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
|
|
26946
|
+
* are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
|
|
26947
|
+
* carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
|
|
26948
|
+
* native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
|
|
26949
|
+
* vendor-specific list. `kind: 'action'` entries are triggered with
|
|
26950
|
+
* `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
|
|
26951
|
+
* (the entry carries the `soundId` to pass). The general primitives — `move`,
|
|
26952
|
+
* `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
|
|
26953
|
+
*
|
|
26954
|
+
* NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
|
|
26955
|
+
* `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
|
|
26956
|
+
* that the currently-published `@apocaliss92/nodedreame` already exposes on
|
|
26957
|
+
* every device handle. A future nodedreame publish adds a typed
|
|
26958
|
+
* `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
|
|
26959
|
+
* provider can then swap the raw calls for the typed methods with no change to
|
|
26960
|
+
* THIS contract.
|
|
26961
|
+
*/
|
|
26962
|
+
/**
|
|
26963
|
+
* A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
|
|
26964
|
+
* keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
|
|
26965
|
+
* halts it.
|
|
26966
|
+
*
|
|
26967
|
+
* - `pan` — turn: negative = left, positive = right, 0 = straight.
|
|
26968
|
+
* - `tilt` — throttle: positive = forward, negative = spin / turn-around.
|
|
26969
|
+
* - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
|
|
26970
|
+
* vector by it (drivers without proportional drive ignore it).
|
|
26971
|
+
*
|
|
26972
|
+
* `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
|
|
26973
|
+
* axis alone; an all-undefined nudge is a no-op.
|
|
26974
|
+
*/
|
|
26975
|
+
var NavigationMoveCommandSchema = object({
|
|
26976
|
+
pan: number().min(-1).max(1).optional(),
|
|
26977
|
+
tilt: number().min(-1).max(1).optional(),
|
|
26978
|
+
speed: number().min(0).max(1).optional()
|
|
26979
|
+
});
|
|
26980
|
+
/**
|
|
26981
|
+
* The enumerated discrete actions a navigation-capable robot can perform via
|
|
26982
|
+
* `runAction`. This is the CLOSED vocabulary; a given device advertises the
|
|
26983
|
+
* subset it supports through `listActions`. Sounds are NOT here — they go through
|
|
26984
|
+
* `playSound` (see the `sound` dictionary entries).
|
|
26985
|
+
*/
|
|
26986
|
+
var NavigationActionIdSchema = _enum([
|
|
26987
|
+
"goHome",
|
|
26988
|
+
"locate",
|
|
26989
|
+
"spotClean",
|
|
26990
|
+
"findPet",
|
|
26991
|
+
"personFollow",
|
|
26992
|
+
"stop",
|
|
26993
|
+
"startClean",
|
|
26994
|
+
"pauseClean",
|
|
26995
|
+
"dockWash",
|
|
26996
|
+
"autoEmpty",
|
|
26997
|
+
"flashOn",
|
|
26998
|
+
"flashOff"
|
|
26999
|
+
]);
|
|
27000
|
+
/** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
|
|
27001
|
+
var NavigationEntryKindSchema = _enum(["action", "sound"]);
|
|
27002
|
+
/**
|
|
27003
|
+
* One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
|
|
27004
|
+
* native panel and the PTZ mimic render as a button.
|
|
27005
|
+
*
|
|
27006
|
+
* - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
|
|
27007
|
+
* (pass to `runAction`); for `kind:'sound'` it is a namespaced id
|
|
27008
|
+
* (`sound:meow`) whose `soundId` is passed to `playSound`.
|
|
27009
|
+
* - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
|
|
27010
|
+
* - `label` — operator-facing English label.
|
|
27011
|
+
* - `soundId` — wire sound id, present only on `kind:'sound'` entries.
|
|
27012
|
+
* - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
|
|
27013
|
+
* PTZ render ONLY enabled entries. Data-driven: the provider
|
|
27014
|
+
* flips it from config, never by editing code.
|
|
27015
|
+
*/
|
|
27016
|
+
var NavigationActionEntrySchema = object({
|
|
27017
|
+
id: string(),
|
|
27018
|
+
kind: NavigationEntryKindSchema,
|
|
27019
|
+
label: string(),
|
|
27020
|
+
icon: string(),
|
|
27021
|
+
/** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
|
|
27022
|
+
soundId: number().int().optional(),
|
|
27023
|
+
/** Per-device feature flag — render this entry only when true. */
|
|
27024
|
+
enabled: boolean()
|
|
27025
|
+
});
|
|
27026
|
+
/** Coordinates for `goToPoint` — a point on the robot's live map. */
|
|
27027
|
+
var NavigationPointSchema = object({
|
|
27028
|
+
x: number(),
|
|
27029
|
+
y: number()
|
|
27030
|
+
});
|
|
27031
|
+
/**
|
|
27032
|
+
* Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
|
|
27033
|
+
* The cap reports which are enabled so the UI / PTZ render only the controls
|
|
27034
|
+
* that are turned on for THIS device. Data-driven: the provider derives these
|
|
27035
|
+
* from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
|
|
27036
|
+
* live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
|
|
27037
|
+
* that are not dictionary entries.
|
|
27038
|
+
*
|
|
27039
|
+
* - `move` / `stop` — the momentary drive joystick.
|
|
27040
|
+
* - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
|
|
27041
|
+
* map-coordinate plumbing is wired.
|
|
27042
|
+
* - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
|
|
27043
|
+
* - `playSound` — the sound buttons (dictionary `kind:'sound'`).
|
|
27044
|
+
* - `light` — the on/off fill-light toggle (works anytime).
|
|
27045
|
+
* - `lightMode` — the auto/manual selector + manual level slider (a
|
|
27046
|
+
* camera-service control; needs an active stream).
|
|
27047
|
+
*/
|
|
27048
|
+
var NavigationFeaturesSchema = object({
|
|
27049
|
+
move: boolean(),
|
|
27050
|
+
stop: boolean(),
|
|
27051
|
+
goToPoint: boolean(),
|
|
27052
|
+
runAction: boolean(),
|
|
27053
|
+
playSound: boolean(),
|
|
27054
|
+
light: boolean(),
|
|
27055
|
+
lightMode: boolean()
|
|
27056
|
+
});
|
|
27057
|
+
/** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
|
|
27058
|
+
var NavigationLightModeSchema = _enum(["auto", "manual"]);
|
|
27059
|
+
/**
|
|
27060
|
+
* Live navigation state so the UI can reflect what the robot is doing:
|
|
27061
|
+
* - `mode` — coarse activity (idle / cleaning / following / …).
|
|
27062
|
+
* - `following` — person/pet follow is currently armed.
|
|
27063
|
+
* - `flash` — the on-camera fill light is on.
|
|
27064
|
+
* - `lightMode` — auto vs manual fill-light mode.
|
|
27065
|
+
* - `lightLevel` — manual fill-light level (40..100); meaningful when
|
|
27066
|
+
* `lightMode === 'manual'`.
|
|
27067
|
+
*/
|
|
27068
|
+
var NavigationStatusSchema = object({
|
|
27069
|
+
mode: _enum([
|
|
27070
|
+
"idle",
|
|
27071
|
+
"cleaning",
|
|
27072
|
+
"spot",
|
|
27073
|
+
"following",
|
|
27074
|
+
"goto",
|
|
27075
|
+
"returning",
|
|
27076
|
+
"paused",
|
|
27077
|
+
"unknown"
|
|
27078
|
+
]),
|
|
27079
|
+
following: boolean(),
|
|
27080
|
+
flash: boolean(),
|
|
27081
|
+
lightMode: NavigationLightModeSchema,
|
|
27082
|
+
lightLevel: number().min(40).max(100),
|
|
27083
|
+
/** Ms epoch when the slice was last updated. */
|
|
27084
|
+
lastChangedAt: number()
|
|
27085
|
+
});
|
|
27086
|
+
NavigationStatusSchema.extend({ lastFetchedAt: number() });
|
|
27087
|
+
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({
|
|
27088
|
+
deviceId: number(),
|
|
27089
|
+
actionId: NavigationActionIdSchema
|
|
27090
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
27091
|
+
deviceId: number(),
|
|
27092
|
+
soundId: number().int()
|
|
27093
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
27094
|
+
deviceId: number(),
|
|
27095
|
+
on: boolean()
|
|
27096
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
27097
|
+
deviceId: number(),
|
|
27098
|
+
mode: NavigationLightModeSchema,
|
|
27099
|
+
level: number().min(40).max(100).optional()
|
|
27100
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
27101
|
+
deviceId: number(),
|
|
27102
|
+
level: number().min(40).max(100)
|
|
27103
|
+
}), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
|
|
27104
|
+
deviceId: number(),
|
|
27105
|
+
status: NavigationStatusSchema
|
|
27106
|
+
});
|
|
26910
27107
|
DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
|
|
26911
27108
|
kind: "mutation",
|
|
26912
27109
|
auth: "admin"
|
|
@@ -31971,6 +32168,66 @@ Object.freeze({
|
|
|
31971
32168
|
addonId: null,
|
|
31972
32169
|
access: "create"
|
|
31973
32170
|
},
|
|
32171
|
+
"navigation.getFeatures": {
|
|
32172
|
+
capName: "navigation",
|
|
32173
|
+
capScope: "device",
|
|
32174
|
+
addonId: null,
|
|
32175
|
+
access: "view"
|
|
32176
|
+
},
|
|
32177
|
+
"navigation.goToPoint": {
|
|
32178
|
+
capName: "navigation",
|
|
32179
|
+
capScope: "device",
|
|
32180
|
+
addonId: null,
|
|
32181
|
+
access: "create"
|
|
32182
|
+
},
|
|
32183
|
+
"navigation.listActions": {
|
|
32184
|
+
capName: "navigation",
|
|
32185
|
+
capScope: "device",
|
|
32186
|
+
addonId: null,
|
|
32187
|
+
access: "view"
|
|
32188
|
+
},
|
|
32189
|
+
"navigation.move": {
|
|
32190
|
+
capName: "navigation",
|
|
32191
|
+
capScope: "device",
|
|
32192
|
+
addonId: null,
|
|
32193
|
+
access: "create"
|
|
32194
|
+
},
|
|
32195
|
+
"navigation.playSound": {
|
|
32196
|
+
capName: "navigation",
|
|
32197
|
+
capScope: "device",
|
|
32198
|
+
addonId: null,
|
|
32199
|
+
access: "create"
|
|
32200
|
+
},
|
|
32201
|
+
"navigation.runAction": {
|
|
32202
|
+
capName: "navigation",
|
|
32203
|
+
capScope: "device",
|
|
32204
|
+
addonId: null,
|
|
32205
|
+
access: "create"
|
|
32206
|
+
},
|
|
32207
|
+
"navigation.setLightLevel": {
|
|
32208
|
+
capName: "navigation",
|
|
32209
|
+
capScope: "device",
|
|
32210
|
+
addonId: null,
|
|
32211
|
+
access: "create"
|
|
32212
|
+
},
|
|
32213
|
+
"navigation.setLightMode": {
|
|
32214
|
+
capName: "navigation",
|
|
32215
|
+
capScope: "device",
|
|
32216
|
+
addonId: null,
|
|
32217
|
+
access: "create"
|
|
32218
|
+
},
|
|
32219
|
+
"navigation.setLightOn": {
|
|
32220
|
+
capName: "navigation",
|
|
32221
|
+
capScope: "device",
|
|
32222
|
+
addonId: null,
|
|
32223
|
+
access: "create"
|
|
32224
|
+
},
|
|
32225
|
+
"navigation.stop": {
|
|
32226
|
+
capName: "navigation",
|
|
32227
|
+
capScope: "device",
|
|
32228
|
+
addonId: null,
|
|
32229
|
+
access: "create"
|
|
32230
|
+
},
|
|
31974
32231
|
"networkAccess.getEndpoint": {
|
|
31975
32232
|
capName: "network-access",
|
|
31976
32233
|
capScope: "system",
|
|
@@ -36066,6 +36323,56 @@ Object.freeze({
|
|
|
36066
36323
|
form: "single",
|
|
36067
36324
|
optional: false
|
|
36068
36325
|
}],
|
|
36326
|
+
"navigation.getFeatures": [{
|
|
36327
|
+
name: "deviceId",
|
|
36328
|
+
form: "single",
|
|
36329
|
+
optional: false
|
|
36330
|
+
}],
|
|
36331
|
+
"navigation.goToPoint": [{
|
|
36332
|
+
name: "deviceId",
|
|
36333
|
+
form: "single",
|
|
36334
|
+
optional: false
|
|
36335
|
+
}],
|
|
36336
|
+
"navigation.listActions": [{
|
|
36337
|
+
name: "deviceId",
|
|
36338
|
+
form: "single",
|
|
36339
|
+
optional: false
|
|
36340
|
+
}],
|
|
36341
|
+
"navigation.move": [{
|
|
36342
|
+
name: "deviceId",
|
|
36343
|
+
form: "single",
|
|
36344
|
+
optional: false
|
|
36345
|
+
}],
|
|
36346
|
+
"navigation.playSound": [{
|
|
36347
|
+
name: "deviceId",
|
|
36348
|
+
form: "single",
|
|
36349
|
+
optional: false
|
|
36350
|
+
}],
|
|
36351
|
+
"navigation.runAction": [{
|
|
36352
|
+
name: "deviceId",
|
|
36353
|
+
form: "single",
|
|
36354
|
+
optional: false
|
|
36355
|
+
}],
|
|
36356
|
+
"navigation.setLightLevel": [{
|
|
36357
|
+
name: "deviceId",
|
|
36358
|
+
form: "single",
|
|
36359
|
+
optional: false
|
|
36360
|
+
}],
|
|
36361
|
+
"navigation.setLightMode": [{
|
|
36362
|
+
name: "deviceId",
|
|
36363
|
+
form: "single",
|
|
36364
|
+
optional: false
|
|
36365
|
+
}],
|
|
36366
|
+
"navigation.setLightOn": [{
|
|
36367
|
+
name: "deviceId",
|
|
36368
|
+
form: "single",
|
|
36369
|
+
optional: false
|
|
36370
|
+
}],
|
|
36371
|
+
"navigation.stop": [{
|
|
36372
|
+
name: "deviceId",
|
|
36373
|
+
form: "single",
|
|
36374
|
+
optional: false
|
|
36375
|
+
}],
|
|
36069
36376
|
"networkQuality.getDeviceStats": [{
|
|
36070
36377
|
name: "deviceId",
|
|
36071
36378
|
form: "single",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-mqtt-broker",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.71",
|
|
4
4
|
"description": "MQTT broker registry addon for CamStack — manages external broker entries + an optional embedded aedes broker. Consumers spin up their own `mqtt.js` clients via the `mqtt-broker` cap.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|