@camstack/addon-mqtt-broker 1.2.69 → 1.2.70

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.
@@ -44,7 +44,7 @@ let crypto$10 = __toESM(crypto$1, 1);
44
44
  crypto$1 = __toESM(crypto$1);
45
45
  let node_fs = require("node:fs");
46
46
  let node_path = require("node:path");
47
- //#region ../types/dist/event-category-BZL-fdNj.mjs
47
+ //#region ../types/dist/event-category-zAv7pMUz.mjs
48
48
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
49
49
  EventCategory["SystemBoot"] = "system.boot";
50
50
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -416,6 +416,13 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
416
416
  */
417
417
  EventCategory["BatteryOnStatusChanged"] = "battery.onStatusChanged";
418
418
  /**
419
+ * Cap event fired by every device that registers the `network-link`
420
+ * capability. Mirrors the cap definition's `onStatusChanged`. Carries
421
+ * `{ deviceId, status: NetworkLinkStatus }` — a link switch or a signal
422
+ * reading that moved.
423
+ */
424
+ EventCategory["NetworkLinkOnStatusChanged"] = "network-link.onStatusChanged";
425
+ /**
419
426
  * Emitted by the battery cap provider WHEN `wakeForStream` enters the
420
427
  * "wake in progress" window — between the Baichuan wake-up issue and
421
428
  * the camera's first dialed-back RTP packet. The stream-broker
@@ -23278,6 +23285,39 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, meth
23278
23285
  deviceId: number(),
23279
23286
  status: BatteryStatusSchema
23280
23287
  });
23288
+ /**
23289
+ * Network-link snapshot. Same shape for every provider (a Reolink wifi
23290
+ * camera, a Home Assistant device with a signal-strength sensor, a Tapo
23291
+ * plug): one slice under `device.runtimeState['network-link']`, one badge,
23292
+ * one Home Assistant projection.
23293
+ */
23294
+ var NetworkLinkStatusSchema = object({
23295
+ /** The link the device is on. `'unknown'` = not read yet, not "no link". */
23296
+ type: _enum([
23297
+ "wifi",
23298
+ "ethernet",
23299
+ "cellular",
23300
+ "unknown"
23301
+ ]),
23302
+ /**
23303
+ * Link quality, 0..100 inclusive, normalised by the provider from whatever
23304
+ * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
23305
+ * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
23306
+ * one whose reading has not landed must not be drawn at 0 %. Consumers
23307
+ * SKIP a null rather than coerce it.
23308
+ */
23309
+ signalPercent: number().min(0).max(100).nullable(),
23310
+ /** Raw received signal strength in dBm, when the firmware reports one. */
23311
+ rssiDbm: number().optional(),
23312
+ /** Network name of a wireless link, when the firmware reports it. */
23313
+ ssid: string().optional(),
23314
+ /** Ms epoch of the last observation. Lets consumers reason about freshness. */
23315
+ lastUpdated: number()
23316
+ });
23317
+ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
23318
+ deviceId: number(),
23319
+ status: NetworkLinkStatusSchema
23320
+ });
23281
23321
  object({
23282
23322
  on: boolean(),
23283
23323
  /** Ms epoch of the last transition. 0 if never observed. */
@@ -39,7 +39,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
39
39
  var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
40
40
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
41
41
  //#endregion
42
- //#region ../types/dist/event-category-BZL-fdNj.mjs
42
+ //#region ../types/dist/event-category-zAv7pMUz.mjs
43
43
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
44
44
  EventCategory["SystemBoot"] = "system.boot";
45
45
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -411,6 +411,13 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
411
411
  */
412
412
  EventCategory["BatteryOnStatusChanged"] = "battery.onStatusChanged";
413
413
  /**
414
+ * Cap event fired by every device that registers the `network-link`
415
+ * capability. Mirrors the cap definition's `onStatusChanged`. Carries
416
+ * `{ deviceId, status: NetworkLinkStatus }` — a link switch or a signal
417
+ * reading that moved.
418
+ */
419
+ EventCategory["NetworkLinkOnStatusChanged"] = "network-link.onStatusChanged";
420
+ /**
414
421
  * Emitted by the battery cap provider WHEN `wakeForStream` enters the
415
422
  * "wake in progress" window — between the Baichuan wake-up issue and
416
423
  * the camera's first dialed-back RTP packet. The stream-broker
@@ -23273,6 +23280,39 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, meth
23273
23280
  deviceId: number(),
23274
23281
  status: BatteryStatusSchema
23275
23282
  });
23283
+ /**
23284
+ * Network-link snapshot. Same shape for every provider (a Reolink wifi
23285
+ * camera, a Home Assistant device with a signal-strength sensor, a Tapo
23286
+ * plug): one slice under `device.runtimeState['network-link']`, one badge,
23287
+ * one Home Assistant projection.
23288
+ */
23289
+ var NetworkLinkStatusSchema = object({
23290
+ /** The link the device is on. `'unknown'` = not read yet, not "no link". */
23291
+ type: _enum([
23292
+ "wifi",
23293
+ "ethernet",
23294
+ "cellular",
23295
+ "unknown"
23296
+ ]),
23297
+ /**
23298
+ * Link quality, 0..100 inclusive, normalised by the provider from whatever
23299
+ * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
23300
+ * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
23301
+ * one whose reading has not landed must not be drawn at 0 %. Consumers
23302
+ * SKIP a null rather than coerce it.
23303
+ */
23304
+ signalPercent: number().min(0).max(100).nullable(),
23305
+ /** Raw received signal strength in dBm, when the firmware reports one. */
23306
+ rssiDbm: number().optional(),
23307
+ /** Network name of a wireless link, when the firmware reports it. */
23308
+ ssid: string().optional(),
23309
+ /** Ms epoch of the last observation. Lets consumers reason about freshness. */
23310
+ lastUpdated: number()
23311
+ });
23312
+ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
23313
+ deviceId: number(),
23314
+ status: NetworkLinkStatusSchema
23315
+ });
23276
23316
  object({
23277
23317
  on: boolean(),
23278
23318
  /** Ms epoch of the last transition. 0 if never observed. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-mqtt-broker",
3
- "version": "1.2.69",
3
+ "version": "1.2.70",
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",