@camstack/addon-provider-velux 0.2.68 → 0.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.
package/dist/addon.js CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- //#region ../types/dist/event-category-BZL-fdNj.mjs
2
+ //#region ../types/dist/event-category-zAv7pMUz.mjs
3
3
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4
4
  EventCategory["SystemBoot"] = "system.boot";
5
5
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -371,6 +371,13 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
371
371
  */
372
372
  EventCategory["BatteryOnStatusChanged"] = "battery.onStatusChanged";
373
373
  /**
374
+ * Cap event fired by every device that registers the `network-link`
375
+ * capability. Mirrors the cap definition's `onStatusChanged`. Carries
376
+ * `{ deviceId, status: NetworkLinkStatus }` — a link switch or a signal
377
+ * reading that moved.
378
+ */
379
+ EventCategory["NetworkLinkOnStatusChanged"] = "network-link.onStatusChanged";
380
+ /**
374
381
  * Emitted by the battery cap provider WHEN `wakeForStream` enters the
375
382
  * "wake in progress" window — between the Baichuan wake-up issue and
376
383
  * the camera's first dialed-back RTP packet. The stream-broker
@@ -19389,6 +19396,33 @@ var RecentTracksQueryInput = object({
19389
19396
  */
19390
19397
  classes: array(string()).optional()
19391
19398
  });
19399
+ /**
19400
+ * A Summary (D359): the per-camera session envelope that references tracks.
19401
+ * `groupShotKey` is the media key of its group shot (`ownerKind: 'summary'`,
19402
+ * served by the event-media plane by key), null until the first frame with a
19403
+ * member visible has been materialised.
19404
+ */
19405
+ var SummarySchema = object({
19406
+ id: string(),
19407
+ deviceId: number(),
19408
+ openedAt: number(),
19409
+ lastActiveAt: number(),
19410
+ sealedAt: number().nullable(),
19411
+ memberCount: number().int().nonnegative(),
19412
+ groupShotKey: string().nullable()
19413
+ });
19414
+ var SummariesQueryInput = object({
19415
+ deviceIds: array(number()).min(1),
19416
+ since: number().optional(),
19417
+ until: number().optional(),
19418
+ limit: number().int().min(1).max(200).default(50)
19419
+ });
19420
+ var SummariesPageSchema = object({ summaries: array(SummarySchema).readonly() });
19421
+ var SummaryDetailSchema = object({
19422
+ summary: SummarySchema,
19423
+ /** Member track ids, in absorption order. */
19424
+ trackIds: array(string()).readonly()
19425
+ });
19392
19426
  var RecentTracksPageSchema = object({
19393
19427
  /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
19394
19428
  tracks: array(TrackSchema).readonly(),
@@ -19789,7 +19823,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19789
19823
  * timeline would read as a camera that saw nothing.
19790
19824
  */
19791
19825
  classes: array(string()).optional()
19792
- }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
19826
+ }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
19793
19827
  kind: "mutation",
19794
19828
  auth: "admin"
