@camstack/addon-provider-reolink 1.2.205 → 1.2.206

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
@@ -51052,6 +51052,19 @@ var NodeInferenceDeviceSchema = object({
51052
51052
  /** Whether the node's live probe reports the device as usable right now. */
51053
51053
  available: boolean(),
51054
51054
  /**
51055
+ * Is the device on the node at all (D919)? `present` — the live probe
51056
+ * reported it; `absent` — the probe ANSWERED and did not report it, so only
51057
+ * its stored settings remain (unplugged, moved to another node): never
51058
+ * eligible, whatever its stored `enabled`, and forgettable with
51059
+ * `forgetInferenceDevice`; `unknown` — the probe did not answer, nothing is
51060
+ * claimed (D315). Optional only for an orchestrator older than the field.
51061
+ */
51062
+ presence: _enum([
51063
+ "present",
51064
+ "absent",
51065
+ "unknown"
51066
+ ]).optional(),
51067
+ /**
51055
51068
  * Whether this device participates in dispatch. AUTO default (spec C2):
51056
51069
  * accelerators are opt-OUT (a discovered NPU/iGPU/Coral/ANE with no stored
51057
51070
  * entry is `true`); CPU is opt-IN (`false` by default — the fallback pool,
@@ -51277,7 +51290,13 @@ method(object({
51277
51290
  }), object({ success: literal(true) }), {
51278
51291
  kind: "mutation",
51279
51292
  auth: "admin"
51280
- }), method(object({ nodeId: string() }), NodeInferenceDevicesSchema), method(object({ agentNodeId: string() }), object({
51293
+ }), method(object({ nodeId: string() }), NodeInferenceDevicesSchema), method(object({
51294
+ agentNodeId: string(),
51295
+ deviceKey: string()
51296
+ }), object({ success: literal(true) }), {
51297
+ kind: "mutation",
51298
+ auth: "admin"
51299
+ }), method(object({ agentNodeId: string() }), object({
51281
51300
  success: literal(true),
51282
51301
  /** Hardware-aware default detection model now in effect on the node (null when unresolvable). */
51283
51302
  effectiveModelId: string().nullable(),
@@ -60042,7 +60061,7 @@ var motionTriggerCapability = {
60042
60061
  enabled: boolean()
60043
60062
  }), _void(), {
60044
60063
  kind: "mutation",
60045
- auth: "admin"
60064
+ auth: "protected"
60046
60065
  }) },
