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