@camstack/addon-export-hap 1.2.80 → 1.2.82

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.
@@ -84,7 +84,7 @@ function carryForward(base, existing, keys) {
84
84
  return out;
85
85
  }
86
86
  //#endregion
87
- //#region ../types/dist/event-category-BZL-fdNj.mjs
87
+ //#region ../types/dist/event-category-zAv7pMUz.mjs
88
88
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
89
89
  EventCategory["SystemBoot"] = "system.boot";
90
90
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -456,6 +456,13 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
456
456
  */
457
457
  EventCategory["BatteryOnStatusChanged"] = "battery.onStatusChanged";
458
458
  /**
459
+ * Cap event fired by every device that registers the `network-link`
460
+ * capability. Mirrors the cap definition's `onStatusChanged`. Carries
461
+ * `{ deviceId, status: NetworkLinkStatus }` — a link switch or a signal
462
+ * reading that moved.
463
+ */
464
+ EventCategory["NetworkLinkOnStatusChanged"] = "network-link.onStatusChanged";
465
+ /**
459
466
  * Emitted by the battery cap provider WHEN `wakeForStream` enters the
460
467
  * "wake in progress" window — between the Baichuan wake-up issue and
461
468
  * the camera's first dialed-back RTP packet. The stream-broker
@@ -23986,6 +23993,39 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, meth
23986
23993
  deviceId: number(),
23987
23994
  status: BatteryStatusSchema
23988
23995
  });
23996
+ /**
23997
+ * Network-link snapshot. Same shape for every provider (a Reolink wifi
23998
+ * camera, a Home Assistant device with a signal-strength sensor, a Tapo
23999
+ * plug): one slice under `device.runtimeState['network-link']`, one badge,
24000
+ * one Home Assistant projection.
24001
+ */
24002
+ var NetworkLinkStatusSchema = object({
24003
+ /** The link the device is on. `'unknown'` = not read yet, not "no link". */
24004
+ type: _enum([
24005
+ "wifi",
24006
+ "ethernet",
24007
+ "cellular",
24008
+ "unknown"
24009
+ ]),
24010
+ /**
24011
+ * Link quality, 0..100 inclusive, normalised by the provider from whatever
24012
+ * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
24013
+ * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
24014
+ * one whose reading has not landed must not be drawn at 0 %. Consumers
24015
+ * SKIP a null rather than coerce it.
24016
+ */
24017
+ signalPercent: number().min(0).max(100).nullable(),
24018
+ /** Raw received signal strength in dBm, when the firmware reports one. */
24019
+ rssiDbm: number().optional(),
24020
+ /** Network name of a wireless link, when the firmware reports it. */
24021
+ ssid: string().optional(),
24022
+ /** Ms epoch of the last observation. Lets consumers reason about freshness. */
24023
+ lastUpdated: number()
24024
+ });
24025
+ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
24026
+ deviceId: number(),
24027
+ status: NetworkLinkStatusSchema
24028
+ });
23989
24029
  object({
23990
24030
  on: boolean(),
23991
24031
  /** Ms epoch of the last transition. 0 if never observed. */
@@ -27624,6 +27664,203 @@ DeviceType.Camera, method(object({ deviceId: number() }), PtzAutotrackStatusSche
27624
27664
  deviceId: number(),
27625
27665
  status: PtzAutotrackStatusSchema
27626
27666
  });
27667
+ /**
27668
+ * `navigation` — a device-scoped capability that natively expresses the FULL
27669
+ * navigation / action surface of a robot that DRIVES ITSELF and carries an
27670
+ * on-board camera (the Dreame robot-vacuum camera is the first provider).
27671
+ *
27672
+ * Why a NEW cap rather than overloading `ptz`:
27673
+ * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
27674
+ * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
27675
+ * The two are different physical models: PTZ is absolute-position + presets,
27676
+ * navigation is momentary drive nudges + discrete robot ACTIONS
27677
+ * (dock / spot-clean / follow-pet / go-to-point / …).
27678
+ * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
27679
+ * the reverse:
27680
+ * 1. a native CamStack navigation panel (data-driven from `listActions`
27681
+ * / `getOptions`), and
27682
+ * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
27683
+ * robot camera shows up in the existing PTZ control path without every
27684
+ * PTZ provider learning about robots. The mapping lives in the adapter,
27685
+ * not here (see the addon design note):
27686
+ * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
27687
+ * ptz.stop() → navigation.stop()
27688
+ * ptz.goHome() → navigation.runAction('goHome')
27689
+ * ptz.getPresets() → navigation.listActions() (id→preset)
27690
+ * ptz.goToPreset(id) → navigation.runAction(id)
27691
+ *
27692
+ * ## Continuous drive
27693
+ *
27694
+ * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
27695
+ * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
27696
+ * one `stop()` on release — exactly like the robot app's remote-drive joystick.
27697
+ * The provider forwards EACH `move` to one drive write; it must NOT debounce or
27698
+ * coalesce them. The UI owns the cadence.
27699
+ *
27700
+ * ## The action dictionary
27701
+ *
27702
+ * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
27703
+ * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
27704
+ * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
27705
+ * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
27706
+ * vendor-specific list. `kind: 'action'` entries are triggered with
27707
+ * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
27708
+ * (the entry carries the `soundId` to pass). The general primitives — `move`,
27709
+ * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
27710
+ *
27711
+ * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
27712
+ * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
27713
+ * that the currently-published `@apocaliss92/nodedreame` already exposes on
27714
+ * every device handle. A future nodedreame publish adds a typed
27715
+ * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
27716
+ * provider can then swap the raw calls for the typed methods with no change to
27717
+ * THIS contract.
27718
+ */
27719
+ /**
27720
+ * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
27721
+ * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
27722
+ * halts it.
27723
+ *
27724
+ * - `pan` — turn: negative = left, positive = right, 0 = straight.
27725
+ * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
27726
+ * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
27727
+ * vector by it (drivers without proportional drive ignore it).
27728
+ *
27729
+ * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
27730
+ * axis alone; an all-undefined nudge is a no-op.
27731
+ */
27732
+ var NavigationMoveCommandSchema = object({
27733
+ pan: number().min(-1).max(1).optional(),
27734
+ tilt: number().min(-1).max(1).optional(),
27735
+ speed: number().min(0).max(1).optional()
27736
+ });
27737
+ /**
27738
+ * The enumerated discrete actions a navigation-capable robot can perform via
27739
+ * `runAction`. This is the CLOSED vocabulary; a given device advertises the
27740
+ * subset it supports through `listActions`. Sounds are NOT here — they go through
27741
+ * `playSound` (see the `sound` dictionary entries).
27742
+ */
27743
+ var NavigationActionIdSchema = _enum([
27744
+ "goHome",
27745
+ "locate",
27746
+ "spotClean",
27747
+ "findPet",
27748
+ "personFollow",
27749
+ "stop",
27750
+ "startClean",
27751
+ "pauseClean",
27752
+ "dockWash",
27753
+ "autoEmpty",
27754
+ "flashOn",
27755
+ "flashOff"
27756
+ ]);
27757
+ /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
27758
+ var NavigationEntryKindSchema = _enum(["action", "sound"]);
27759
+ /**
27760
+ * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
27761
+ * native panel and the PTZ mimic render as a button.
27762
+ *
27763
+ * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
27764
+ * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
27765
+ * (`sound:meow`) whose `soundId` is passed to `playSound`.
27766
+ * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
27767
+ * - `label` — operator-facing English label.
27768
+ * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
27769
+ * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
27770
+ * PTZ render ONLY enabled entries. Data-driven: the provider
27771
+ * flips it from config, never by editing code.
27772
+ */
27773
+ var NavigationActionEntrySchema = object({
27774
+ id: string(),
27775
+ kind: NavigationEntryKindSchema,
27776
+ label: string(),
27777
+ icon: string(),
27778
+ /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
27779
+ soundId: number().int().optional(),
27780
+ /** Per-device feature flag — render this entry only when true. */
27781
+ enabled: boolean()
27782
+ });
27783
+ /** Coordinates for `goToPoint` — a point on the robot's live map. */
27784
+ var NavigationPointSchema = object({
27785
+ x: number(),
27786
+ y: number()
27787
+ });
27788
+ /**
27789
+ * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
27790
+ * The cap reports which are enabled so the UI / PTZ render only the controls
27791
+ * that are turned on for THIS device. Data-driven: the provider derives these
27792
+ * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
27793
+ * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
27794
+ * that are not dictionary entries.
27795
+ *
27796
+ * - `move` / `stop` — the momentary drive joystick.
27797
+ * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
27798
+ * map-coordinate plumbing is wired.
27799
+ * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
27800
+ * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
27801
+ * - `light` — the on/off fill-light toggle (works anytime).
27802
+ * - `lightMode` — the auto/manual selector + manual level slider (a
27803
+ * camera-service control; needs an active stream).
27804
+ */
27805
+ var NavigationFeaturesSchema = object({
27806
+ move: boolean(),
27807
+ stop: boolean(),
27808
+ goToPoint: boolean(),
27809
+ runAction: boolean(),
27810
+ playSound: boolean(),
27811
+ light: boolean(),
27812
+ lightMode: boolean()
27813
+ });
27814
+ /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
27815
+ var NavigationLightModeSchema = _enum(["auto", "manual"]);
27816
+ /**
27817
+ * Live navigation state so the UI can reflect what the robot is doing:
27818
+ * - `mode` — coarse activity (idle / cleaning / following / …).
27819
+ * - `following` — person/pet follow is currently armed.
27820
+ * - `flash` — the on-camera fill light is on.
27821
+ * - `lightMode` — auto vs manual fill-light mode.
27822
+ * - `lightLevel` — manual fill-light level (40..100); meaningful when
27823
+ * `lightMode === 'manual'`.
27824
+ */
27825
+ var NavigationStatusSchema = object({
27826
+ mode: _enum([
27827
+ "idle",
27828
+ "cleaning",
27829
+ "spot",
27830
+ "following",
27831
+ "goto",
27832
+ "returning",
27833
+ "paused",
27834
+ "unknown"
27835
+ ]),
27836
+ following: boolean(),
27837
+ flash: boolean(),
27838
+ lightMode: NavigationLightModeSchema,
27839
+ lightLevel: number().min(40).max(100),
27840
+ /** Ms epoch when the slice was last updated. */
27841
+ lastChangedAt: number()
27842
+ });
27843
+ NavigationStatusSchema.extend({ lastFetchedAt: number() });
27844
+ 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({
27845
+ deviceId: number(),
27846
+ actionId: NavigationActionIdSchema
27847
+ }), _void(), { kind: "mutation" }), method(object({
27848
+ deviceId: number(),
27849
+ soundId: number().int()
27850
+ }), _void(), { kind: "mutation" }), method(object({
27851
+ deviceId: number(),
27852
+ on: boolean()
27853
+ }), _void(), { kind: "mutation" }), method(object({
27854
+ deviceId: number(),
27855
+ mode: NavigationLightModeSchema,
27856
+ level: number().min(40).max(100).optional()
27857
+ }), _void(), { kind: "mutation" }), method(object({
27858
+ deviceId: number(),
27859
+ level: number().min(40).max(100)
27860
+ }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
27861
+ deviceId: number(),
27862
+ status: NavigationStatusSchema
27863
+ });
27627
27864
  DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
