@camstack/addon-provider-homematic 1.2.69 → 1.2.71

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
@@ -8,7 +8,7 @@ let http = require("http");
8
8
  let crypto$1 = require("crypto");
9
9
  let fs_promises = require("fs/promises");
10
10
  let path = require("path");
11
- //#region ../types/dist/event-category-BZL-fdNj.mjs
11
+ //#region ../types/dist/event-category-zAv7pMUz.mjs
12
12
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
13
13
  EventCategory["SystemBoot"] = "system.boot";
14
14
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -380,6 +380,13 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
380
380
  */
381
381
  EventCategory["BatteryOnStatusChanged"] = "battery.onStatusChanged";
382
382
  /**
383
+ * Cap event fired by every device that registers the `network-link`
384
+ * capability. Mirrors the cap definition's `onStatusChanged`. Carries
385
+ * `{ deviceId, status: NetworkLinkStatus }` — a link switch or a signal
386
+ * reading that moved.
387
+ */
388
+ EventCategory["NetworkLinkOnStatusChanged"] = "network-link.onStatusChanged";
389
+ /**
383
390
  * Emitted by the battery cap provider WHEN `wakeForStream` enters the
384
391
  * "wake in progress" window — between the Baichuan wake-up issue and
385
392
  * the camera's first dialed-back RTP packet. The stream-broker
@@ -19464,6 +19471,33 @@ var RecentTracksQueryInput = object({
19464
19471
  */
19465
19472
  classes: array(string()).optional()
19466
19473
  });
19474
+ /**
19475
+ * A Summary (D359): the per-camera session envelope that references tracks.
19476
+ * `groupShotKey` is the media key of its group shot (`ownerKind: 'summary'`,
19477
+ * served by the event-media plane by key), null until the first frame with a
19478
+ * member visible has been materialised.
19479
+ */
19480
+ var SummarySchema = object({
19481
+ id: string(),
19482
+ deviceId: number(),
19483
+ openedAt: number(),
19484
+ lastActiveAt: number(),
19485
+ sealedAt: number().nullable(),
19486
+ memberCount: number().int().nonnegative(),
19487
+ groupShotKey: string().nullable()
19488
+ });
19489
+ var SummariesQueryInput = object({
19490
+ deviceIds: array(number()).min(1),
19491
+ since: number().optional(),
19492
+ until: number().optional(),
19493
+ limit: number().int().min(1).max(200).default(50)
19494
+ });
19495
+ var SummariesPageSchema = object({ summaries: array(SummarySchema).readonly() });
19496
+ var SummaryDetailSchema = object({
19497
+ summary: SummarySchema,
19498
+ /** Member track ids, in absorption order. */
19499
+ trackIds: array(string()).readonly()
19500
+ });
19467
19501
  var RecentTracksPageSchema = object({
19468
19502
  /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
19469
19503
  tracks: array(TrackSchema).readonly(),
@@ -19864,7 +19898,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19864
19898
  * timeline would read as a camera that saw nothing.
19865
19899
  */
19866
19900
  classes: array(string()).optional()
19867
- }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
19901
+ }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
19868
19902
  kind: "mutation",
19869
19903
  auth: "admin"
