@camstack/addon-export-alexa 1.2.76 → 1.2.78
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/export-alexa.addon.js +313 -0
- package/dist/export-alexa.addon.mjs +313 -0
- package/package.json +1 -1
|
@@ -5433,6 +5433,12 @@ Object.fromEntries([
|
|
|
5433
5433
|
icon: "move",
|
|
5434
5434
|
order: 40
|
|
5435
5435
|
},
|
|
5436
|
+
{
|
|
5437
|
+
id: "navigation",
|
|
5438
|
+
label: "Navigation",
|
|
5439
|
+
icon: "compass",
|
|
5440
|
+
order: 41
|
|
5441
|
+
},
|
|
5436
5442
|
{
|
|
5437
5443
|
id: "consumables",
|
|
5438
5444
|
label: "Consumables",
|
|
@@ -27126,6 +27132,203 @@ DeviceType.Camera, method(object({ deviceId: number() }), PtzAutotrackStatusSche
|
|
|
27126
27132
|
deviceId: number(),
|
|
27127
27133
|
status: PtzAutotrackStatusSchema
|
|
27128
27134
|
});
|
|
27135
|
+
/**
|
|
27136
|
+
* `navigation` — a device-scoped capability that natively expresses the FULL
|
|
27137
|
+
* navigation / action surface of a robot that DRIVES ITSELF and carries an
|
|
27138
|
+
* on-board camera (the Dreame robot-vacuum camera is the first provider).
|
|
27139
|
+
*
|
|
27140
|
+
* Why a NEW cap rather than overloading `ptz`:
|
|
27141
|
+
* - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
|
|
27142
|
+
* robot vacuum has no gimbal — the whole chassis drives, turns and spins.
|
|
27143
|
+
* The two are different physical models: PTZ is absolute-position + presets,
|
|
27144
|
+
* navigation is momentary drive nudges + discrete robot ACTIONS
|
|
27145
|
+
* (dock / spot-clean / follow-pet / go-to-point / …).
|
|
27146
|
+
* - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
|
|
27147
|
+
* the reverse:
|
|
27148
|
+
* 1. a native CamStack navigation panel (data-driven from `listActions`
|
|
27149
|
+
* / `getOptions`), and
|
|
27150
|
+
* 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
|
|
27151
|
+
* robot camera shows up in the existing PTZ control path without every
|
|
27152
|
+
* PTZ provider learning about robots. The mapping lives in the adapter,
|
|
27153
|
+
* not here (see the addon design note):
|
|
27154
|
+
* ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
|
|
27155
|
+
* ptz.stop() → navigation.stop()
|
|
27156
|
+
* ptz.goHome() → navigation.runAction('goHome')
|
|
27157
|
+
* ptz.getPresets() → navigation.listActions() (id→preset)
|
|
27158
|
+
* ptz.goToPreset(id) → navigation.runAction(id)
|
|
27159
|
+
*
|
|
27160
|
+
* ## Continuous drive
|
|
27161
|
+
*
|
|
27162
|
+
* `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
|
|
27163
|
+
* sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
|
|
27164
|
+
* one `stop()` on release — exactly like the robot app's remote-drive joystick.
|
|
27165
|
+
* The provider forwards EACH `move` to one drive write; it must NOT debounce or
|
|
27166
|
+
* coalesce them. The UI owns the cadence.
|
|
27167
|
+
*
|
|
27168
|
+
* ## The action dictionary
|
|
27169
|
+
*
|
|
27170
|
+
* The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
|
|
27171
|
+
* are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
|
|
27172
|
+
* carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
|
|
27173
|
+
* native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
|
|
27174
|
+
* vendor-specific list. `kind: 'action'` entries are triggered with
|
|
27175
|
+
* `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
|
|
27176
|
+
* (the entry carries the `soundId` to pass). The general primitives — `move`,
|
|
27177
|
+
* `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
|
|
27178
|
+
*
|
|
27179
|
+
* NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
|
|
27180
|
+
* `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
|
|
27181
|
+
* that the currently-published `@apocaliss92/nodedreame` already exposes on
|
|
27182
|
+
* every device handle. A future nodedreame publish adds a typed
|
|
27183
|
+
* `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
|
|
27184
|
+
* provider can then swap the raw calls for the typed methods with no change to
|
|
27185
|
+
* THIS contract.
|
|
27186
|
+
*/
|
|
27187
|
+
/**
|
|
27188
|
+
* A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
|
|
27189
|
+
* keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
|
|
27190
|
+
* halts it.
|
|
27191
|
+
*
|
|
27192
|
+
* - `pan` — turn: negative = left, positive = right, 0 = straight.
|
|
27193
|
+
* - `tilt` — throttle: positive = forward, negative = spin / turn-around.
|
|
27194
|
+
* - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
|
|
27195
|
+
* vector by it (drivers without proportional drive ignore it).
|
|
27196
|
+
*
|
|
27197
|
+
* `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
|
|
27198
|
+
* axis alone; an all-undefined nudge is a no-op.
|
|
27199
|
+
*/
|
|
27200
|
+
var NavigationMoveCommandSchema = object({
|
|
27201
|
+
pan: number().min(-1).max(1).optional(),
|
|
27202
|
+
tilt: number().min(-1).max(1).optional(),
|
|
27203
|
+
speed: number().min(0).max(1).optional()
|
|
27204
|
+
});
|
|
27205
|
+
/**
|
|
27206
|
+
* The enumerated discrete actions a navigation-capable robot can perform via
|
|
27207
|
+
* `runAction`. This is the CLOSED vocabulary; a given device advertises the
|
|
27208
|
+
* subset it supports through `listActions`. Sounds are NOT here — they go through
|
|
27209
|
+
* `playSound` (see the `sound` dictionary entries).
|
|
27210
|
+
*/
|
|
27211
|
+
var NavigationActionIdSchema = _enum([
|
|
27212
|
+
"goHome",
|
|
27213
|
+
"locate",
|
|
27214
|
+
"spotClean",
|
|
27215
|
+
"findPet",
|
|
27216
|
+
"personFollow",
|
|
27217
|
+
"stop",
|
|
27218
|
+
"startClean",
|
|
27219
|
+
"pauseClean",
|
|
27220
|
+
"dockWash",
|
|
27221
|
+
"autoEmpty",
|
|
27222
|
+
"flashOn",
|
|
27223
|
+
"flashOff"
|
|
27224
|
+
]);
|
|
27225
|
+
/** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
|
|
27226
|
+
var NavigationEntryKindSchema = _enum(["action", "sound"]);
|
|
27227
|
+
/**
|
|
27228
|
+
* One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
|
|
27229
|
+
* native panel and the PTZ mimic render as a button.
|
|
27230
|
+
*
|
|
27231
|
+
* - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
|
|
27232
|
+
* (pass to `runAction`); for `kind:'sound'` it is a namespaced id
|
|
27233
|
+
* (`sound:meow`) whose `soundId` is passed to `playSound`.
|
|
27234
|
+
* - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
|
|
27235
|
+
* - `label` — operator-facing English label.
|
|
27236
|
+
* - `soundId` — wire sound id, present only on `kind:'sound'` entries.
|
|
27237
|
+
* - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
|
|
27238
|
+
* PTZ render ONLY enabled entries. Data-driven: the provider
|
|
27239
|
+
* flips it from config, never by editing code.
|
|
27240
|
+
*/
|
|
27241
|
+
var NavigationActionEntrySchema = object({
|
|
27242
|
+
id: string(),
|
|
27243
|
+
kind: NavigationEntryKindSchema,
|
|
27244
|
+
label: string(),
|
|
27245
|
+
icon: string(),
|
|
27246
|
+
/** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
|
|
27247
|
+
soundId: number().int().optional(),
|
|
27248
|
+
/** Per-device feature flag — render this entry only when true. */
|
|
27249
|
+
enabled: boolean()
|
|
27250
|
+
});
|
|
27251
|
+
/** Coordinates for `goToPoint` — a point on the robot's live map. */
|
|
27252
|
+
var NavigationPointSchema = object({
|
|
27253
|
+
x: number(),
|
|
27254
|
+
y: number()
|
|
27255
|
+
});
|
|
27256
|
+
/**
|
|
27257
|
+
* Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
|
|
27258
|
+
* The cap reports which are enabled so the UI / PTZ render only the controls
|
|
27259
|
+
* that are turned on for THIS device. Data-driven: the provider derives these
|
|
27260
|
+
* from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
|
|
27261
|
+
* live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
|
|
27262
|
+
* that are not dictionary entries.
|
|
27263
|
+
*
|
|
27264
|
+
* - `move` / `stop` — the momentary drive joystick.
|
|
27265
|
+
* - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
|
|
27266
|
+
* map-coordinate plumbing is wired.
|
|
27267
|
+
* - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
|
|
27268
|
+
* - `playSound` — the sound buttons (dictionary `kind:'sound'`).
|
|
27269
|
+
* - `light` — the on/off fill-light toggle (works anytime).
|
|
27270
|
+
* - `lightMode` — the auto/manual selector + manual level slider (a
|
|
27271
|
+
* camera-service control; needs an active stream).
|
|
27272
|
+
*/
|
|
27273
|
+
var NavigationFeaturesSchema = object({
|
|
27274
|
+
move: boolean(),
|
|
27275
|
+
stop: boolean(),
|
|
27276
|
+
goToPoint: boolean(),
|
|
27277
|
+
runAction: boolean(),
|
|
27278
|
+
playSound: boolean(),
|
|
27279
|
+
light: boolean(),
|
|
27280
|
+
lightMode: boolean()
|
|
27281
|
+
});
|
|
27282
|
+
/** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
|
|
27283
|
+
var NavigationLightModeSchema = _enum(["auto", "manual"]);
|
|
27284
|
+
/**
|
|
27285
|
+
* Live navigation state so the UI can reflect what the robot is doing:
|
|
27286
|
+
* - `mode` — coarse activity (idle / cleaning / following / …).
|
|
27287
|
+
* - `following` — person/pet follow is currently armed.
|
|
27288
|
+
* - `flash` — the on-camera fill light is on.
|
|
27289
|
+
* - `lightMode` — auto vs manual fill-light mode.
|
|
27290
|
+
* - `lightLevel` — manual fill-light level (40..100); meaningful when
|
|
27291
|
+
* `lightMode === 'manual'`.
|
|
27292
|
+
*/
|
|
27293
|
+
var NavigationStatusSchema = object({
|
|
27294
|
+
mode: _enum([
|
|
27295
|
+
"idle",
|
|
27296
|
+
"cleaning",
|
|
27297
|
+
"spot",
|
|
27298
|
+
"following",
|
|
27299
|
+
"goto",
|
|
27300
|
+
"returning",
|
|
27301
|
+
"paused",
|
|
27302
|
+
"unknown"
|
|
27303
|
+
]),
|
|
27304
|
+
following: boolean(),
|
|
27305
|
+
flash: boolean(),
|
|
27306
|
+
lightMode: NavigationLightModeSchema,
|
|
27307
|
+
lightLevel: number().min(40).max(100),
|
|
27308
|
+
/** Ms epoch when the slice was last updated. */
|
|
27309
|
+
lastChangedAt: number()
|
|
27310
|
+
});
|
|
27311
|
+
NavigationStatusSchema.extend({ lastFetchedAt: number() });
|
|
27312
|
+
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({
|
|
27313
|
+
deviceId: number(),
|
|
27314
|
+
actionId: NavigationActionIdSchema
|
|
27315
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
27316
|
+
deviceId: number(),
|
|
27317
|
+
soundId: number().int()
|
|
27318
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
27319
|
+
deviceId: number(),
|
|
27320
|
+
on: boolean()
|
|
27321
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
27322
|
+
deviceId: number(),
|
|
27323
|
+
mode: NavigationLightModeSchema,
|
|
27324
|
+
level: number().min(40).max(100).optional()
|
|
27325
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
27326
|
+
deviceId: number(),
|
|
27327
|
+
level: number().min(40).max(100)
|
|
27328
|
+
}), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
|
|
27329
|
+
deviceId: number(),
|
|
27330
|
+
status: NavigationStatusSchema
|
|
27331
|
+
});
|
|
27129
27332
|
DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
|
|
27130
27333
|
kind: "mutation",
|
|
27131
27334
|
auth: "admin"
|
|
@@ -32190,6 +32393,66 @@ Object.freeze({
|
|
|
32190
32393
|
addonId: null,
|
|
32191
32394
|
access: "create"
|
|
32192
32395
|
},
|
|
32396
|
+
"navigation.getFeatures": {
|
|
32397
|
+
capName: "navigation",
|
|
32398
|
+
capScope: "device",
|
|
32399
|
+
addonId: null,
|
|
32400
|
+
access: "view"
|
|
32401
|
+
},
|
|
32402
|
+
"navigation.goToPoint": {
|
|
32403
|
+
capName: "navigation",
|
|
32404
|
+
capScope: "device",
|
|
32405
|
+
addonId: null,
|
|
32406
|
+
access: "create"
|
|
32407
|
+
},
|
|
32408
|
+
"navigation.listActions": {
|
|
32409
|
+
capName: "navigation",
|
|
32410
|
+
capScope: "device",
|
|
32411
|
+
addonId: null,
|
|
32412
|
+
access: "view"
|
|
32413
|
+
},
|
|
32414
|
+
"navigation.move": {
|
|
32415
|
+
capName: "navigation",
|
|
32416
|
+
capScope: "device",
|
|
32417
|
+
addonId: null,
|
|
32418
|
+
access: "create"
|
|
32419
|
+
},
|
|
32420
|
+
"navigation.playSound": {
|
|
32421
|
+
capName: "navigation",
|
|
32422
|
+
capScope: "device",
|
|
32423
|
+
addonId: null,
|
|
32424
|
+
access: "create"
|
|
32425
|
+
},
|
|
32426
|
+
"navigation.runAction": {
|
|
32427
|
+
capName: "navigation",
|
|
32428
|
+
capScope: "device",
|
|
32429
|
+
addonId: null,
|
|
32430
|
+
access: "create"
|
|
32431
|
+
},
|
|
32432
|
+
"navigation.setLightLevel": {
|
|
32433
|
+
capName: "navigation",
|
|
32434
|
+
capScope: "device",
|
|
32435
|
+
addonId: null,
|
|
32436
|
+
access: "create"
|
|
32437
|
+
},
|
|
32438
|
+
"navigation.setLightMode": {
|
|
32439
|
+
capName: "navigation",
|
|
32440
|
+
capScope: "device",
|
|
32441
|
+
addonId: null,
|
|
32442
|
+
access: "create"
|
|
32443
|
+
},
|
|
32444
|
+
"navigation.setLightOn": {
|
|
32445
|
+
capName: "navigation",
|
|
32446
|
+
capScope: "device",
|
|
32447
|
+
addonId: null,
|
|
32448
|
+
access: "create"
|
|
32449
|
+
},
|
|
32450
|
+
"navigation.stop": {
|
|
32451
|
+
capName: "navigation",
|
|
32452
|
+
capScope: "device",
|
|
32453
|
+
addonId: null,
|
|
32454
|
+
access: "create"
|
|
32455
|
+
},
|
|
32193
32456
|
"networkAccess.getEndpoint": {
|
|
32194
32457
|
capName: "network-access",
|
|
32195
32458
|
capScope: "system",
|
|
@@ -36285,6 +36548,56 @@ Object.freeze({
|
|
|
36285
36548
|
form: "single",
|
|
36286
36549
|
optional: false
|
|
36287
36550
|
}],
|
|
36551
|
+
"navigation.getFeatures": [{
|
|
36552
|
+
name: "deviceId",
|
|
36553
|
+
form: "single",
|
|
36554
|
+
optional: false
|
|
36555
|
+
}],
|
|
36556
|
+
"navigation.goToPoint": [{
|
|
36557
|
+
name: "deviceId",
|
|
36558
|
+
form: "single",
|
|
36559
|
+
optional: false
|
|
36560
|
+
}],
|
|
36561
|
+
"navigation.listActions": [{
|
|
36562
|
+
name: "deviceId",
|
|
36563
|
+
form: "single",
|
|
36564
|
+
optional: false
|
|
36565
|
+
}],
|
|
36566
|
+
"navigation.move": [{
|
|
36567
|
+
name: "deviceId",
|
|
36568
|
+
form: "single",
|
|
36569
|
+
optional: false
|
|
36570
|
+
}],
|
|
36571
|
+
"navigation.playSound": [{
|
|
36572
|
+
name: "deviceId",
|
|
36573
|
+
form: "single",
|
|
36574
|
+
optional: false
|
|
36575
|
+
}],
|
|
36576
|
+
"navigation.runAction": [{
|
|
36577
|
+
name: "deviceId",
|
|
36578
|
+
form: "single",
|
|
36579
|
+
optional: false
|
|
36580
|
+
}],
|
|
36581
|
+
"navigation.setLightLevel": [{
|
|
36582
|
+
name: "deviceId",
|
|
36583
|
+
form: "single",
|
|
36584
|
+
optional: false
|
|
36585
|
+
}],
|
|
36586
|
+
"navigation.setLightMode": [{
|
|
36587
|
+
name: "deviceId",
|
|
36588
|
+
form: "single",
|
|
36589
|
+
optional: false
|
|
36590
|
+
}],
|
|
36591
|
+
"navigation.setLightOn": [{
|
|
36592
|
+
name: "deviceId",
|
|
36593
|
+
form: "single",
|
|
36594
|
+
optional: false
|
|
36595
|
+
}],
|
|
36596
|
+
"navigation.stop": [{
|
|
36597
|
+
name: "deviceId",
|
|
36598
|
+
form: "single",
|
|
36599
|
+
optional: false
|
|
36600
|
+
}],
|
|
36288
36601
|
"networkQuality.getDeviceStats": [{
|
|
36289
36602
|
name: "deviceId",
|
|
36290
36603
|
form: "single",
|
|
@@ -5406,6 +5406,12 @@ Object.fromEntries([
|
|
|
5406
5406
|
icon: "move",
|
|
5407
5407
|
order: 40
|
|
5408
5408
|
},
|
|
5409
|
+
{
|
|
5410
|
+
id: "navigation",
|
|
5411
|
+
label: "Navigation",
|
|
5412
|
+
icon: "compass",
|
|
5413
|
+
order: 41
|
|
5414
|
+
},
|
|
5409
5415
|
{
|
|
5410
5416
|
id: "consumables",
|
|
5411
5417
|
label: "Consumables",
|
|
@@ -27099,6 +27105,203 @@ DeviceType.Camera, method(object({ deviceId: number() }), PtzAutotrackStatusSche
|
|
|
27099
27105
|
deviceId: number(),
|
|
27100
27106
|
status: PtzAutotrackStatusSchema
|
|
27101
27107
|
});
|
|
27108
|
+
/**
|
|
27109
|
+
* `navigation` — a device-scoped capability that natively expresses the FULL
|
|
27110
|
+
* navigation / action surface of a robot that DRIVES ITSELF and carries an
|
|
27111
|
+
* on-board camera (the Dreame robot-vacuum camera is the first provider).
|
|
27112
|
+
*
|
|
27113
|
+
* Why a NEW cap rather than overloading `ptz`:
|
|
27114
|
+
* - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
|
|
27115
|
+
* robot vacuum has no gimbal — the whole chassis drives, turns and spins.
|
|
27116
|
+
* The two are different physical models: PTZ is absolute-position + presets,
|
|
27117
|
+
* navigation is momentary drive nudges + discrete robot ACTIONS
|
|
27118
|
+
* (dock / spot-clean / follow-pet / go-to-point / …).
|
|
27119
|
+
* - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
|
|
27120
|
+
* the reverse:
|
|
27121
|
+
* 1. a native CamStack navigation panel (data-driven from `listActions`
|
|
27122
|
+
* / `getOptions`), and
|
|
27123
|
+
* 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
|
|
27124
|
+
* robot camera shows up in the existing PTZ control path without every
|
|
27125
|
+
* PTZ provider learning about robots. The mapping lives in the adapter,
|
|
27126
|
+
* not here (see the addon design note):
|
|
27127
|
+
* ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
|
|
27128
|
+
* ptz.stop() → navigation.stop()
|
|
27129
|
+
* ptz.goHome() → navigation.runAction('goHome')
|
|
27130
|
+
* ptz.getPresets() → navigation.listActions() (id→preset)
|
|
27131
|
+
* ptz.goToPreset(id) → navigation.runAction(id)
|
|
27132
|
+
*
|
|
27133
|
+
* ## Continuous drive
|
|
27134
|
+
*
|
|
27135
|
+
* `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
|
|
27136
|
+
* sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
|
|
27137
|
+
* one `stop()` on release — exactly like the robot app's remote-drive joystick.
|
|
27138
|
+
* The provider forwards EACH `move` to one drive write; it must NOT debounce or
|
|
27139
|
+
* coalesce them. The UI owns the cadence.
|
|
27140
|
+
*
|
|
27141
|
+
* ## The action dictionary
|
|
27142
|
+
*
|
|
27143
|
+
* The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
|
|
27144
|
+
* are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
|
|
27145
|
+
* carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
|
|
27146
|
+
* native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
|
|
27147
|
+
* vendor-specific list. `kind: 'action'` entries are triggered with
|
|
27148
|
+
* `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
|
|
27149
|
+
* (the entry carries the `soundId` to pass). The general primitives — `move`,
|
|
27150
|
+
* `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
|
|
27151
|
+
*
|
|
27152
|
+
* NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
|
|
27153
|
+
* `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
|
|
27154
|
+
* that the currently-published `@apocaliss92/nodedreame` already exposes on
|
|
27155
|
+
* every device handle. A future nodedreame publish adds a typed
|
|
27156
|
+
* `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
|
|
27157
|
+
* provider can then swap the raw calls for the typed methods with no change to
|
|
27158
|
+
* THIS contract.
|
|
27159
|
+
*/
|
|
27160
|
+
/**
|
|
27161
|
+
* A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
|
|
27162
|
+
* keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
|
|
27163
|
+
* halts it.
|
|
27164
|
+
*
|
|
27165
|
+
* - `pan` — turn: negative = left, positive = right, 0 = straight.
|
|
27166
|
+
* - `tilt` — throttle: positive = forward, negative = spin / turn-around.
|
|
27167
|
+
* - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
|
|
27168
|
+
* vector by it (drivers without proportional drive ignore it).
|
|
27169
|
+
*
|
|
27170
|
+
* `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
|
|
27171
|
+
* axis alone; an all-undefined nudge is a no-op.
|
|
27172
|
+
*/
|
|
27173
|
+
var NavigationMoveCommandSchema = object({
|
|
27174
|
+
pan: number().min(-1).max(1).optional(),
|
|
27175
|
+
tilt: number().min(-1).max(1).optional(),
|
|
27176
|
+
speed: number().min(0).max(1).optional()
|
|
27177
|
+
});
|
|
27178
|
+
/**
|
|
27179
|
+
* The enumerated discrete actions a navigation-capable robot can perform via
|
|
27180
|
+
* `runAction`. This is the CLOSED vocabulary; a given device advertises the
|
|
27181
|
+
* subset it supports through `listActions`. Sounds are NOT here — they go through
|
|
27182
|
+
* `playSound` (see the `sound` dictionary entries).
|
|
27183
|
+
*/
|
|
27184
|
+
var NavigationActionIdSchema = _enum([
|
|
27185
|
+
"goHome",
|
|
27186
|
+
"locate",
|
|
27187
|
+
"spotClean",
|
|
27188
|
+
"findPet",
|
|
27189
|
+
"personFollow",
|
|
27190
|
+
"stop",
|
|
27191
|
+
"startClean",
|
|
27192
|
+
"pauseClean",
|
|
27193
|
+
"dockWash",
|
|
27194
|
+
"autoEmpty",
|
|
27195
|
+
"flashOn",
|
|
27196
|
+
"flashOff"
|
|
27197
|
+
]);
|
|
27198
|
+
/** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
|
|
27199
|
+
var NavigationEntryKindSchema = _enum(["action", "sound"]);
|
|
27200
|
+
/**
|
|
27201
|
+
* One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
|
|
27202
|
+
* native panel and the PTZ mimic render as a button.
|
|
27203
|
+
*
|
|
27204
|
+
* - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
|
|
27205
|
+
* (pass to `runAction`); for `kind:'sound'` it is a namespaced id
|
|
27206
|
+
* (`sound:meow`) whose `soundId` is passed to `playSound`.
|
|
27207
|
+
* - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
|
|
27208
|
+
* - `label` — operator-facing English label.
|
|
27209
|
+
* - `soundId` — wire sound id, present only on `kind:'sound'` entries.
|
|
27210
|
+
* - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
|
|
27211
|
+
* PTZ render ONLY enabled entries. Data-driven: the provider
|
|
27212
|
+
* flips it from config, never by editing code.
|
|
27213
|
+
*/
|
|
27214
|
+
var NavigationActionEntrySchema = object({
|
|
27215
|
+
id: string(),
|
|
27216
|
+
kind: NavigationEntryKindSchema,
|
|
27217
|
+
label: string(),
|
|
27218
|
+
icon: string(),
|
|
27219
|
+
/** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
|
|
27220
|
+
soundId: number().int().optional(),
|
|
27221
|
+
/** Per-device feature flag — render this entry only when true. */
|
|
27222
|
+
enabled: boolean()
|
|
27223
|
+
});
|
|
27224
|
+
/** Coordinates for `goToPoint` — a point on the robot's live map. */
|
|
27225
|
+
var NavigationPointSchema = object({
|
|
27226
|
+
x: number(),
|
|
27227
|
+
y: number()
|
|
27228
|
+
});
|
|
27229
|
+
/**
|
|
27230
|
+
* Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
|
|
27231
|
+
* The cap reports which are enabled so the UI / PTZ render only the controls
|
|
27232
|
+
* that are turned on for THIS device. Data-driven: the provider derives these
|
|
27233
|
+
* from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
|
|
27234
|
+
* live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
|
|
27235
|
+
* that are not dictionary entries.
|
|
27236
|
+
*
|
|
27237
|
+
* - `move` / `stop` — the momentary drive joystick.
|
|
27238
|
+
* - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
|
|
27239
|
+
* map-coordinate plumbing is wired.
|
|
27240
|
+
* - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
|
|
27241
|
+
* - `playSound` — the sound buttons (dictionary `kind:'sound'`).
|
|
27242
|
+
* - `light` — the on/off fill-light toggle (works anytime).
|
|
27243
|
+
* - `lightMode` — the auto/manual selector + manual level slider (a
|
|
27244
|
+
* camera-service control; needs an active stream).
|
|
27245
|
+
*/
|
|
27246
|
+
var NavigationFeaturesSchema = object({
|
|
27247
|
+
move: boolean(),
|
|
27248
|
+
stop: boolean(),
|
|
27249
|
+
goToPoint: boolean(),
|
|
27250
|
+
runAction: boolean(),
|
|
27251
|
+
playSound: boolean(),
|
|
27252
|
+
light: boolean(),
|
|
27253
|
+
lightMode: boolean()
|
|
27254
|
+
});
|
|
27255
|
+
/** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
|
|
27256
|
+
var NavigationLightModeSchema = _enum(["auto", "manual"]);
|
|
27257
|
+
/**
|
|
27258
|
+
* Live navigation state so the UI can reflect what the robot is doing:
|
|
27259
|
+
* - `mode` — coarse activity (idle / cleaning / following / …).
|
|
27260
|
+
* - `following` — person/pet follow is currently armed.
|
|
27261
|
+
* - `flash` — the on-camera fill light is on.
|
|
27262
|
+
* - `lightMode` — auto vs manual fill-light mode.
|
|
27263
|
+
* - `lightLevel` — manual fill-light level (40..100); meaningful when
|
|
27264
|
+
* `lightMode === 'manual'`.
|
|
27265
|
+
*/
|
|
27266
|
+
var NavigationStatusSchema = object({
|
|
27267
|
+
mode: _enum([
|
|
27268
|
+
"idle",
|
|
27269
|
+
"cleaning",
|
|
27270
|
+
"spot",
|
|
27271
|
+
"following",
|
|
27272
|
+
"goto",
|
|
27273
|
+
"returning",
|
|
27274
|
+
"paused",
|
|
27275
|
+
"unknown"
|
|
27276
|
+
]),
|
|
27277
|
+
following: boolean(),
|
|
27278
|
+
flash: boolean(),
|
|
27279
|
+
lightMode: NavigationLightModeSchema,
|
|
27280
|
+
lightLevel: number().min(40).max(100),
|
|
27281
|
+
/** Ms epoch when the slice was last updated. */
|
|
27282
|
+
lastChangedAt: number()
|
|
27283
|
+
});
|
|
27284
|
+
NavigationStatusSchema.extend({ lastFetchedAt: number() });
|
|
27285
|
+
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({
|
|
27286
|
+
deviceId: number(),
|
|
27287
|
+
actionId: NavigationActionIdSchema
|
|
27288
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
27289
|
+
deviceId: number(),
|
|
27290
|
+
soundId: number().int()
|
|
27291
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
27292
|
+
deviceId: number(),
|
|
27293
|
+
on: boolean()
|
|
27294
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
27295
|
+
deviceId: number(),
|
|
27296
|
+
mode: NavigationLightModeSchema,
|
|
27297
|
+
level: number().min(40).max(100).optional()
|
|
27298
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
27299
|
+
deviceId: number(),
|
|
27300
|
+
level: number().min(40).max(100)
|
|
27301
|
+
}), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
|
|
27302
|
+
deviceId: number(),
|
|
27303
|
+
status: NavigationStatusSchema
|
|
27304
|
+
});
|
|
27102
27305
|
DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
|
|
27103
27306
|
kind: "mutation",
|
|
27104
27307
|
auth: "admin"
|
|
@@ -32163,6 +32366,66 @@ Object.freeze({
|
|
|
32163
32366
|
addonId: null,
|
|
32164
32367
|
access: "create"
|
|
32165
32368
|
},
|
|
32369
|
+
"navigation.getFeatures": {
|
|
32370
|
+
capName: "navigation",
|
|
32371
|
+
capScope: "device",
|
|
32372
|
+
addonId: null,
|
|
32373
|
+
access: "view"
|
|
32374
|
+
},
|
|
32375
|
+
"navigation.goToPoint": {
|
|
32376
|
+
capName: "navigation",
|
|
32377
|
+
capScope: "device",
|
|
32378
|
+
addonId: null,
|
|
32379
|
+
access: "create"
|
|
32380
|
+
},
|
|
32381
|
+
"navigation.listActions": {
|
|
32382
|
+
capName: "navigation",
|
|
32383
|
+
capScope: "device",
|
|
32384
|
+
addonId: null,
|
|
32385
|
+
access: "view"
|
|
32386
|
+
},
|
|
32387
|
+
"navigation.move": {
|
|
32388
|
+
capName: "navigation",
|
|
32389
|
+
capScope: "device",
|
|
32390
|
+
addonId: null,
|
|
32391
|
+
access: "create"
|
|
32392
|
+
},
|
|
32393
|
+
"navigation.playSound": {
|
|
32394
|
+
capName: "navigation",
|
|
32395
|
+
capScope: "device",
|
|
32396
|
+
addonId: null,
|
|
32397
|
+
access: "create"
|
|
32398
|
+
},
|
|
32399
|
+
"navigation.runAction": {
|
|
32400
|
+
capName: "navigation",
|
|
32401
|
+
capScope: "device",
|
|
32402
|
+
addonId: null,
|
|
32403
|
+
access: "create"
|
|
32404
|
+
},
|
|
32405
|
+
"navigation.setLightLevel": {
|
|
32406
|
+
capName: "navigation",
|
|
32407
|
+
capScope: "device",
|
|
32408
|
+
addonId: null,
|
|
32409
|
+
access: "create"
|
|
32410
|
+
},
|
|
32411
|
+
"navigation.setLightMode": {
|
|
32412
|
+
capName: "navigation",
|
|
32413
|
+
capScope: "device",
|
|
32414
|
+
addonId: null,
|
|
32415
|
+
access: "create"
|
|
32416
|
+
},
|
|
32417
|
+
"navigation.setLightOn": {
|
|
32418
|
+
capName: "navigation",
|
|
32419
|
+
capScope: "device",
|
|
32420
|
+
addonId: null,
|
|
32421
|
+
access: "create"
|
|
32422
|
+
},
|
|
32423
|
+
"navigation.stop": {
|
|
32424
|
+
capName: "navigation",
|
|
32425
|
+
capScope: "device",
|
|
32426
|
+
addonId: null,
|
|
32427
|
+
access: "create"
|
|
32428
|
+
},
|
|
32166
32429
|
"networkAccess.getEndpoint": {
|
|
32167
32430
|
capName: "network-access",
|
|
32168
32431
|
capScope: "system",
|
|
@@ -36258,6 +36521,56 @@ Object.freeze({
|
|
|
36258
36521
|
form: "single",
|
|
36259
36522
|
optional: false
|
|
36260
36523
|
}],
|
|
36524
|
+
"navigation.getFeatures": [{
|
|
36525
|
+
name: "deviceId",
|
|
36526
|
+
form: "single",
|
|
36527
|
+
optional: false
|
|
36528
|
+
}],
|
|
36529
|
+
"navigation.goToPoint": [{
|
|
36530
|
+
name: "deviceId",
|
|
36531
|
+
form: "single",
|
|
36532
|
+
optional: false
|
|
36533
|
+
}],
|
|
36534
|
+
"navigation.listActions": [{
|
|
36535
|
+
name: "deviceId",
|
|
36536
|
+
form: "single",
|
|
36537
|
+
optional: false
|
|
36538
|
+
}],
|
|
36539
|
+
"navigation.move": [{
|
|
36540
|
+
name: "deviceId",
|
|
36541
|
+
form: "single",
|
|
36542
|
+
optional: false
|
|
36543
|
+
}],
|
|
36544
|
+
"navigation.playSound": [{
|
|
36545
|
+
name: "deviceId",
|
|
36546
|
+
form: "single",
|
|
36547
|
+
optional: false
|
|
36548
|
+
}],
|
|
36549
|
+
"navigation.runAction": [{
|
|
36550
|
+
name: "deviceId",
|
|
36551
|
+
form: "single",
|
|
36552
|
+
optional: false
|
|
36553
|
+
}],
|
|
36554
|
+
"navigation.setLightLevel": [{
|
|
36555
|
+
name: "deviceId",
|
|
36556
|
+
form: "single",
|
|
36557
|
+
optional: false
|
|
36558
|
+
}],
|
|
36559
|
+
"navigation.setLightMode": [{
|
|
36560
|
+
name: "deviceId",
|
|
36561
|
+
form: "single",
|
|
36562
|
+
optional: false
|
|
36563
|
+
}],
|
|
36564
|
+
"navigation.setLightOn": [{
|
|
36565
|
+
name: "deviceId",
|
|
36566
|
+
form: "single",
|
|
36567
|
+
optional: false
|
|
36568
|
+
}],
|
|
36569
|
+
"navigation.stop": [{
|
|
36570
|
+
name: "deviceId",
|
|
36571
|
+
form: "single",
|
|
36572
|
+
optional: false
|
|
36573
|
+
}],
|
|
36261
36574
|
"networkQuality.getDeviceStats": [{
|
|
36262
36575
|
name: "deviceId",
|
|
36263
36576
|
form: "single",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-export-alexa",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.78",
|
|
4
4
|
"description": "Alexa Smart Home Skill export — hub-side OAuth provider + directive handler. The companion AWS Lambda forwards Alexa directives to this addon's /addon/export-alexa/directive endpoint.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|