@camstack/addon-provider-rtsp 1.2.68 → 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.
package/dist/addon.js CHANGED
@@ -23,7 +23,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
23
23
  //#endregion
24
24
  let node_net = require("node:net");
25
25
  node_net = __toESM(node_net);
26
- //#region ../types/dist/event-category-BZL-fdNj.mjs
26
+ //#region ../types/dist/event-category-zAv7pMUz.mjs
27
27
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
28
28
  EventCategory["SystemBoot"] = "system.boot";
29
29
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -395,6 +395,13 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
395
395
  */
396
396
  EventCategory["BatteryOnStatusChanged"] = "battery.onStatusChanged";
397
397
  /**
398
+ * Cap event fired by every device that registers the `network-link`
399
+ * capability. Mirrors the cap definition's `onStatusChanged`. Carries
400
+ * `{ deviceId, status: NetworkLinkStatus }` — a link switch or a signal
401
+ * reading that moved.
402
+ */
403
+ EventCategory["NetworkLinkOnStatusChanged"] = "network-link.onStatusChanged";
404
+ /**
398
405
  * Emitted by the battery cap provider WHEN `wakeForStream` enters the
399
406
  * "wake in progress" window — between the Baichuan wake-up issue and
400
407
  * the camera's first dialed-back RTP packet. The stream-broker
@@ -19445,6 +19452,33 @@ var RecentTracksQueryInput = object({
19445
19452
  */
19446
19453
  classes: array(string()).optional()
19447
19454
  });
19455
+ /**
19456
+ * A Summary (D359): the per-camera session envelope that references tracks.
19457
+ * `groupShotKey` is the media key of its group shot (`ownerKind: 'summary'`,
19458
+ * served by the event-media plane by key), null until the first frame with a
19459
+ * member visible has been materialised.
19460
+ */
19461
+ var SummarySchema = object({
19462
+ id: string(),
19463
+ deviceId: number(),
19464
+ openedAt: number(),
19465
+ lastActiveAt: number(),
19466
+ sealedAt: number().nullable(),
19467
+ memberCount: number().int().nonnegative(),
19468
+ groupShotKey: string().nullable()
19469
+ });
19470
+ var SummariesQueryInput = object({
19471
+ deviceIds: array(number()).min(1),
19472
+ since: number().optional(),
19473
+ until: number().optional(),
19474
+ limit: number().int().min(1).max(200).default(50)
19475
+ });
19476
+ var SummariesPageSchema = object({ summaries: array(SummarySchema).readonly() });
19477
+ var SummaryDetailSchema = object({
19478
+ summary: SummarySchema,
19479
+ /** Member track ids, in absorption order. */
19480
+ trackIds: array(string()).readonly()
19481
+ });
19448
19482
  var RecentTracksPageSchema = object({
19449
19483
  /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
19450
19484
  tracks: array(TrackSchema).readonly(),
@@ -19845,7 +19879,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19845
19879
  * timeline would read as a camera that saw nothing.
19846
19880
  */
19847
19881
  classes: array(string()).optional()
19848
- }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
19882
+ }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
19849
19883
  kind: "mutation",
19850
19884
  auth: "admin"