19870
19904
  }), 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({
@@ -23797,6 +23831,88 @@ onStatusChanged: { data: object({
23797
23831
  volatileStateFields: ["lastUpdated"]
23798
23832
  };
23799
23833
  /**
23834
+ * Network-link snapshot. Same shape for every provider (a Reolink wifi
23835
+ * camera, a Home Assistant device with a signal-strength sensor, a Tapo
23836
+ * plug): one slice under `device.runtimeState['network-link']`, one badge,
23837
+ * one Home Assistant projection.
23838
+ */
23839
+ var NetworkLinkStatusSchema = object({
23840
+ /** The link the device is on. `'unknown'` = not read yet, not "no link". */
23841
+ type: _enum([
23842
+ "wifi",
23843
+ "ethernet",
23844
+ "cellular",
23845
+ "unknown"
23846
+ ]),
23847
+ /**
23848
+ * Link quality, 0..100 inclusive, normalised by the provider from whatever
23849
+ * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
23850
+ * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
23851
+ * one whose reading has not landed must not be drawn at 0 %. Consumers
23852
+ * SKIP a null rather than coerce it.
23853
+ */
23854
+ signalPercent: number().min(0).max(100).nullable(),
23855
+ /** Raw received signal strength in dBm, when the firmware reports one. */
23856
+ rssiDbm: number().optional(),
23857
+ /** Network name of a wireless link, when the firmware reports it. */
23858
+ ssid: string().optional(),
23859
+ /** Ms epoch of the last observation. Lets consumers reason about freshness. */
23860
+ lastUpdated: number()
23861
+ });
23862
+ var networkLinkCapability = {
23863
+ name: "network-link",
23864
+ scope: "device",
23865
+ deviceNative: true,
23866
+ mode: "singleton",
23867
+ deviceTypes: [
23868
+ DeviceType.Camera,
23869
+ DeviceType.Sensor,
23870
+ DeviceType.Button,
23871
+ DeviceType.Switch,
23872
+ DeviceType.Light,
23873
+ DeviceType.Lock,
23874
+ DeviceType.Siren
23875
+ ],
23876
+ methods: {},
23877
+ events: {
23878
+ /**
23879
+ * Emitted whenever the cached status changes (a link switch, a signal
23880
+ * reading that moved). Mirrored on the parent chain by the
23881
+ * DeviceEventPropagator like `battery.onStatusChanged`.
23882
+ */
23883
+ onStatusChanged: { data: object({
23884
+ deviceId: number(),
23885
+ status: NetworkLinkStatusSchema
23886
+ }) } },
23887
+ status: {
23888
+ schema: NetworkLinkStatusSchema,
23889
+ kind: "push",
23890
+ empty: {
23891
+ type: "unknown",
23892
+ signalPercent: null,
23893
+ lastUpdated: 0
23894
+ }
23895
+ },
23896
+ /**
23897
+ * Runtime-state slice — every provider stores the same shape under
23898
+ * `device.runtimeState['network-link']`, read once by the badge and the
23899
+ * Home Assistant projector regardless of the driver.
23900
+ */
23901
+ runtimeState: NetworkLinkStatusSchema,
23902
+ /**
23903
+ * Runtime-state durability: **restored** — a link reading is slow to
23904
+ * change and a sleeping battery camera may not report for hours; the
23905
+ * restored slice is what the badge shows until the next read.
23906
+ *
23907
+ * See `RuntimeStateDurability`. Enforced by
23908
+ * `scripts/check-runtime-state-durability.ts`.
23909
+ */
23910
+ durability: "restored",
23911
+ /** Clock fields: written, but excluded from the compare that decides
23912
+ * whether persisting is worth a SQLite commit. */
23913
+ volatileStateFields: ["lastUpdated"]
23914
+ };
23915
+ /**
23800
23916
  * Generic boolean sensor — last-resort fallback when no domain-
23801
23917
  * specific binary cap fits (Home Assistant `binary_sensor` without a
23802
23918
  * known `device_class`, or a domain we haven't typed yet). Pure
@@ -32181,6 +32297,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
32181
32297
  motionTrigger: motionTriggerCapability,
32182
32298
  motionZones: motionZonesCapability,
32183
32299
  nativeObjectDetection: nativeObjectDetectionCapability,
32300
+ networkLink: networkLinkCapability,
32184
32301
  notifier: notifierCapability,
32185
32302
  numericSensor: numericSensorCapability,
32186
32303
  petFeeder: petFeederCapability,
@@ -36598,6 +36715,12 @@ Object.freeze({
36598
36715
  addonId: null,
36599
36716
  access: "view"
36600
36717
  },
36718
+ "pipelineAnalytics.getSummary": {
36719
+ capName: "pipeline-analytics",
36720
+ capScope: "device",
36721
+ addonId: null,
36722
+ access: "view"
36723
+ },
36601
36724
  "pipelineAnalytics.getTrack": {
36602
36725
  capName: "pipeline-analytics",
36603
36726
  capScope: "device",
@@ -36676,6 +36799,12 @@ Object.freeze({
36676
36799
  addonId: null,
36677
36800
  access: "view"
36678
36801
  },
36802
+ "pipelineAnalytics.listSummaries": {
36803
+ capName: "pipeline-analytics",
36804
+ capScope: "device",
36805
+ addonId: null,
36806
+ access: "view"
36807
+ },
36679
36808
  "pipelineAnalytics.listTrackMedia": {
36680
36809
  capName: "pipeline-analytics",
36681
36810
  capScope: "device",
@@ -40371,6 +40500,11 @@ Object.freeze({
40371
40500
  form: "array",
40372
40501
  optional: true
40373
40502
  }],
40503
+ "pipelineAnalytics.listSummaries": [{
40504
+ name: "deviceIds",
40505
+ form: "array",
40506
+ optional: false
40507
+ }],
40374
40508
  "pipelineAnalytics.listTrackMedia": [{
40375
40509
  name: "deviceId",
40376
40510
  form: "single",
package/dist/addon.mjs CHANGED
@@ -9,7 +9,7 @@ import { join } from "path";
9
9
  var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
10
10
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
11
11
  //#endregion
12
- //#region ../types/dist/event-category-BZL-fdNj.mjs
12
+ //#region ../types/dist/event-category-zAv7pMUz.mjs
13
13
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
14
14
  EventCategory["SystemBoot"] = "system.boot";
15
15
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -381,6 +381,13 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
381
381
  */
382
382
  EventCategory["BatteryOnStatusChanged"] = "battery.onStatusChanged";
383
383
  /**
384
+ * Cap event fired by every device that registers the `network-link`
385
+ * capability. Mirrors the cap definition's `onStatusChanged`. Carries
386
+ * `{ deviceId, status: NetworkLinkStatus }` — a link switch or a signal
387
+ * reading that moved.
388
+ */
389
+ EventCategory["NetworkLinkOnStatusChanged"] = "network-link.onStatusChanged";
390
+ /**
384
391
  * Emitted by the battery cap provider WHEN `wakeForStream` enters the
385
392
  * "wake in progress" window — between the Baichuan wake-up issue and
386
393
  * the camera's first dialed-back RTP packet. The stream-broker
@@ -19465,6 +19472,33 @@ var RecentTracksQueryInput = object({
19465
19472
  */
19466
19473
  classes: array(string()).optional()
19467
19474
  });
19475
+ /**
19476
+ * A Summary (D359): the per-camera session envelope that references tracks.
19477
+ * `groupShotKey` is the media key of its group shot (`ownerKind: 'summary'`,
19478
+ * served by the event-media plane by key), null until the first frame with a
19479
+ * member visible has been materialised.
19480
+ */
19481
+ var SummarySchema = object({
19482
+ id: string(),
19483
+ deviceId: number(),
19484
+ openedAt: number(),
19485
+ lastActiveAt: number(),
19486
+ sealedAt: number().nullable(),
19487
+ memberCount: number().int().nonnegative(),
19488
+ groupShotKey: string().nullable()
19489
+ });
19490
+ var SummariesQueryInput = object({
19491
+ deviceIds: array(number()).min(1),
19492
+ since: number().optional(),
19493
+ until: number().optional(),
19494
+ limit: number().int().min(1).max(200).default(50)
19495
+ });
19496
+ var SummariesPageSchema = object({ summaries: array(SummarySchema).readonly() });
19497
+ var SummaryDetailSchema = object({
19498
+ summary: SummarySchema,
19499
+ /** Member track ids, in absorption order. */
19500
+ trackIds: array(string()).readonly()
19501
+ });
19468
19502
  var RecentTracksPageSchema = object({
19469
19503
  /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
19470
19504
  tracks: array(TrackSchema).readonly(),
@@ -19865,7 +19899,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19865
19899
  * timeline would read as a camera that saw nothing.
19866
19900
  */
19867
19901
  classes: array(string()).optional()
19868
- }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
19902
+ }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
19869
19903
  kind: "mutation",
19870
19904
  auth: "admin"
19871
19905
  }), 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({
@@ -23798,6 +23832,88 @@ onStatusChanged: { data: object({
23798
23832
  volatileStateFields: ["lastUpdated"]
23799
23833
  };
23800
23834
  /**
23835
+ * Network-link snapshot. Same shape for every provider (a Reolink wifi
23836
+ * camera, a Home Assistant device with a signal-strength sensor, a Tapo
23837
+ * plug): one slice under `device.runtimeState['network-link']`, one badge,
23838
+ * one Home Assistant projection.
23839
+ */
23840
+ var NetworkLinkStatusSchema = object({
23841
+ /** The link the device is on. `'unknown'` = not read yet, not "no link". */
23842
+ type: _enum([
23843
+ "wifi",
23844
+ "ethernet",
23845
+ "cellular",
23846
+ "unknown"
23847
+ ]),
23848
+ /**
23849
+ * Link quality, 0..100 inclusive, normalised by the provider from whatever
23850
+ * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
23851
+ * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
23852
+ * one whose reading has not landed must not be drawn at 0 %. Consumers
23853
+ * SKIP a null rather than coerce it.
23854
+ */
23855
+ signalPercent: number().min(0).max(100).nullable(),
23856
+ /** Raw received signal strength in dBm, when the firmware reports one. */
23857
+ rssiDbm: number().optional(),
23858
+ /** Network name of a wireless link, when the firmware reports it. */
23859
+ ssid: string().optional(),
23860
+ /** Ms epoch of the last observation. Lets consumers reason about freshness. */
23861
+ lastUpdated: number()
23862
+ });
23863
+ var networkLinkCapability = {
23864
+ name: "network-link",
23865
+ scope: "device",
23866
+ deviceNative: true,
23867
+ mode: "singleton",
23868
+ deviceTypes: [
23869
+ DeviceType.Camera,
23870
+ DeviceType.Sensor,
23871
+ DeviceType.Button,
23872
+ DeviceType.Switch,
23873
+ DeviceType.Light,
23874
+ DeviceType.Lock,
23875
+ DeviceType.Siren
23876
+ ],
23877
+ methods: {},
23878
+ events: {
23879
+ /**
23880
+ * Emitted whenever the cached status changes (a link switch, a signal
23881
+ * reading that moved). Mirrored on the parent chain by the
23882
+ * DeviceEventPropagator like `battery.onStatusChanged`.
23883
+ */
23884
+ onStatusChanged: { data: object({
23885
+ deviceId: number(),
23886
+ status: NetworkLinkStatusSchema
23887
+ }) } },
23888
+ status: {
23889
+ schema: NetworkLinkStatusSchema,
23890
+ kind: "push",
23891
+ empty: {
23892
+ type: "unknown",
23893
+ signalPercent: null,
23894
+ lastUpdated: 0
23895
+ }
23896
+ },
23897
+ /**
23898
+ * Runtime-state slice — every provider stores the same shape under
23899
+ * `device.runtimeState['network-link']`, read once by the badge and the
23900
+ * Home Assistant projector regardless of the driver.
23901
+ */
23902
+ runtimeState: NetworkLinkStatusSchema,
23903
+ /**
23904
+ * Runtime-state durability: **restored** — a link reading is slow to
23905
+ * change and a sleeping battery camera may not report for hours; the
23906
+ * restored slice is what the badge shows until the next read.
23907
+ *
23908
+ * See `RuntimeStateDurability`. Enforced by
23909
+ * `scripts/check-runtime-state-durability.ts`.
23910
+ */
23911
+ durability: "restored",
23912
+ /** Clock fields: written, but excluded from the compare that decides
23913
+ * whether persisting is worth a SQLite commit. */
23914
+ volatileStateFields: ["lastUpdated"]
23915
+ };
23916
+ /**
23801
23917
  * Generic boolean sensor — last-resort fallback when no domain-
23802
23918
  * specific binary cap fits (Home Assistant `binary_sensor` without a
23803
23919
  * known `device_class`, or a domain we haven't typed yet). Pure
@@ -32182,6 +32298,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
32182
32298
  motionTrigger: motionTriggerCapability,
32183
32299
  motionZones: motionZonesCapability,
32184
32300
  nativeObjectDetection: nativeObjectDetectionCapability,
32301
+ networkLink: networkLinkCapability,
32185
32302
  notifier: notifierCapability,
32186
32303
  numericSensor: numericSensorCapability,
32187
32304
  petFeeder: petFeederCapability,
@@ -36599,6 +36716,12 @@ Object.freeze({
36599
36716
  addonId: null,
36600
36717
  access: "view"
36601
36718
  },
36719
+ "pipelineAnalytics.getSummary": {
36720
+ capName: "pipeline-analytics",
36721
+ capScope: "device",
36722
+ addonId: null,
36723
+ access: "view"
36724
+ },
36602
36725
  "pipelineAnalytics.getTrack": {
36603
36726
  capName: "pipeline-analytics",
36604
36727
  capScope: "device",
@@ -36677,6 +36800,12 @@ Object.freeze({
36677
36800
  addonId: null,
36678
36801
  access: "view"
36679
36802
  },
36803
+ "pipelineAnalytics.listSummaries": {
36804
+ capName: "pipeline-analytics",
36805
+ capScope: "device",
36806
+ addonId: null,
36807
+ access: "view"
36808
+ },
36680
36809
  "pipelineAnalytics.listTrackMedia": {
36681
36810
  capName: "pipeline-analytics",
36682
36811
  capScope: "device",
@@ -40372,6 +40501,11 @@ Object.freeze({
40372
40501
  form: "array",
40373
40502
  optional: true
40374
40503
  }],
40504
+ "pipelineAnalytics.listSummaries": [{
40505
+ name: "deviceIds",
40506
+ form: "array",
40507
+ optional: false
40508
+ }],
40375
40509
  "pipelineAnalytics.listTrackMedia": [{
40376
40510
  name: "deviceId",
40377
40511
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-homematic",
3
- "version": "1.2.69",
3
+ "version": "1.2.71",
4
4
  "description": "Homematic / HomematicIP (CCU3 / RaspberryMatic) device-provider addon for CamStack — wraps the nodehomematic library",
5
5
  "keywords": [
6
6
  "camstack",