19795
19829
  }), method(DeviceEventQueryInput, array(MotionEventSchema).readonly()), method(ObjectEventQueryInput, array(ObjectEventSchema).readonly()), method(DeviceEventQueryInput, array(AudioEventSchema).readonly()), method(object({ deviceId: number() }), array(EventKindDescriptorSchema).readonly()), method(object({ deviceIds: array(number()).min(1).max(200) }), array(EventKindsForDeviceSchema).readonly()), method(object({
@@ -23722,6 +23756,88 @@ onStatusChanged: { data: object({
23722
23756
  volatileStateFields: ["lastUpdated"]
23723
23757
  };
23724
23758
  /**
23759
+ * Network-link snapshot. Same shape for every provider (a Reolink wifi
23760
+ * camera, a Home Assistant device with a signal-strength sensor, a Tapo
23761
+ * plug): one slice under `device.runtimeState['network-link']`, one badge,
23762
+ * one Home Assistant projection.
23763
+ */
23764
+ var NetworkLinkStatusSchema = object({
23765
+ /** The link the device is on. `'unknown'` = not read yet, not "no link". */
23766
+ type: _enum([
23767
+ "wifi",
23768
+ "ethernet",
23769
+ "cellular",
23770
+ "unknown"
23771
+ ]),
23772
+ /**
23773
+ * Link quality, 0..100 inclusive, normalised by the provider from whatever
23774
+ * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
23775
+ * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
23776
+ * one whose reading has not landed must not be drawn at 0 %. Consumers
23777
+ * SKIP a null rather than coerce it.
23778
+ */
23779
+ signalPercent: number().min(0).max(100).nullable(),
23780
+ /** Raw received signal strength in dBm, when the firmware reports one. */
23781
+ rssiDbm: number().optional(),
23782
+ /** Network name of a wireless link, when the firmware reports it. */
23783
+ ssid: string().optional(),
23784
+ /** Ms epoch of the last observation. Lets consumers reason about freshness. */
23785
+ lastUpdated: number()
23786
+ });
23787
+ var networkLinkCapability = {
23788
+ name: "network-link",
23789
+ scope: "device",
23790
+ deviceNative: true,
23791
+ mode: "singleton",
23792
+ deviceTypes: [
23793
+ DeviceType.Camera,
23794
+ DeviceType.Sensor,
23795
+ DeviceType.Button,
23796
+ DeviceType.Switch,
23797
+ DeviceType.Light,
23798
+ DeviceType.Lock,
23799
+ DeviceType.Siren
23800
+ ],
23801
+ methods: {},
23802
+ events: {
23803
+ /**
23804
+ * Emitted whenever the cached status changes (a link switch, a signal
23805
+ * reading that moved). Mirrored on the parent chain by the
23806
+ * DeviceEventPropagator like `battery.onStatusChanged`.
23807
+ */
23808
+ onStatusChanged: { data: object({
23809
+ deviceId: number(),
23810
+ status: NetworkLinkStatusSchema
23811
+ }) } },
23812
+ status: {
23813
+ schema: NetworkLinkStatusSchema,
23814
+ kind: "push",
23815
+ empty: {
23816
+ type: "unknown",
23817
+ signalPercent: null,
23818
+ lastUpdated: 0
23819
+ }
23820
+ },
23821
+ /**
23822
+ * Runtime-state slice — every provider stores the same shape under
23823
+ * `device.runtimeState['network-link']`, read once by the badge and the
23824
+ * Home Assistant projector regardless of the driver.
23825
+ */
23826
+ runtimeState: NetworkLinkStatusSchema,
23827
+ /**
23828
+ * Runtime-state durability: **restored** — a link reading is slow to
23829
+ * change and a sleeping battery camera may not report for hours; the
23830
+ * restored slice is what the badge shows until the next read.
23831
+ *
23832
+ * See `RuntimeStateDurability`. Enforced by
23833
+ * `scripts/check-runtime-state-durability.ts`.
23834
+ */
23835
+ durability: "restored",
23836
+ /** Clock fields: written, but excluded from the compare that decides
23837
+ * whether persisting is worth a SQLite commit. */
23838
+ volatileStateFields: ["lastUpdated"]
23839
+ };
23840
+ /**
23725
23841
  * Generic boolean sensor — last-resort fallback when no domain-
23726
23842
  * specific binary cap fits (Home Assistant `binary_sensor` without a
23727
23843
  * known `device_class`, or a domain we haven't typed yet). Pure
@@ -32106,6 +32222,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
32106
32222
  motionTrigger: motionTriggerCapability,
32107
32223
  motionZones: motionZonesCapability,
32108
32224
  nativeObjectDetection: nativeObjectDetectionCapability,
32225
+ networkLink: networkLinkCapability,
32109
32226
  notifier: notifierCapability,
32110
32227
  numericSensor: numericSensorCapability,
32111
32228
  petFeeder: petFeederCapability,
@@ -36523,6 +36640,12 @@ Object.freeze({
36523
36640
  addonId: null,
36524
36641
  access: "view"
36525
36642
  },
36643
+ "pipelineAnalytics.getSummary": {
36644
+ capName: "pipeline-analytics",
36645
+ capScope: "device",
36646
+ addonId: null,
36647
+ access: "view"
36648
+ },
36526
36649
  "pipelineAnalytics.getTrack": {
36527
36650
  capName: "pipeline-analytics",
36528
36651
  capScope: "device",
@@ -36601,6 +36724,12 @@ Object.freeze({
36601
36724
  addonId: null,
36602
36725
  access: "view"
36603
36726
  },
36727
+ "pipelineAnalytics.listSummaries": {
36728
+ capName: "pipeline-analytics",
36729
+ capScope: "device",
36730
+ addonId: null,
36731
+ access: "view"
36732
+ },
36604
36733
  "pipelineAnalytics.listTrackMedia": {
36605
36734
  capName: "pipeline-analytics",
36606
36735
  capScope: "device",
@@ -40296,6 +40425,11 @@ Object.freeze({
40296
40425
  form: "array",
40297
40426
  optional: true
40298
40427
  }],
40428
+ "pipelineAnalytics.listSummaries": [{
40429
+ name: "deviceIds",
40430
+ form: "array",
40431
+ optional: false
40432
+ }],
40299
40433
  "pipelineAnalytics.listTrackMedia": [{
40300
40434
  name: "deviceId",
40301
40435
  form: "single",
package/dist/addon.mjs CHANGED
@@ -1,4 +1,4 @@
1
- //#region ../types/dist/event-category-BZL-fdNj.mjs
1
+ //#region ../types/dist/event-category-zAv7pMUz.mjs
2
2
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
3
3
  EventCategory["SystemBoot"] = "system.boot";
4
4
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -370,6 +370,13 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
370
370
  */
371
371
  EventCategory["BatteryOnStatusChanged"] = "battery.onStatusChanged";
372
372
  /**
373
+ * Cap event fired by every device that registers the `network-link`
374
+ * capability. Mirrors the cap definition's `onStatusChanged`. Carries
375
+ * `{ deviceId, status: NetworkLinkStatus }` — a link switch or a signal
376
+ * reading that moved.
377
+ */
378
+ EventCategory["NetworkLinkOnStatusChanged"] = "network-link.onStatusChanged";
379
+ /**
373
380
  * Emitted by the battery cap provider WHEN `wakeForStream` enters the
374
381
  * "wake in progress" window — between the Baichuan wake-up issue and
375
382
  * the camera's first dialed-back RTP packet. The stream-broker
@@ -19388,6 +19395,33 @@ var RecentTracksQueryInput = object({
19388
19395
  */
19389
19396
  classes: array(string()).optional()
19390
19397
  });
19398
+ /**
19399
+ * A Summary (D359): the per-camera session envelope that references tracks.
19400
+ * `groupShotKey` is the media key of its group shot (`ownerKind: 'summary'`,
19401
+ * served by the event-media plane by key), null until the first frame with a
19402
+ * member visible has been materialised.
19403
+ */
19404
+ var SummarySchema = object({
19405
+ id: string(),
19406
+ deviceId: number(),
19407
+ openedAt: number(),
19408
+ lastActiveAt: number(),
19409
+ sealedAt: number().nullable(),
19410
+ memberCount: number().int().nonnegative(),
19411
+ groupShotKey: string().nullable()
19412
+ });
19413
+ var SummariesQueryInput = object({
19414
+ deviceIds: array(number()).min(1),
19415
+ since: number().optional(),
19416
+ until: number().optional(),
19417
+ limit: number().int().min(1).max(200).default(50)
19418
+ });
19419
+ var SummariesPageSchema = object({ summaries: array(SummarySchema).readonly() });
19420
+ var SummaryDetailSchema = object({
19421
+ summary: SummarySchema,
19422
+ /** Member track ids, in absorption order. */
19423
+ trackIds: array(string()).readonly()
19424
+ });
19391
19425
  var RecentTracksPageSchema = object({
19392
19426
  /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
19393
19427
  tracks: array(TrackSchema).readonly(),
@@ -19788,7 +19822,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19788
19822
  * timeline would read as a camera that saw nothing.
19789
19823
  */
19790
19824
  classes: array(string()).optional()
19791
- }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
19825
+ }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
19792
19826
  kind: "mutation",
19793
19827
  auth: "admin"
19794
19828
  }), method(DeviceEventQueryInput, array(MotionEventSchema).readonly()), method(ObjectEventQueryInput, array(ObjectEventSchema).readonly()), method(DeviceEventQueryInput, array(AudioEventSchema).readonly()), method(object({ deviceId: number() }), array(EventKindDescriptorSchema).readonly()), method(object({ deviceIds: array(number()).min(1).max(200) }), array(EventKindsForDeviceSchema).readonly()), method(object({
@@ -23721,6 +23755,88 @@ onStatusChanged: { data: object({
23721
23755
  volatileStateFields: ["lastUpdated"]
23722
23756
  };
23723
23757
  /**
23758
+ * Network-link snapshot. Same shape for every provider (a Reolink wifi
23759
+ * camera, a Home Assistant device with a signal-strength sensor, a Tapo
23760
+ * plug): one slice under `device.runtimeState['network-link']`, one badge,
23761
+ * one Home Assistant projection.
23762
+ */
23763
+ var NetworkLinkStatusSchema = object({
23764
+ /** The link the device is on. `'unknown'` = not read yet, not "no link". */
23765
+ type: _enum([
23766
+ "wifi",
23767
+ "ethernet",
23768
+ "cellular",
23769
+ "unknown"
23770
+ ]),
23771
+ /**
23772
+ * Link quality, 0..100 inclusive, normalised by the provider from whatever
23773
+ * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
23774
+ * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
23775
+ * one whose reading has not landed must not be drawn at 0 %. Consumers
23776
+ * SKIP a null rather than coerce it.
23777
+ */
23778
+ signalPercent: number().min(0).max(100).nullable(),
23779
+ /** Raw received signal strength in dBm, when the firmware reports one. */
23780
+ rssiDbm: number().optional(),
23781
+ /** Network name of a wireless link, when the firmware reports it. */
23782
+ ssid: string().optional(),
23783
+ /** Ms epoch of the last observation. Lets consumers reason about freshness. */
23784
+ lastUpdated: number()
23785
+ });
23786
+ var networkLinkCapability = {
23787
+ name: "network-link",
23788
+ scope: "device",
23789
+ deviceNative: true,
23790
+ mode: "singleton",
23791
+ deviceTypes: [
23792
+ DeviceType.Camera,
23793
+ DeviceType.Sensor,
23794
+ DeviceType.Button,
23795
+ DeviceType.Switch,
23796
+ DeviceType.Light,
23797
+ DeviceType.Lock,
23798
+ DeviceType.Siren
23799
+ ],
23800
+ methods: {},
23801
+ events: {
23802
+ /**
23803
+ * Emitted whenever the cached status changes (a link switch, a signal
23804
+ * reading that moved). Mirrored on the parent chain by the
23805
+ * DeviceEventPropagator like `battery.onStatusChanged`.
23806
+ */
23807
+ onStatusChanged: { data: object({
23808
+ deviceId: number(),
23809
+ status: NetworkLinkStatusSchema
23810
+ }) } },
23811
+ status: {
23812
+ schema: NetworkLinkStatusSchema,
23813
+ kind: "push",
23814
+ empty: {
23815
+ type: "unknown",
23816
+ signalPercent: null,
23817
+ lastUpdated: 0
23818
+ }
23819
+ },
23820
+ /**
23821
+ * Runtime-state slice — every provider stores the same shape under
23822
+ * `device.runtimeState['network-link']`, read once by the badge and the
23823
+ * Home Assistant projector regardless of the driver.
23824
+ */
23825
+ runtimeState: NetworkLinkStatusSchema,
23826
+ /**
23827
+ * Runtime-state durability: **restored** — a link reading is slow to
23828
+ * change and a sleeping battery camera may not report for hours; the
23829
+ * restored slice is what the badge shows until the next read.
23830
+ *
23831
+ * See `RuntimeStateDurability`. Enforced by
23832
+ * `scripts/check-runtime-state-durability.ts`.
23833
+ */
23834
+ durability: "restored",
23835
+ /** Clock fields: written, but excluded from the compare that decides
23836
+ * whether persisting is worth a SQLite commit. */
23837
+ volatileStateFields: ["lastUpdated"]
23838
+ };
23839
+ /**
23724
23840
  * Generic boolean sensor — last-resort fallback when no domain-
23725
23841
  * specific binary cap fits (Home Assistant `binary_sensor` without a
23726
23842
  * known `device_class`, or a domain we haven't typed yet). Pure
@@ -32105,6 +32221,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
32105
32221
  motionTrigger: motionTriggerCapability,
32106
32222
  motionZones: motionZonesCapability,
32107
32223
  nativeObjectDetection: nativeObjectDetectionCapability,
32224
+ networkLink: networkLinkCapability,
32108
32225
  notifier: notifierCapability,
32109
32226
  numericSensor: numericSensorCapability,
32110
32227
  petFeeder: petFeederCapability,
@@ -36522,6 +36639,12 @@ Object.freeze({
36522
36639
  addonId: null,
36523
36640
  access: "view"
36524
36641
  },
36642
+ "pipelineAnalytics.getSummary": {
36643
+ capName: "pipeline-analytics",
36644
+ capScope: "device",
36645
+ addonId: null,
36646
+ access: "view"
36647
+ },
36525
36648
  "pipelineAnalytics.getTrack": {
36526
36649
  capName: "pipeline-analytics",
36527
36650
  capScope: "device",
@@ -36600,6 +36723,12 @@ Object.freeze({
36600
36723
  addonId: null,
36601
36724
  access: "view"
36602
36725
  },
36726
+ "pipelineAnalytics.listSummaries": {
36727
+ capName: "pipeline-analytics",
36728
+ capScope: "device",
36729
+ addonId: null,
36730
+ access: "view"
36731
+ },
36603
36732
  "pipelineAnalytics.listTrackMedia": {
36604
36733
  capName: "pipeline-analytics",
36605
36734
  capScope: "device",
@@ -40295,6 +40424,11 @@ Object.freeze({
40295
40424
  form: "array",
40296
40425
  optional: true
40297
40426
  }],
40427
+ "pipelineAnalytics.listSummaries": [{
40428
+ name: "deviceIds",
40429
+ form: "array",
40430
+ optional: false
40431
+ }],
40298
40432
  "pipelineAnalytics.listTrackMedia": [{
40299
40433
  name: "deviceId",
40300
40434
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-velux",
3
- "version": "0.2.68",
3
+ "version": "0.2.70",
4
4
  "description": "Velux KLF-200 device-provider addon for CamStack — local-gateway window + shutter covers (positional, no tilt)",
5
5
  "keywords": [
6
6
  "camstack",