19851
19885
  }), 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({
@@ -23882,6 +23916,88 @@ onStatusChanged: { data: object({
23882
23916
  volatileStateFields: ["lastUpdated"]
23883
23917
  };
23884
23918
  /**
23919
+ * Network-link snapshot. Same shape for every provider (a Reolink wifi
23920
+ * camera, a Home Assistant device with a signal-strength sensor, a Tapo
23921
+ * plug): one slice under `device.runtimeState['network-link']`, one badge,
23922
+ * one Home Assistant projection.
23923
+ */
23924
+ var NetworkLinkStatusSchema = object({
23925
+ /** The link the device is on. `'unknown'` = not read yet, not "no link". */
23926
+ type: _enum([
23927
+ "wifi",
23928
+ "ethernet",
23929
+ "cellular",
23930
+ "unknown"
23931
+ ]),
23932
+ /**
23933
+ * Link quality, 0..100 inclusive, normalised by the provider from whatever
23934
+ * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
23935
+ * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
23936
+ * one whose reading has not landed must not be drawn at 0 %. Consumers
23937
+ * SKIP a null rather than coerce it.
23938
+ */
23939
+ signalPercent: number().min(0).max(100).nullable(),
23940
+ /** Raw received signal strength in dBm, when the firmware reports one. */
23941
+ rssiDbm: number().optional(),
23942
+ /** Network name of a wireless link, when the firmware reports it. */
23943
+ ssid: string().optional(),
23944
+ /** Ms epoch of the last observation. Lets consumers reason about freshness. */
23945
+ lastUpdated: number()
23946
+ });
23947
+ var networkLinkCapability = {
23948
+ name: "network-link",
23949
+ scope: "device",
23950
+ deviceNative: true,
23951
+ mode: "singleton",
23952
+ deviceTypes: [
23953
+ DeviceType.Camera,
23954
+ DeviceType.Sensor,
23955
+ DeviceType.Button,
23956
+ DeviceType.Switch,
23957
+ DeviceType.Light,
23958
+ DeviceType.Lock,
23959
+ DeviceType.Siren
23960
+ ],
23961
+ methods: {},
23962
+ events: {
23963
+ /**
23964
+ * Emitted whenever the cached status changes (a link switch, a signal
23965
+ * reading that moved). Mirrored on the parent chain by the
23966
+ * DeviceEventPropagator like `battery.onStatusChanged`.
23967
+ */
23968
+ onStatusChanged: { data: object({
23969
+ deviceId: number(),
23970
+ status: NetworkLinkStatusSchema
23971
+ }) } },
23972
+ status: {
23973
+ schema: NetworkLinkStatusSchema,
23974
+ kind: "push",
23975
+ empty: {
23976
+ type: "unknown",
23977
+ signalPercent: null,
23978
+ lastUpdated: 0
23979
+ }
23980
+ },
23981
+ /**
23982
+ * Runtime-state slice — every provider stores the same shape under
23983
+ * `device.runtimeState['network-link']`, read once by the badge and the
23984
+ * Home Assistant projector regardless of the driver.
23985
+ */
23986
+ runtimeState: NetworkLinkStatusSchema,
23987
+ /**
23988
+ * Runtime-state durability: **restored** — a link reading is slow to
23989
+ * change and a sleeping battery camera may not report for hours; the
23990
+ * restored slice is what the badge shows until the next read.
23991
+ *
23992
+ * See `RuntimeStateDurability`. Enforced by
23993
+ * `scripts/check-runtime-state-durability.ts`.
23994
+ */
23995
+ durability: "restored",
23996
+ /** Clock fields: written, but excluded from the compare that decides
23997
+ * whether persisting is worth a SQLite commit. */
23998
+ volatileStateFields: ["lastUpdated"]
23999
+ };
24000
+ /**
23885
24001
  * Generic boolean sensor — last-resort fallback when no domain-
23886
24002
  * specific binary cap fits (Home Assistant `binary_sensor` without a
23887
24003
  * known `device_class`, or a domain we haven't typed yet). Pure
@@ -32274,6 +32390,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
32274
32390
  motionTrigger: motionTriggerCapability,
32275
32391
  motionZones: motionZonesCapability,
32276
32392
  nativeObjectDetection: nativeObjectDetectionCapability,
32393
+ networkLink: networkLinkCapability,
32277
32394
  notifier: notifierCapability,
32278
32395
  numericSensor: numericSensorCapability,
32279
32396
  petFeeder: petFeederCapability,
@@ -36757,6 +36874,12 @@ Object.freeze({
36757
36874
  addonId: null,
36758
36875
  access: "view"
36759
36876
  },
36877
+ "pipelineAnalytics.getSummary": {
36878
+ capName: "pipeline-analytics",
36879
+ capScope: "device",
36880
+ addonId: null,
36881
+ access: "view"
36882
+ },
36760
36883
  "pipelineAnalytics.getTrack": {
36761
36884
  capName: "pipeline-analytics",
36762
36885
  capScope: "device",
@@ -36835,6 +36958,12 @@ Object.freeze({
36835
36958
  addonId: null,
36836
36959
  access: "view"
36837
36960
  },
36961
+ "pipelineAnalytics.listSummaries": {
36962
+ capName: "pipeline-analytics",
36963
+ capScope: "device",
36964
+ addonId: null,
36965
+ access: "view"
36966
+ },
36838
36967
  "pipelineAnalytics.listTrackMedia": {
36839
36968
  capName: "pipeline-analytics",
36840
36969
  capScope: "device",
@@ -40530,6 +40659,11 @@ Object.freeze({
40530
40659
  form: "array",
40531
40660
  optional: true
40532
40661
  }],
40662
+ "pipelineAnalytics.listSummaries": [{
40663
+ name: "deviceIds",
40664
+ form: "array",
40665
+ optional: false
40666
+ }],
40533
40667
  "pipelineAnalytics.listTrackMedia": [{
40534
40668
  name: "deviceId",
40535
40669
  form: "single",
package/dist/addon.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import net from "node:net";
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
@@ -19421,6 +19428,33 @@ var RecentTracksQueryInput = object({
19421
19428
  */
19422
19429
  classes: array(string()).optional()
19423
19430
  });
19431
+ /**
19432
+ * A Summary (D359): the per-camera session envelope that references tracks.
19433
+ * `groupShotKey` is the media key of its group shot (`ownerKind: 'summary'`,
19434
+ * served by the event-media plane by key), null until the first frame with a
19435
+ * member visible has been materialised.
19436
+ */
19437
+ var SummarySchema = object({
19438
+ id: string(),
19439
+ deviceId: number(),
19440
+ openedAt: number(),
19441
+ lastActiveAt: number(),
19442
+ sealedAt: number().nullable(),
19443
+ memberCount: number().int().nonnegative(),
19444
+ groupShotKey: string().nullable()
19445
+ });
19446
+ var SummariesQueryInput = object({
19447
+ deviceIds: array(number()).min(1),
19448
+ since: number().optional(),
19449
+ until: number().optional(),
19450
+ limit: number().int().min(1).max(200).default(50)
19451
+ });
19452
+ var SummariesPageSchema = object({ summaries: array(SummarySchema).readonly() });
19453
+ var SummaryDetailSchema = object({
19454
+ summary: SummarySchema,
19455
+ /** Member track ids, in absorption order. */
19456
+ trackIds: array(string()).readonly()
19457
+ });
19424
19458
  var RecentTracksPageSchema = object({
19425
19459
  /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
19426
19460
  tracks: array(TrackSchema).readonly(),
@@ -19821,7 +19855,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19821
19855
  * timeline would read as a camera that saw nothing.
19822
19856
  */
19823
19857
  classes: array(string()).optional()
19824
- }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
19858
+ }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
19825
19859
  kind: "mutation",
19826
19860
  auth: "admin"
19827
19861
  }), 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({
@@ -23858,6 +23892,88 @@ onStatusChanged: { data: object({
23858
23892
  volatileStateFields: ["lastUpdated"]
23859
23893
  };
23860
23894
  /**
23895
+ * Network-link snapshot. Same shape for every provider (a Reolink wifi
23896
+ * camera, a Home Assistant device with a signal-strength sensor, a Tapo
23897
+ * plug): one slice under `device.runtimeState['network-link']`, one badge,
23898
+ * one Home Assistant projection.
23899
+ */
23900
+ var NetworkLinkStatusSchema = object({
23901
+ /** The link the device is on. `'unknown'` = not read yet, not "no link". */
23902
+ type: _enum([
23903
+ "wifi",
23904
+ "ethernet",
23905
+ "cellular",
23906
+ "unknown"
23907
+ ]),
23908
+ /**
23909
+ * Link quality, 0..100 inclusive, normalised by the provider from whatever
23910
+ * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
23911
+ * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
23912
+ * one whose reading has not landed must not be drawn at 0 %. Consumers
23913
+ * SKIP a null rather than coerce it.
23914
+ */
23915
+ signalPercent: number().min(0).max(100).nullable(),
23916
+ /** Raw received signal strength in dBm, when the firmware reports one. */
23917
+ rssiDbm: number().optional(),
23918
+ /** Network name of a wireless link, when the firmware reports it. */
23919
+ ssid: string().optional(),
23920
+ /** Ms epoch of the last observation. Lets consumers reason about freshness. */
23921
+ lastUpdated: number()
23922
+ });
23923
+ var networkLinkCapability = {
23924
+ name: "network-link",
23925
+ scope: "device",
23926
+ deviceNative: true,
23927
+ mode: "singleton",
23928
+ deviceTypes: [
23929
+ DeviceType.Camera,
23930
+ DeviceType.Sensor,
23931
+ DeviceType.Button,
23932
+ DeviceType.Switch,
23933
+ DeviceType.Light,
23934
+ DeviceType.Lock,
23935
+ DeviceType.Siren
23936
+ ],
23937
+ methods: {},
23938
+ events: {
23939
+ /**
23940
+ * Emitted whenever the cached status changes (a link switch, a signal
23941
+ * reading that moved). Mirrored on the parent chain by the
23942
+ * DeviceEventPropagator like `battery.onStatusChanged`.
23943
+ */
23944
+ onStatusChanged: { data: object({
23945
+ deviceId: number(),
23946
+ status: NetworkLinkStatusSchema
23947
+ }) } },
23948
+ status: {
23949
+ schema: NetworkLinkStatusSchema,
23950
+ kind: "push",
23951
+ empty: {
23952
+ type: "unknown",
23953
+ signalPercent: null,
23954
+ lastUpdated: 0
23955
+ }
23956
+ },
23957
+ /**
23958
+ * Runtime-state slice — every provider stores the same shape under
23959
+ * `device.runtimeState['network-link']`, read once by the badge and the
23960
+ * Home Assistant projector regardless of the driver.
23961
+ */
23962
+ runtimeState: NetworkLinkStatusSchema,
23963
+ /**
23964
+ * Runtime-state durability: **restored** — a link reading is slow to
23965
+ * change and a sleeping battery camera may not report for hours; the
23966
+ * restored slice is what the badge shows until the next read.
23967
+ *
23968
+ * See `RuntimeStateDurability`. Enforced by
23969
+ * `scripts/check-runtime-state-durability.ts`.
23970
+ */
23971
+ durability: "restored",
23972
+ /** Clock fields: written, but excluded from the compare that decides
23973
+ * whether persisting is worth a SQLite commit. */
23974
+ volatileStateFields: ["lastUpdated"]
23975
+ };
23976
+ /**
23861
23977
  * Generic boolean sensor — last-resort fallback when no domain-
23862
23978
  * specific binary cap fits (Home Assistant `binary_sensor` without a
23863
23979
  * known `device_class`, or a domain we haven't typed yet). Pure
@@ -32250,6 +32366,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
32250
32366
  motionTrigger: motionTriggerCapability,
32251
32367
  motionZones: motionZonesCapability,
32252
32368
  nativeObjectDetection: nativeObjectDetectionCapability,
32369
+ networkLink: networkLinkCapability,
32253
32370
  notifier: notifierCapability,
32254
32371
  numericSensor: numericSensorCapability,
32255
32372
  petFeeder: petFeederCapability,
@@ -36733,6 +36850,12 @@ Object.freeze({
36733
36850
  addonId: null,
36734
36851
  access: "view"
36735
36852
  },
36853
+ "pipelineAnalytics.getSummary": {
36854
+ capName: "pipeline-analytics",
36855
+ capScope: "device",
36856
+ addonId: null,
36857
+ access: "view"
36858
+ },
36736
36859
  "pipelineAnalytics.getTrack": {
36737
36860
  capName: "pipeline-analytics",
36738
36861
  capScope: "device",
@@ -36811,6 +36934,12 @@ Object.freeze({
36811
36934
  addonId: null,
36812
36935
  access: "view"
36813
36936
  },
36937
+ "pipelineAnalytics.listSummaries": {
36938
+ capName: "pipeline-analytics",
36939
+ capScope: "device",
36940
+ addonId: null,
36941
+ access: "view"
36942
+ },
36814
36943
  "pipelineAnalytics.listTrackMedia": {
36815
36944
  capName: "pipeline-analytics",
36816
36945
  capScope: "device",
@@ -40506,6 +40635,11 @@ Object.freeze({
40506
40635
  form: "array",
40507
40636
  optional: true
40508
40637
  }],
40638
+ "pipelineAnalytics.listSummaries": [{
40639
+ name: "deviceIds",
40640
+ form: "array",
40641
+ optional: false
40642
+ }],
40509
40643
  "pipelineAnalytics.listTrackMedia": [{
40510
40644
  name: "deviceId",
40511
40645
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-rtsp",
3
- "version": "1.2.68",
3
+ "version": "1.2.70",
4
4
  "description": "Generic RTSP camera device provider addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",