@camstack/addon-provider-rademacher 0.2.68 → 0.2.69

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/addon.js CHANGED
@@ -984,7 +984,7 @@ var Rademacher = class {
984
984
  }
985
985
  };
986
986
  //#endregion
987
- //#region ../types/dist/event-category-BZL-fdNj.mjs
987
+ //#region ../types/dist/event-category-zAv7pMUz.mjs
988
988
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
989
989
  EventCategory["SystemBoot"] = "system.boot";
990
990
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -1356,6 +1356,13 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
1356
1356
  */
1357
1357
  EventCategory["BatteryOnStatusChanged"] = "battery.onStatusChanged";
1358
1358
  /**
1359
+ * Cap event fired by every device that registers the `network-link`
1360
+ * capability. Mirrors the cap definition's `onStatusChanged`. Carries
1361
+ * `{ deviceId, status: NetworkLinkStatus }` — a link switch or a signal
1362
+ * reading that moved.
1363
+ */
1364
+ EventCategory["NetworkLinkOnStatusChanged"] = "network-link.onStatusChanged";
1365
+ /**
1359
1366
  * Emitted by the battery cap provider WHEN `wakeForStream` enters the
1360
1367
  * "wake in progress" window — between the Baichuan wake-up issue and
1361
1368
  * the camera's first dialed-back RTP packet. The stream-broker
@@ -24734,6 +24741,88 @@ onStatusChanged: { data: object({
24734
24741
  volatileStateFields: ["lastUpdated"]
24735
24742
  };
24736
24743
  /**
24744
+ * Network-link snapshot. Same shape for every provider (a Reolink wifi
24745
+ * camera, a Home Assistant device with a signal-strength sensor, a Tapo
24746
+ * plug): one slice under `device.runtimeState['network-link']`, one badge,
24747
+ * one Home Assistant projection.
24748
+ */
24749
+ var NetworkLinkStatusSchema = object({
24750
+ /** The link the device is on. `'unknown'` = not read yet, not "no link". */
24751
+ type: _enum([
24752
+ "wifi",
24753
+ "ethernet",
24754
+ "cellular",
24755
+ "unknown"
24756
+ ]),
24757
+ /**
24758
+ * Link quality, 0..100 inclusive, normalised by the provider from whatever
24759
+ * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
24760
+ * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
24761
+ * one whose reading has not landed must not be drawn at 0 %. Consumers
24762
+ * SKIP a null rather than coerce it.
24763
+ */
24764
+ signalPercent: number().min(0).max(100).nullable(),
24765
+ /** Raw received signal strength in dBm, when the firmware reports one. */
24766
+ rssiDbm: number().optional(),
24767
+ /** Network name of a wireless link, when the firmware reports it. */
24768
+ ssid: string().optional(),
24769
+ /** Ms epoch of the last observation. Lets consumers reason about freshness. */
24770
+ lastUpdated: number()
24771
+ });
24772
+ var networkLinkCapability = {
24773
+ name: "network-link",
24774
+ scope: "device",
24775
+ deviceNative: true,
24776
+ mode: "singleton",
24777
+ deviceTypes: [
24778
+ DeviceType.Camera,
24779
+ DeviceType.Sensor,
24780
+ DeviceType.Button,
24781
+ DeviceType.Switch,
24782
+ DeviceType.Light,
24783
+ DeviceType.Lock,
24784
+ DeviceType.Siren
24785
+ ],
24786
+ methods: {},
24787
+ events: {
24788
+ /**
24789
+ * Emitted whenever the cached status changes (a link switch, a signal
24790
+ * reading that moved). Mirrored on the parent chain by the
24791
+ * DeviceEventPropagator like `battery.onStatusChanged`.
24792
+ */
24793
+ onStatusChanged: { data: object({
24794
+ deviceId: number(),
24795
+ status: NetworkLinkStatusSchema
24796
+ }) } },
24797
+ status: {
24798
+ schema: NetworkLinkStatusSchema,
24799
+ kind: "push",
24800
+ empty: {
24801
+ type: "unknown",
24802
+ signalPercent: null,
24803
+ lastUpdated: 0
24804
+ }
24805
+ },
24806
+ /**
24807
+ * Runtime-state slice — every provider stores the same shape under
24808
+ * `device.runtimeState['network-link']`, read once by the badge and the
24809
+ * Home Assistant projector regardless of the driver.
24810
+ */
24811
+ runtimeState: NetworkLinkStatusSchema,
24812
+ /**
24813
+ * Runtime-state durability: **restored** — a link reading is slow to
24814
+ * change and a sleeping battery camera may not report for hours; the
24815
+ * restored slice is what the badge shows until the next read.
24816
+ *
24817
+ * See `RuntimeStateDurability`. Enforced by
24818
+ * `scripts/check-runtime-state-durability.ts`.
24819
+ */
24820
+ durability: "restored",
24821
+ /** Clock fields: written, but excluded from the compare that decides
24822
+ * whether persisting is worth a SQLite commit. */
24823
+ volatileStateFields: ["lastUpdated"]
24824
+ };
24825
+ /**
24737
24826
  * Generic boolean sensor — last-resort fallback when no domain-
24738
24827
  * specific binary cap fits (Home Assistant `binary_sensor` without a
24739
24828
  * known `device_class`, or a domain we haven't typed yet). Pure
@@ -33118,6 +33207,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
33118
33207
  motionTrigger: motionTriggerCapability,
33119
33208
  motionZones: motionZonesCapability,
33120
33209
  nativeObjectDetection: nativeObjectDetectionCapability,
33210
+ networkLink: networkLinkCapability,
33121
33211
  notifier: notifierCapability,
33122
33212
  numericSensor: numericSensorCapability,
33123
33213
  petFeeder: petFeederCapability,
package/dist/addon.mjs CHANGED
@@ -983,7 +983,7 @@ var Rademacher = class {
983
983
  }
984
984
  };
985
985
  //#endregion
986
- //#region ../types/dist/event-category-BZL-fdNj.mjs
986
+ //#region ../types/dist/event-category-zAv7pMUz.mjs
987
987
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
988
988
  EventCategory["SystemBoot"] = "system.boot";
989
989
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -1355,6 +1355,13 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
1355
1355
  */