60047
60066
  events: { onMotionTriggerChanged: { data: object({
60048
60067
  deviceId: number(),
@@ -60792,6 +60811,13 @@ var TopologyNodeSchema = object({
60792
60811
  cpuModel: string().nullable(),
60793
60812
  cpuCores: number(),
60794
60813
  memoryMB: number(),
60814
+ /**
60815
+ * The inference RUNTIMES installed on the node (`pythonRuntimes`: onnx,
60816
+ * openvino, edgetpu …) — not its devices. An installed runtime says nothing
60817
+ * about whether its hardware is there (a Coral delegate stays installed
60818
+ * after the stick leaves, D919); the live device set is
60819
+ * `pipelineOrchestrator.getNodeInferenceDevices`.
60820
+ */
60795
60821
  engines: array(string()).readonly(),
60796
60822
  isHub: boolean(),
60797
60823
  isOnline: boolean(),
@@ -61955,7 +61981,28 @@ var ResolvedInferenceConfigSchema = object({
61955
61981
  format: ModelFormatSchema,
61956
61982
  reason: string()
61957
61983
  });
61958
- method(_void(), PlatformCapabilitiesSchema), method(_void(), HardwareInfoSchema), method(object({ requirements: array(ModelRequirementSchema).readonly() }), ResolvedInferenceConfigSchema), method(object({ prefer: HwAccelBackendInputSchema }), HwAccelResolutionSchema);
61984
+ /**
61985
+ * The answer of an accelerator rescan (D919): the node's device list after
61986
+ * the re-probe, what changed, and the evidence that decided the Coral answer
61987
+ * (`usbBus` — could the USB bus be read at all; `decidedBy` — USB ids, the PCI
61988
+ * bus, the installed-delegate fallback, or nothing).
61989
+ */
61990
+ var AcceleratorRescanSchema = object({
61991
+ devices: array(InferenceDeviceDescriptorSchema).readonly(),
61992
+ appeared: array(string()).readonly(),
61993
+ disappeared: array(string()).readonly(),
61994
+ usbBus: _enum(["observed", "unobservable"]),
61995
+ decidedBy: _enum([
61996
+ "usb-ids",
61997
+ "pci",
61998
+ "delegate-fallback",
61999
+ "none"
62000
+ ])
62001
+ });
62002
+ method(_void(), PlatformCapabilitiesSchema), method(_void(), HardwareInfoSchema), method(object({ requirements: array(ModelRequirementSchema).readonly() }), ResolvedInferenceConfigSchema), method(object({ prefer: HwAccelBackendInputSchema }), HwAccelResolutionSchema), method(_void(), AcceleratorRescanSchema, {
62003
+ kind: "mutation",
62004
+ auth: "admin"
62005
+ });
61959
62006
  /**
61960
62007
  * Multi-metric electrical meter. One slice can carry any combination
61961
62008
  * of instantaneous power (W), cumulative energy (kWh), voltage (V),
@@ -74702,6 +74749,12 @@ Object.freeze({
74702
74749
  addonId: null,
74703
74750
  access: "delete"
74704
74751
  },
74752
+ "pipelineOrchestrator.forgetInferenceDevice": {
74753
+ capName: "pipeline-orchestrator",
74754
+ capScope: "system",
74755
+ addonId: null,
74756
+ access: "delete"
74757
+ },
74705
74758
  "pipelineOrchestrator.getAgentLoad": {
74706
74759
  capName: "pipeline-orchestrator",
74707
74760
  capScope: "system",
@@ -75278,6 +75331,12 @@ Object.freeze({
75278
75331
  addonId: null,
75279
75332
  access: "view"
75280
75333
  },
75334
+ "platformProbe.rescanAccelerators": {
75335
+ capName: "platform-probe",
75336
+ capScope: "system",
75337
+ addonId: null,
75338
+ access: "create"
75339
+ },
75281
75340
  "platformProbe.resolveHwAccel": {
75282
75341
  capName: "platform-probe",
75283
75342
  capScope: "system",
@@ -190797,6 +190856,21 @@ var reolinkAccessoryBaseSchema = object({
190797
190856
  kind: string()
190798
190857
  });
190799
190858
  //#endregion
190859
+ //#region src/accessories/siren-play-duration.ts
190860
+ /**
190861
+ * The duration argument for `setSiren(channel, on, duration)`.
190862
+ *
190863
+ * The library's Baichuan path picks the "times" mode for ANY defined duration
190864
+ * (`duration !== undefined`), so a 0 sent as "until switched off" asked the
190865
+ * camera to play the alarm zero times: it acknowledged and stayed silent. Only
190866
+ * a positive count is a duration; everything else is the manual mode, where
190867
+ * `on` alone starts and stops the siren.
190868
+ */
190869
+ function sirenPlayDuration(on, configuredTimes) {
190870
+ if (!on) return void 0;
190871
+ return configuredTimes !== void 0 && configuredTimes > 0 ? configuredTimes : void 0;
190872
+ }
190873
+ //#endregion
190800
190874
  //#region src/accessories/siren.ts
190801
190875
  /**
190802
190876
  * SirenAccessory — child IDevice for the on-camera siren endpoint.
@@ -190990,8 +191064,33 @@ var SirenAccessory = class extends BaseDevice {
190990
191064
  setState: async ({ deviceId, on }) => {
190991
191065
  if (deviceId !== this.id) return;
190992
191066
  const api = await this.api;
190993
- const duration = on ? this.config.get("sirenDurationS") ?? 0 : void 0;
190994
- await api.setSiren(this.channel, on, duration);
191067
+ const duration = sirenPlayDuration(on, this.config.get("sirenDurationS"));
191068
+ try {
191069
+ await api.setSiren(this.channel, on, duration);
191070
+ } catch (err) {
191071
+ this.ctx.logger.warn("siren setState failed", {
191072
+ tags: {
191073
+ deviceId: this.id,
191074
+ channel: this.channel
191075
+ },
191076
+ meta: {
191077
+ on,
191078
+ duration: duration ?? "manual",
191079
+ error: err instanceof Error ? err.message : String(err)
191080
+ }
191081
+ });
191082
+ throw err;
191083
+ }
191084
+ this.ctx.logger.info("siren setState", {
191085
+ tags: {
191086
+ deviceId: this.id,
191087
+ channel: this.channel
191088
+ },
191089
+ meta: {
191090
+ on,
191091
+ duration: duration ?? "manual"
191092
+ }
191093
+ });
190995
191094
  this.setCapSlice(switchCapability, {
190996
191095
  on,
190997
191096
  lastChangedAt: Date.now()
package/dist/addon.mjs CHANGED
@@ -51044,6 +51044,19 @@ var NodeInferenceDeviceSchema = object({
51044
51044
  /** Whether the node's live probe reports the device as usable right now. */
51045
51045
  available: boolean(),
51046
51046
  /**
51047
+ * Is the device on the node at all (D919)? `present` — the live probe
51048
+ * reported it; `absent` — the probe ANSWERED and did not report it, so only
51049
+ * its stored settings remain (unplugged, moved to another node): never
51050
+ * eligible, whatever its stored `enabled`, and forgettable with
51051
+ * `forgetInferenceDevice`; `unknown` — the probe did not answer, nothing is
51052
+ * claimed (D315). Optional only for an orchestrator older than the field.
51053
+ */
51054
+ presence: _enum([
51055
+ "present",
51056
+ "absent",
51057
+ "unknown"
51058
+ ]).optional(),
51059
+ /**
51047
51060
  * Whether this device participates in dispatch. AUTO default (spec C2):
51048
51061
  * accelerators are opt-OUT (a discovered NPU/iGPU/Coral/ANE with no stored
51049
51062
  * entry is `true`); CPU is opt-IN (`false` by default — the fallback pool,
@@ -51269,7 +51282,13 @@ method(object({
51269
51282
  }), object({ success: literal(true) }), {
51270
51283
  kind: "mutation",
51271
51284
  auth: "admin"
51272
- }), method(object({ nodeId: string() }), NodeInferenceDevicesSchema), method(object({ agentNodeId: string() }), object({
51285
+ }), method(object({ nodeId: string() }), NodeInferenceDevicesSchema), method(object({
51286
+ agentNodeId: string(),
51287
+ deviceKey: string()
51288
+ }), object({ success: literal(true) }), {
51289
+ kind: "mutation",
51290
+ auth: "admin"
51291
+ }), method(object({ agentNodeId: string() }), object({
51273
51292
  success: literal(true),
51274
51293
  /** Hardware-aware default detection model now in effect on the node (null when unresolvable). */
51275
51294
  effectiveModelId: string().nullable(),
@@ -60034,7 +60053,7 @@ var motionTriggerCapability = {
60034
60053
  enabled: boolean()
60035
60054
  }), _void(), {
60036
60055
  kind: "mutation",
60037
- auth: "admin"
60056
+ auth: "protected"
60038
60057
  }) },
60039
60058
  events: { onMotionTriggerChanged: { data: object({
60040
60059
  deviceId: number(),
@@ -60784,6 +60803,13 @@ var TopologyNodeSchema = object({
60784
60803
  cpuModel: string().nullable(),
60785
60804
  cpuCores: number(),
60786
60805
  memoryMB: number(),
60806
+ /**
60807
+ * The inference RUNTIMES installed on the node (`pythonRuntimes`: onnx,
60808
+ * openvino, edgetpu …) — not its devices. An installed runtime says nothing
60809
+ * about whether its hardware is there (a Coral delegate stays installed
60810
+ * after the stick leaves, D919); the live device set is
60811
+ * `pipelineOrchestrator.getNodeInferenceDevices`.
60812
+ */
60787
60813
  engines: array(string()).readonly(),
60788
60814
  isHub: boolean(),
60789
60815
  isOnline: boolean(),
@@ -61947,7 +61973,28 @@ var ResolvedInferenceConfigSchema = object({
61947
61973
  format: ModelFormatSchema,
61948
61974
  reason: string()
61949
61975
  });
61950
- method(_void(), PlatformCapabilitiesSchema), method(_void(), HardwareInfoSchema), method(object({ requirements: array(ModelRequirementSchema).readonly() }), ResolvedInferenceConfigSchema), method(object({ prefer: HwAccelBackendInputSchema }), HwAccelResolutionSchema);
61976
+ /**
61977
+ * The answer of an accelerator rescan (D919): the node's device list after
61978
+ * the re-probe, what changed, and the evidence that decided the Coral answer
61979
+ * (`usbBus` — could the USB bus be read at all; `decidedBy` — USB ids, the PCI
61980
+ * bus, the installed-delegate fallback, or nothing).
61981
+ */
61982
+ var AcceleratorRescanSchema = object({
61983
+ devices: array(InferenceDeviceDescriptorSchema).readonly(),
61984
+ appeared: array(string()).readonly(),
61985
+ disappeared: array(string()).readonly(),
61986
+ usbBus: _enum(["observed", "unobservable"]),
61987
+ decidedBy: _enum([
61988
+ "usb-ids",
61989
+ "pci",
61990
+ "delegate-fallback",
61991
+ "none"
61992
+ ])
61993
+ });
61994
+ method(_void(), PlatformCapabilitiesSchema), method(_void(), HardwareInfoSchema), method(object({ requirements: array(ModelRequirementSchema).readonly() }), ResolvedInferenceConfigSchema), method(object({ prefer: HwAccelBackendInputSchema }), HwAccelResolutionSchema), method(_void(), AcceleratorRescanSchema, {
61995
+ kind: "mutation",
61996
+ auth: "admin"
61997
+ });
61951
61998
  /**
61952
61999
  * Multi-metric electrical meter. One slice can carry any combination
61953
62000
  * of instantaneous power (W), cumulative energy (kWh), voltage (V),
@@ -74694,6 +74741,12 @@ Object.freeze({
74694
74741
  addonId: null,
74695
74742
  access: "delete"
74696
74743
  },
74744
+ "pipelineOrchestrator.forgetInferenceDevice": {
74745
+ capName: "pipeline-orchestrator",
74746
+ capScope: "system",
74747
+ addonId: null,
74748
+ access: "delete"
74749
+ },
74697
74750
  "pipelineOrchestrator.getAgentLoad": {
74698
74751
  capName: "pipeline-orchestrator",
74699
74752
  capScope: "system",
@@ -75270,6 +75323,12 @@ Object.freeze({
75270
75323
  addonId: null,
75271
75324
  access: "view"
75272
75325
  },
75326
+ "platformProbe.rescanAccelerators": {
75327
+ capName: "platform-probe",
75328
+ capScope: "system",
75329
+ addonId: null,
75330
+ access: "create"
75331
+ },
75273
75332
  "platformProbe.resolveHwAccel": {
75274
75333
  capName: "platform-probe",
75275
75334
  capScope: "system",
@@ -190789,6 +190848,21 @@ var reolinkAccessoryBaseSchema = object({
190789
190848
  kind: string()
190790
190849
  });
190791
190850
  //#endregion
190851
+ //#region src/accessories/siren-play-duration.ts
190852
+ /**
190853
+ * The duration argument for `setSiren(channel, on, duration)`.
190854
+ *
190855
+ * The library's Baichuan path picks the "times" mode for ANY defined duration
190856
+ * (`duration !== undefined`), so a 0 sent as "until switched off" asked the
190857
+ * camera to play the alarm zero times: it acknowledged and stayed silent. Only
190858
+ * a positive count is a duration; everything else is the manual mode, where
190859
+ * `on` alone starts and stops the siren.
190860
+ */
190861
+ function sirenPlayDuration(on, configuredTimes) {
190862
+ if (!on) return void 0;
190863
+ return configuredTimes !== void 0 && configuredTimes > 0 ? configuredTimes : void 0;
190864
+ }
190865
+ //#endregion
190792
190866
  //#region src/accessories/siren.ts
190793
190867
  /**
190794
190868
  * SirenAccessory — child IDevice for the on-camera siren endpoint.
@@ -190982,8 +191056,33 @@ var SirenAccessory = class extends BaseDevice {
190982
191056
  setState: async ({ deviceId, on }) => {
190983
191057
  if (deviceId !== this.id) return;
190984
191058
  const api = await this.api;
190985
- const duration = on ? this.config.get("sirenDurationS") ?? 0 : void 0;
190986
- await api.setSiren(this.channel, on, duration);
191059
+ const duration = sirenPlayDuration(on, this.config.get("sirenDurationS"));
191060
+ try {
191061
+ await api.setSiren(this.channel, on, duration);
191062
+ } catch (err) {
191063
+ this.ctx.logger.warn("siren setState failed", {
191064
+ tags: {
191065
+ deviceId: this.id,
191066
+ channel: this.channel
191067
+ },
191068
+ meta: {
191069
+ on,
191070
+ duration: duration ?? "manual",
191071
+ error: err instanceof Error ? err.message : String(err)
191072
+ }
191073
+ });
191074
+ throw err;
191075
+ }
191076
+ this.ctx.logger.info("siren setState", {
191077
+ tags: {
191078
+ deviceId: this.id,
191079
+ channel: this.channel
191080
+ },
191081
+ meta: {
191082
+ on,
191083
+ duration: duration ?? "manual"
191084
+ }
191085
+ });
190987
191086
  this.setCapSlice(switchCapability, {
190988
191087
  on,
190989
191088
  lastChangedAt: Date.now()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-reolink",
3
- "version": "1.2.205",
3
+ "version": "1.2.206",
4
4
  "description": "Reolink camera device provider addon for CamStack — native Baichuan protocol",
5
5
  "keywords": [
6
6
  "camstack",