27628
27865
  kind: "mutation",
27629
27866
  auth: "admin"
@@ -32713,6 +32950,66 @@ Object.freeze({
32713
32950
  addonId: null,
32714
32951
  access: "create"
32715
32952
  },
32953
+ "navigation.getFeatures": {
32954
+ capName: "navigation",
32955
+ capScope: "device",
32956
+ addonId: null,
32957
+ access: "view"
32958
+ },
32959
+ "navigation.goToPoint": {
32960
+ capName: "navigation",
32961
+ capScope: "device",
32962
+ addonId: null,
32963
+ access: "create"
32964
+ },
32965
+ "navigation.listActions": {
32966
+ capName: "navigation",
32967
+ capScope: "device",
32968
+ addonId: null,
32969
+ access: "view"
32970
+ },
32971
+ "navigation.move": {
32972
+ capName: "navigation",
32973
+ capScope: "device",
32974
+ addonId: null,
32975
+ access: "create"
32976
+ },
32977
+ "navigation.playSound": {
32978
+ capName: "navigation",
32979
+ capScope: "device",
32980
+ addonId: null,
32981
+ access: "create"
32982
+ },
32983
+ "navigation.runAction": {
32984
+ capName: "navigation",
32985
+ capScope: "device",
32986
+ addonId: null,
32987
+ access: "create"
32988
+ },
32989
+ "navigation.setLightLevel": {
32990
+ capName: "navigation",
32991
+ capScope: "device",
32992
+ addonId: null,
32993
+ access: "create"
32994
+ },
32995
+ "navigation.setLightMode": {
32996
+ capName: "navigation",
32997
+ capScope: "device",
32998
+ addonId: null,
32999
+ access: "create"
33000
+ },
33001
+ "navigation.setLightOn": {
33002
+ capName: "navigation",
33003
+ capScope: "device",
33004
+ addonId: null,
33005
+ access: "create"
33006
+ },
33007
+ "navigation.stop": {
33008
+ capName: "navigation",
33009
+ capScope: "device",
33010
+ addonId: null,
33011
+ access: "create"
33012
+ },
32716
33013
  "networkAccess.getEndpoint": {
32717
33014
  capName: "network-access",
32718
33015
  capScope: "system",
@@ -36808,6 +37105,56 @@ Object.freeze({
36808
37105
  form: "single",
36809
37106
  optional: false
36810
37107
  }],
37108
+ "navigation.getFeatures": [{
37109
+ name: "deviceId",
37110
+ form: "single",
37111
+ optional: false
37112
+ }],
37113
+ "navigation.goToPoint": [{
37114
+ name: "deviceId",
37115
+ form: "single",
37116
+ optional: false
37117
+ }],
37118
+ "navigation.listActions": [{
37119
+ name: "deviceId",
37120
+ form: "single",
37121
+ optional: false
37122
+ }],
37123
+ "navigation.move": [{
37124
+ name: "deviceId",
37125
+ form: "single",
37126
+ optional: false
37127
+ }],
37128
+ "navigation.playSound": [{
37129
+ name: "deviceId",
37130
+ form: "single",
37131
+ optional: false
37132
+ }],
37133
+ "navigation.runAction": [{
37134
+ name: "deviceId",
37135
+ form: "single",
37136
+ optional: false
37137
+ }],
37138
+ "navigation.setLightLevel": [{
37139
+ name: "deviceId",
37140
+ form: "single",
37141
+ optional: false
37142
+ }],
37143
+ "navigation.setLightMode": [{
37144
+ name: "deviceId",
37145
+ form: "single",
37146
+ optional: false
37147
+ }],
37148
+ "navigation.setLightOn": [{
37149
+ name: "deviceId",
37150
+ form: "single",
37151
+ optional: false
37152
+ }],
37153
+ "navigation.stop": [{
37154
+ name: "deviceId",
37155
+ form: "single",
37156
+ optional: false
37157
+ }],
36811
37158
  "networkQuality.getDeviceStats": [{
36812
37159
  name: "deviceId",
36813
37160
  form: "single",
@@ -72,7 +72,7 @@ function carryForward(base, existing, keys) {
72
72
  return out;
73
73
  }
74
74
  //#endregion
75
- //#region ../types/dist/event-category-BZL-fdNj.mjs
75
+ //#region ../types/dist/event-category-zAv7pMUz.mjs
76
76
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
77
77
  EventCategory["SystemBoot"] = "system.boot";
78
78
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -444,6 +444,13 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
444
444
  */
445
445
  EventCategory["BatteryOnStatusChanged"] = "battery.onStatusChanged";
446
446
  /**
447
+ * Cap event fired by every device that registers the `network-link`
448
+ * capability. Mirrors the cap definition's `onStatusChanged`. Carries
449
+ * `{ deviceId, status: NetworkLinkStatus }` — a link switch or a signal
450
+ * reading that moved.
451
+ */
452
+ EventCategory["NetworkLinkOnStatusChanged"] = "network-link.onStatusChanged";
453
+ /**
447
454
  * Emitted by the battery cap provider WHEN `wakeForStream` enters the
448
455
  * "wake in progress" window — between the Baichuan wake-up issue and
449
456
  * the camera's first dialed-back RTP packet. The stream-broker
@@ -23974,6 +23981,39 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, meth
23974
23981
  deviceId: number(),
23975
23982
  status: BatteryStatusSchema
23976
23983
  });
23984
+ /**
23985
+ * Network-link snapshot. Same shape for every provider (a Reolink wifi
23986
+ * camera, a Home Assistant device with a signal-strength sensor, a Tapo
23987
+ * plug): one slice under `device.runtimeState['network-link']`, one badge,
23988
+ * one Home Assistant projection.
23989
+ */
23990
+ var NetworkLinkStatusSchema = object({
23991
+ /** The link the device is on. `'unknown'` = not read yet, not "no link". */
23992
+ type: _enum([
23993
+ "wifi",
23994
+ "ethernet",
23995
+ "cellular",
23996
+ "unknown"
23997
+ ]),
23998
+ /**
23999
+ * Link quality, 0..100 inclusive, normalised by the provider from whatever
24000
+ * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
24001
+ * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
24002
+ * one whose reading has not landed must not be drawn at 0 %. Consumers
24003
+ * SKIP a null rather than coerce it.
24004
+ */
24005
+ signalPercent: number().min(0).max(100).nullable(),
24006
+ /** Raw received signal strength in dBm, when the firmware reports one. */
24007
+ rssiDbm: number().optional(),
24008
+ /** Network name of a wireless link, when the firmware reports it. */
24009
+ ssid: string().optional(),
24010
+ /** Ms epoch of the last observation. Lets consumers reason about freshness. */
24011
+ lastUpdated: number()
24012
+ });
24013
+ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
24014
+ deviceId: number(),
24015
+ status: NetworkLinkStatusSchema
24016
+ });
23977
24017
  object({
23978
24018
  on: boolean(),
23979
24019
  /** Ms epoch of the last transition. 0 if never observed. */
@@ -27612,6 +27652,203 @@ DeviceType.Camera, method(object({ deviceId: number() }), PtzAutotrackStatusSche
27612
27652
  deviceId: number(),
27613
27653
  status: PtzAutotrackStatusSchema
27614
27654
  });
27655
+ /**
27656
+ * `navigation` — a device-scoped capability that natively expresses the FULL
27657
+ * navigation / action surface of a robot that DRIVES ITSELF and carries an
27658
+ * on-board camera (the Dreame robot-vacuum camera is the first provider).
27659
+ *
27660
+ * Why a NEW cap rather than overloading `ptz`:
27661
+ * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
27662
+ * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
27663
+ * The two are different physical models: PTZ is absolute-position + presets,
27664
+ * navigation is momentary drive nudges + discrete robot ACTIONS
27665
+ * (dock / spot-clean / follow-pet / go-to-point / …).
27666
+ * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
27667
+ * the reverse:
27668
+ * 1. a native CamStack navigation panel (data-driven from `listActions`
27669
+ * / `getOptions`), and
27670
+ * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
27671
+ * robot camera shows up in the existing PTZ control path without every
27672
+ * PTZ provider learning about robots. The mapping lives in the adapter,
27673
+ * not here (see the addon design note):
27674
+ * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
27675
+ * ptz.stop() → navigation.stop()
27676
+ * ptz.goHome() → navigation.runAction('goHome')
27677
+ * ptz.getPresets() → navigation.listActions() (id→preset)
27678
+ * ptz.goToPreset(id) → navigation.runAction(id)
27679
+ *
27680
+ * ## Continuous drive
27681
+ *
27682
+ * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
27683
+ * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
27684
+ * one `stop()` on release — exactly like the robot app's remote-drive joystick.
27685
+ * The provider forwards EACH `move` to one drive write; it must NOT debounce or
27686
+ * coalesce them. The UI owns the cadence.
27687
+ *
27688
+ * ## The action dictionary
27689
+ *
27690
+ * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
27691
+ * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
27692
+ * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
27693
+ * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
27694
+ * vendor-specific list. `kind: 'action'` entries are triggered with
27695
+ * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
27696
+ * (the entry carries the `soundId` to pass). The general primitives — `move`,
27697
+ * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
27698
+ *
27699
+ * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
27700
+ * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
27701
+ * that the currently-published `@apocaliss92/nodedreame` already exposes on
27702
+ * every device handle. A future nodedreame publish adds a typed
27703
+ * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
27704
+ * provider can then swap the raw calls for the typed methods with no change to
27705
+ * THIS contract.
27706
+ */
27707
+ /**
27708
+ * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
27709
+ * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
27710
+ * halts it.
27711
+ *
27712
+ * - `pan` — turn: negative = left, positive = right, 0 = straight.
27713
+ * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
27714
+ * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
27715
+ * vector by it (drivers without proportional drive ignore it).
27716
+ *
27717
+ * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
27718
+ * axis alone; an all-undefined nudge is a no-op.
27719
+ */
27720
+ var NavigationMoveCommandSchema = object({
27721
+ pan: number().min(-1).max(1).optional(),
27722
+ tilt: number().min(-1).max(1).optional(),
27723
+ speed: number().min(0).max(1).optional()
27724
+ });
27725
+ /**
27726
+ * The enumerated discrete actions a navigation-capable robot can perform via
27727
+ * `runAction`. This is the CLOSED vocabulary; a given device advertises the
27728
+ * subset it supports through `listActions`. Sounds are NOT here — they go through
27729
+ * `playSound` (see the `sound` dictionary entries).
27730
+ */
27731
+ var NavigationActionIdSchema = _enum([
27732
+ "goHome",
27733
+ "locate",
27734
+ "spotClean",
27735
+ "findPet",
27736
+ "personFollow",
27737
+ "stop",
27738
+ "startClean",
27739
+ "pauseClean",
27740
+ "dockWash",
27741
+ "autoEmpty",
27742
+ "flashOn",
27743
+ "flashOff"
27744
+ ]);
27745
+ /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
27746
+ var NavigationEntryKindSchema = _enum(["action", "sound"]);
27747
+ /**
27748
+ * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
27749
+ * native panel and the PTZ mimic render as a button.
27750
+ *
27751
+ * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
27752
+ * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
27753
+ * (`sound:meow`) whose `soundId` is passed to `playSound`.
27754
+ * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
27755
+ * - `label` — operator-facing English label.
27756
+ * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
27757
+ * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
27758
+ * PTZ render ONLY enabled entries. Data-driven: the provider
27759
+ * flips it from config, never by editing code.
27760
+ */
27761
+ var NavigationActionEntrySchema = object({
27762
+ id: string(),
27763
+ kind: NavigationEntryKindSchema,
27764
+ label: string(),
27765
+ icon: string(),
27766
+ /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
27767
+ soundId: number().int().optional(),
27768
+ /** Per-device feature flag — render this entry only when true. */
27769
+ enabled: boolean()
27770
+ });
27771
+ /** Coordinates for `goToPoint` — a point on the robot's live map. */
27772
+ var NavigationPointSchema = object({
27773
+ x: number(),
27774
+ y: number()
27775
+ });
27776
+ /**
27777
+ * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
27778
+ * The cap reports which are enabled so the UI / PTZ render only the controls
27779
+ * that are turned on for THIS device. Data-driven: the provider derives these
27780
+ * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
27781
+ * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
27782
+ * that are not dictionary entries.
27783
+ *
27784
+ * - `move` / `stop` — the momentary drive joystick.
27785
+ * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
27786
+ * map-coordinate plumbing is wired.
27787
+ * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
27788
+ * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
27789
+ * - `light` — the on/off fill-light toggle (works anytime).
27790
+ * - `lightMode` — the auto/manual selector + manual level slider (a
27791
+ * camera-service control; needs an active stream).
27792
+ */
27793
+ var NavigationFeaturesSchema = object({
27794
+ move: boolean(),
27795
+ stop: boolean(),
27796
+ goToPoint: boolean(),
27797
+ runAction: boolean(),
27798
+ playSound: boolean(),
27799
+ light: boolean(),
27800
+ lightMode: boolean()
27801
+ });
27802
+ /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
27803
+ var NavigationLightModeSchema = _enum(["auto", "manual"]);
27804
+ /**
27805
+ * Live navigation state so the UI can reflect what the robot is doing:
27806
+ * - `mode` — coarse activity (idle / cleaning / following / …).
27807
+ * - `following` — person/pet follow is currently armed.
27808
+ * - `flash` — the on-camera fill light is on.
27809
+ * - `lightMode` — auto vs manual fill-light mode.
27810
+ * - `lightLevel` — manual fill-light level (40..100); meaningful when
27811
+ * `lightMode === 'manual'`.
27812
+ */
27813
+ var NavigationStatusSchema = object({
27814
+ mode: _enum([
27815
+ "idle",
27816
+ "cleaning",
27817
+ "spot",
27818
+ "following",
27819
+ "goto",
27820
+ "returning",
27821
+ "paused",
27822
+ "unknown"
27823
+ ]),
27824
+ following: boolean(),
27825
+ flash: boolean(),
27826
+ lightMode: NavigationLightModeSchema,
27827
+ lightLevel: number().min(40).max(100),
27828
+ /** Ms epoch when the slice was last updated. */
27829
+ lastChangedAt: number()
27830
+ });
27831
+ NavigationStatusSchema.extend({ lastFetchedAt: number() });
27832
+ 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({
27833
+ deviceId: number(),
27834
+ actionId: NavigationActionIdSchema
27835
+ }), _void(), { kind: "mutation" }), method(object({
27836
+ deviceId: number(),
27837
+ soundId: number().int()
27838
+ }), _void(), { kind: "mutation" }), method(object({
27839
+ deviceId: number(),
27840
+ on: boolean()
27841
+ }), _void(), { kind: "mutation" }), method(object({
27842
+ deviceId: number(),
27843
+ mode: NavigationLightModeSchema,
27844
+ level: number().min(40).max(100).optional()
27845
+ }), _void(), { kind: "mutation" }), method(object({
27846
+ deviceId: number(),
27847
+ level: number().min(40).max(100)
27848
+ }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
27849
+ deviceId: number(),
27850
+ status: NavigationStatusSchema
27851
+ });
27615
27852
  DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
27616
27853
  kind: "mutation",
27617
27854
  auth: "admin"
@@ -32701,6 +32938,66 @@ Object.freeze({
32701
32938
  addonId: null,
32702
32939
  access: "create"
32703
32940
  },
32941
+ "navigation.getFeatures": {
32942
+ capName: "navigation",
32943
+ capScope: "device",
32944
+ addonId: null,
32945
+ access: "view"
32946
+ },
32947
+ "navigation.goToPoint": {
32948
+ capName: "navigation",
32949
+ capScope: "device",
32950
+ addonId: null,
32951
+ access: "create"
32952
+ },
32953
+ "navigation.listActions": {
32954
+ capName: "navigation",
32955
+ capScope: "device",
32956
+ addonId: null,
32957
+ access: "view"
32958
+ },
32959
+ "navigation.move": {
32960
+ capName: "navigation",
32961
+ capScope: "device",
32962
+ addonId: null,
32963
+ access: "create"
32964
+ },
32965
+ "navigation.playSound": {
32966
+ capName: "navigation",
32967
+ capScope: "device",
32968
+ addonId: null,
32969
+ access: "create"
32970
+ },
32971
+ "navigation.runAction": {
32972
+ capName: "navigation",
32973
+ capScope: "device",
32974
+ addonId: null,
32975
+ access: "create"
32976
+ },
32977
+ "navigation.setLightLevel": {
32978
+ capName: "navigation",
32979
+ capScope: "device",
32980
+ addonId: null,
32981
+ access: "create"
32982
+ },
32983
+ "navigation.setLightMode": {
32984
+ capName: "navigation",
32985
+ capScope: "device",
32986
+ addonId: null,
32987
+ access: "create"
32988
+ },
32989
+ "navigation.setLightOn": {
32990
+ capName: "navigation",
32991
+ capScope: "device",
32992
+ addonId: null,
32993
+ access: "create"
32994
+ },
32995
+ "navigation.stop": {
32996
+ capName: "navigation",
32997
+ capScope: "device",
32998
+ addonId: null,
32999
+ access: "create"
33000
+ },
32704
33001
  "networkAccess.getEndpoint": {
32705
33002
  capName: "network-access",
32706
33003
  capScope: "system",
@@ -36796,6 +37093,56 @@ Object.freeze({
36796
37093
  form: "single",
36797
37094
  optional: false
36798
37095
  }],
37096
+ "navigation.getFeatures": [{
37097
+ name: "deviceId",
37098
+ form: "single",
37099
+ optional: false
37100
+ }],
37101
+ "navigation.goToPoint": [{
37102
+ name: "deviceId",
37103
+ form: "single",
37104
+ optional: false
37105
+ }],
37106
+ "navigation.listActions": [{
37107
+ name: "deviceId",
37108
+ form: "single",
37109
+ optional: false
37110
+ }],
37111
+ "navigation.move": [{
37112
+ name: "deviceId",
37113
+ form: "single",
37114
+ optional: false
37115
+ }],
37116
+ "navigation.playSound": [{
37117
+ name: "deviceId",
37118
+ form: "single",
37119
+ optional: false
37120
+ }],
37121
+ "navigation.runAction": [{
37122
+ name: "deviceId",
37123
+ form: "single",
37124
+ optional: false
37125
+ }],
37126
+ "navigation.setLightLevel": [{
37127
+ name: "deviceId",
37128
+ form: "single",
37129
+ optional: false
37130
+ }],
37131
+ "navigation.setLightMode": [{
37132
+ name: "deviceId",
37133
+ form: "single",
37134
+ optional: false
37135
+ }],
37136
+ "navigation.setLightOn": [{
37137
+ name: "deviceId",
37138
+ form: "single",
37139
+ optional: false
37140
+ }],
37141
+ "navigation.stop": [{
37142
+ name: "deviceId",
37143
+ form: "single",
37144
+ optional: false
37145
+ }],
36799
37146
  "networkQuality.getDeviceStats": [{
36800
37147
  name: "deviceId",
36801
37148
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-export-hap",
3
- "version": "1.2.80",
3
+ "version": "1.2.82",
4
4
  "description": "HomeKit (HAP) exporter for CamStack devices. Publishes each exposed device as its own HomeKit accessory: cameras and doorbells with SRTP streaming, HomeKit Secure Video, motion, two-way audio, PTZ and battery; switches, lights, locks and sensors through a capability→service table.",
5
5
  "keywords": [
6
6
  "camstack",