1356
1356
  EventCategory["BatteryOnStatusChanged"] = "battery.onStatusChanged";
1357
1357
  /**
1358
+ * Cap event fired by every device that registers the `network-link`
1359
+ * capability. Mirrors the cap definition's `onStatusChanged`. Carries
1360
+ * `{ deviceId, status: NetworkLinkStatus }` — a link switch or a signal
1361
+ * reading that moved.
1362
+ */
1363
+ EventCategory["NetworkLinkOnStatusChanged"] = "network-link.onStatusChanged";
1364
+ /**
1358
1365
  * Emitted by the battery cap provider WHEN `wakeForStream` enters the
1359
1366
  * "wake in progress" window — between the Baichuan wake-up issue and
1360
1367
  * the camera's first dialed-back RTP packet. The stream-broker
@@ -24733,6 +24740,88 @@ onStatusChanged: { data: object({
24733
24740
  volatileStateFields: ["lastUpdated"]
24734
24741
  };
24735
24742
  /**
24743
+ * Network-link snapshot. Same shape for every provider (a Reolink wifi
24744
+ * camera, a Home Assistant device with a signal-strength sensor, a Tapo
24745
+ * plug): one slice under `device.runtimeState['network-link']`, one badge,
24746
+ * one Home Assistant projection.
24747
+ */
24748
+ var NetworkLinkStatusSchema = object({
24749
+ /** The link the device is on. `'unknown'` = not read yet, not "no link". */
24750
+ type: _enum([
24751
+ "wifi",
24752
+ "ethernet",
24753
+ "cellular",
24754
+ "unknown"
24755
+ ]),
24756
+ /**
24757
+ * Link quality, 0..100 inclusive, normalised by the provider from whatever
24758
+ * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
24759
+ * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
24760
+ * one whose reading has not landed must not be drawn at 0 %. Consumers
24761
+ * SKIP a null rather than coerce it.
24762
+ */
24763
+ signalPercent: number().min(0).max(100).nullable(),
24764
+ /** Raw received signal strength in dBm, when the firmware reports one. */
24765
+ rssiDbm: number().optional(),
24766
+ /** Network name of a wireless link, when the firmware reports it. */
24767
+ ssid: string().optional(),
24768
+ /** Ms epoch of the last observation. Lets consumers reason about freshness. */
24769
+ lastUpdated: number()
24770
+ });
24771
+ var networkLinkCapability = {
24772
+ name: "network-link",
24773
+ scope: "device",
24774
+ deviceNative: true,
24775
+ mode: "singleton",
24776
+ deviceTypes: [
24777
+ DeviceType.Camera,
24778
+ DeviceType.Sensor,
24779
+ DeviceType.Button,
24780
+ DeviceType.Switch,
24781
+ DeviceType.Light,
24782
+ DeviceType.Lock,
24783
+ DeviceType.Siren
24784
+ ],
24785
+ methods: {},
24786
+ events: {
24787
+ /**
24788
+ * Emitted whenever the cached status changes (a link switch, a signal
24789
+ * reading that moved). Mirrored on the parent chain by the
24790
+ * DeviceEventPropagator like `battery.onStatusChanged`.
24791
+ */
24792
+ onStatusChanged: { data: object({
24793
+ deviceId: number(),
24794
+ status: NetworkLinkStatusSchema
24795
+ }) } },
24796
+ status: {
24797
+ schema: NetworkLinkStatusSchema,
24798
+ kind: "push",
24799
+ empty: {
24800
+ type: "unknown",
24801
+ signalPercent: null,
24802
+ lastUpdated: 0
24803
+ }
24804
+ },
24805
+ /**
24806
+ * Runtime-state slice — every provider stores the same shape under
24807
+ * `device.runtimeState['network-link']`, read once by the badge and the
24808
+ * Home Assistant projector regardless of the driver.
24809
+ */
24810
+ runtimeState: NetworkLinkStatusSchema,
24811
+ /**
24812
+ * Runtime-state durability: **restored** — a link reading is slow to
24813
+ * change and a sleeping battery camera may not report for hours; the
24814
+ * restored slice is what the badge shows until the next read.
24815
+ *
24816
+ * See `RuntimeStateDurability`. Enforced by
24817
+ * `scripts/check-runtime-state-durability.ts`.
24818
+ */
24819
+ durability: "restored",
24820
+ /** Clock fields: written, but excluded from the compare that decides
24821
+ * whether persisting is worth a SQLite commit. */
24822
+ volatileStateFields: ["lastUpdated"]
24823
+ };
24824
+ /**
24736
24825
  * Generic boolean sensor — last-resort fallback when no domain-
24737
24826
  * specific binary cap fits (Home Assistant `binary_sensor` without a
24738
24827
  * known `device_class`, or a domain we haven't typed yet). Pure
@@ -33117,6 +33206,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
33117
33206
  motionTrigger: motionTriggerCapability,
33118
33207
  motionZones: motionZonesCapability,
33119
33208
  nativeObjectDetection: nativeObjectDetectionCapability,
33209
+ networkLink: networkLinkCapability,
33120
33210
  notifier: notifierCapability,
33121
33211
  numericSensor: numericSensorCapability,
33122
33212
  petFeeder: petFeederCapability,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-rademacher",
3
- "version": "0.2.68",
3
+ "version": "0.2.69",
4
4
  "description": "Rademacher HomePilot device-provider addon for CamStack — wraps the @apocaliss92/noderademacher local-hub client (roller shutters over the cover cap)",
5
5
  "keywords": [
6
6
  "camstack",