@camstack/addon-provider-hikvision 1.2.120 → 1.2.121

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
@@ -5367,7 +5367,7 @@ var ZodIssueCode = {
5367
5367
  var ZodFirstPartyTypeKind;
5368
5368
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5369
5369
  //#endregion
5370
- //#region ../types/dist/sleep-vl6nBE8d.mjs
5370
+ //#region ../types/dist/sleep-Dk-BdnBf.mjs
5371
5371
  /**
5372
5372
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5373
5373
  * window to float samples (D455).
@@ -31534,6 +31534,26 @@ var PtzHomePresetSchema = object({
31534
31534
  "none"
31535
31535
  ])
31536
31536
  });
31537
+ /**
31538
+ * The camera's own idle-return behaviour: whether it goes home by itself, and
31539
+ * after how long.
31540
+ *
31541
+ * ONE shape, not two scalars, because on the camera they are ONE fact —
31542
+ * Reolink's guard point carries `benable` and `timeout` in the same element,
31543
+ * written by the same command. Reading them apart means two round-trips that
31544
+ * can disagree.
31545
+ *
31546
+ * `enabled` and `seconds` are INDEPENDENT: a camera can hold a 68 s delay with
31547
+ * the behaviour switched off, which is exactly what the vendor app leaves when
31548
+ * you turn the guard point off without clearing it. The first version of this
31549
+ * cap reported only the delay, so that state was invisible — a camera could be
31550
+ * configured to return after 68 seconds with no way to say whether it should
31551
+ * return at all.
31552
+ */
31553
+ var PtzHomeReturnSchema = object({
31554
+ enabled: boolean(),
31555
+ seconds: number().int()
31556
+ });
31537
31557
  var ptzCapability = {
31538
31558
  name: "ptz",
31539
31559
  scope: "device",
@@ -31616,18 +31636,25 @@ var ptzCapability = {
31616
31636
  auth: "admin"
31617
31637
  }),
31618
31638
  /**
31619
- * How long the camera waits, idle, before returning home on its own --
31620
- * `null` when it has no such behaviour.
31639
+ * Whether the camera returns home on its own when left idle, and after how
31640
+ * long. `null` when it has no such behaviour at all.
31621
31641
  *
31622
31642
  * Reolink's guard point carries one (`timeout`, freely settable in
31623
31643
  * seconds). It is a real function of the camera that we did not expose at
31624
31644
  * all, and it belongs next to the home it governs rather than in a vendor
31625
31645
  * settings page nobody associates with Home.
31626
31646
  */
31627
- getHomeReturnSeconds: method(object({ deviceId: number() }), number().int().nullable()),
31628
- /** Set the idle-return delay. Refused by a camera that has no such timer. */
31629
- setHomeReturnSeconds: method(object({
31647
+ getHomeReturn: method(object({ deviceId: number() }), PtzHomeReturnSchema.nullable()),
31648
+ /**
31649
+ * Set both together. Refused by a camera with no idle-return behaviour.
31650
+ *
31651
+ * They travel together for the same reason they are read together: the
31652
+ * underlying write carries both, so setting one alone means reading the
31653
+ * other back first and racing whoever else is writing.
31654
+ */
31655
+ setHomeReturn: method(object({
31630
31656
  deviceId: number(),
31657
+ enabled: boolean(),
31631
31658
  seconds: number().int().min(0).max(3600)
31632
31659
  }), _void(), {
31633
31660
  kind: "mutation",
@@ -41370,7 +41397,7 @@ Object.freeze({
41370
41397
  addonId: null,
41371
41398
  access: "view"
41372
41399
  },
41373
- "ptz.getHomeReturnSeconds": {
41400
+ "ptz.getHomeReturn": {
41374
41401
  capName: "ptz",
41375
41402
  capScope: "device",
41376
41403
  addonId: null,
@@ -41430,7 +41457,7 @@ Object.freeze({
41430
41457
  addonId: null,
41431
41458
  access: "create"
41432
41459
  },
41433
- "ptz.setHomeReturnSeconds": {
41460
+ "ptz.setHomeReturn": {
41434
41461
  capName: "ptz",
41435
41462
  capScope: "device",
41436
41463
  addonId: null,
@@ -44619,7 +44646,7 @@ Object.freeze({
44619
44646
  form: "single",
44620
44647
  optional: false
44621
44648
  }],
44622
- "ptz.getHomeReturnSeconds": [{
44649
+ "ptz.getHomeReturn": [{
44623
44650
  name: "deviceId",
44624
44651
  form: "single",
44625
44652
  optional: false
@@ -44669,7 +44696,7 @@ Object.freeze({
44669
44696
  form: "single",
44670
44697
  optional: false
44671
44698
  }],
44672
- "ptz.setHomeReturnSeconds": [{
44699
+ "ptz.setHomeReturn": [{
44673
44700
  name: "deviceId",
44674
44701
  form: "single",
44675
44702
  optional: false
@@ -51876,10 +51903,10 @@ var HikvisionCamera = class HikvisionCamera extends BaseDevice {
51876
51903
  meta: { presetId: slot }
51877
51904
  });
51878
51905
  },
51879
- getHomeReturnSeconds: async () => {
51906
+ getHomeReturn: async () => {
51880
51907
  return null;
51881
51908
  },
51882
- setHomeReturnSeconds: async () => {
51909
+ setHomeReturn: async () => {
51883
51910
  throw new Error("Hikvision: the idle-return timer is not wired on this driver");
51884
51911
  },
51885
51912
  setHomePreset: async ({ deviceId, presetId }) => {
package/dist/addon.mjs CHANGED
@@ -5368,7 +5368,7 @@ var ZodIssueCode = {
5368
5368
  var ZodFirstPartyTypeKind;
5369
5369
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5370
5370
  //#endregion
5371
- //#region ../types/dist/sleep-vl6nBE8d.mjs
5371
+ //#region ../types/dist/sleep-Dk-BdnBf.mjs
5372
5372
  /**
5373
5373
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5374
5374
  * window to float samples (D455).
@@ -31535,6 +31535,26 @@ var PtzHomePresetSchema = object({
31535
31535
  "none"
31536
31536
  ])
31537
31537
  });
31538
+ /**
31539
+ * The camera's own idle-return behaviour: whether it goes home by itself, and
31540
+ * after how long.
31541
+ *
31542
+ * ONE shape, not two scalars, because on the camera they are ONE fact —
31543
+ * Reolink's guard point carries `benable` and `timeout` in the same element,
31544
+ * written by the same command. Reading them apart means two round-trips that
31545
+ * can disagree.
31546
+ *
31547
+ * `enabled` and `seconds` are INDEPENDENT: a camera can hold a 68 s delay with
31548
+ * the behaviour switched off, which is exactly what the vendor app leaves when
31549
+ * you turn the guard point off without clearing it. The first version of this
31550
+ * cap reported only the delay, so that state was invisible — a camera could be
31551
+ * configured to return after 68 seconds with no way to say whether it should
31552
+ * return at all.
31553
+ */
31554
+ var PtzHomeReturnSchema = object({
31555
+ enabled: boolean(),
31556
+ seconds: number().int()
31557
+ });
31538
31558
  var ptzCapability = {
31539
31559
  name: "ptz",
31540
31560
  scope: "device",
@@ -31617,18 +31637,25 @@ var ptzCapability = {
31617
31637
  auth: "admin"
31618
31638
  }),
31619
31639
  /**
31620
- * How long the camera waits, idle, before returning home on its own --
31621
- * `null` when it has no such behaviour.
31640
+ * Whether the camera returns home on its own when left idle, and after how
31641
+ * long. `null` when it has no such behaviour at all.
31622
31642
  *
31623
31643
  * Reolink's guard point carries one (`timeout`, freely settable in
31624
31644
  * seconds). It is a real function of the camera that we did not expose at
31625
31645
  * all, and it belongs next to the home it governs rather than in a vendor
31626
31646
  * settings page nobody associates with Home.
31627
31647
  */
31628
- getHomeReturnSeconds: method(object({ deviceId: number() }), number().int().nullable()),
31629
- /** Set the idle-return delay. Refused by a camera that has no such timer. */
31630
- setHomeReturnSeconds: method(object({
31648
+ getHomeReturn: method(object({ deviceId: number() }), PtzHomeReturnSchema.nullable()),
31649
+ /**
31650
+ * Set both together. Refused by a camera with no idle-return behaviour.
31651
+ *
31652
+ * They travel together for the same reason they are read together: the
31653
+ * underlying write carries both, so setting one alone means reading the
31654
+ * other back first and racing whoever else is writing.
31655
+ */
31656
+ setHomeReturn: method(object({
31631
31657
  deviceId: number(),
31658
+ enabled: boolean(),
31632
31659
  seconds: number().int().min(0).max(3600)
31633
31660
  }), _void(), {
31634
31661
  kind: "mutation",
@@ -41371,7 +41398,7 @@ Object.freeze({
41371
41398
  addonId: null,
41372
41399
  access: "view"
41373
41400
  },
41374
- "ptz.getHomeReturnSeconds": {
41401
+ "ptz.getHomeReturn": {
41375
41402
  capName: "ptz",
41376
41403
  capScope: "device",
41377
41404
  addonId: null,
@@ -41431,7 +41458,7 @@ Object.freeze({
41431
41458
  addonId: null,
41432
41459
  access: "create"
41433
41460
  },
41434
- "ptz.setHomeReturnSeconds": {
41461
+ "ptz.setHomeReturn": {
41435
41462
  capName: "ptz",
41436
41463
  capScope: "device",
41437
41464
  addonId: null,
@@ -44620,7 +44647,7 @@ Object.freeze({
44620
44647
  form: "single",
44621
44648
  optional: false
44622
44649
  }],
44623
- "ptz.getHomeReturnSeconds": [{
44650
+ "ptz.getHomeReturn": [{
44624
44651
  name: "deviceId",
44625
44652
  form: "single",
44626
44653
  optional: false
@@ -44670,7 +44697,7 @@ Object.freeze({
44670
44697
  form: "single",
44671
44698
  optional: false
44672
44699
  }],
44673
- "ptz.setHomeReturnSeconds": [{
44700
+ "ptz.setHomeReturn": [{
44674
44701
  name: "deviceId",
44675
44702
  form: "single",
44676
44703
  optional: false
@@ -51877,10 +51904,10 @@ var HikvisionCamera = class HikvisionCamera extends BaseDevice {
51877
51904
  meta: { presetId: slot }
51878
51905
  });
51879
51906
  },
51880
- getHomeReturnSeconds: async () => {
51907
+ getHomeReturn: async () => {
51881
51908
  return null;
51882
51909
  },
51883
- setHomeReturnSeconds: async () => {
51910
+ setHomeReturn: async () => {
51884
51911
  throw new Error("Hikvision: the idle-return timer is not wired on this driver");
51885
51912
  },
51886
51913
  setHomePreset: async ({ deviceId, presetId }) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-hikvision",
3
- "version": "1.2.120",
3
+ "version": "1.2.121",
4
4
  "description": "Hikvision camera device provider addon for CamStack — ISAPI over HTTP(S) with digest auth (snapshot, alarm stream, RTSP discovery)",
5
5
  "keywords": [
6
6
  "camstack",