@camstack/addon-provider-amcrest 0.2.114 → 0.2.115

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).
@@ -31222,6 +31222,26 @@ var PtzHomePresetSchema = object({
31222
31222
  "none"
31223
31223
  ])
31224
31224
  });
31225
+ /**
31226
+ * The camera's own idle-return behaviour: whether it goes home by itself, and
31227
+ * after how long.
31228
+ *
31229
+ * ONE shape, not two scalars, because on the camera they are ONE fact —
31230
+ * Reolink's guard point carries `benable` and `timeout` in the same element,
31231
+ * written by the same command. Reading them apart means two round-trips that
31232
+ * can disagree.
31233
+ *
31234
+ * `enabled` and `seconds` are INDEPENDENT: a camera can hold a 68 s delay with
31235
+ * the behaviour switched off, which is exactly what the vendor app leaves when
31236
+ * you turn the guard point off without clearing it. The first version of this
31237
+ * cap reported only the delay, so that state was invisible — a camera could be
31238
+ * configured to return after 68 seconds with no way to say whether it should
31239
+ * return at all.
31240
+ */
31241
+ var PtzHomeReturnSchema = object({
31242
+ enabled: boolean(),
31243
+ seconds: number().int()
31244
+ });
31225
31245
  var ptzCapability = {
31226
31246
  name: "ptz",
31227
31247
  scope: "device",
@@ -31304,18 +31324,25 @@ var ptzCapability = {
31304
31324
  auth: "admin"
31305
31325
  }),
31306
31326
  /**
31307
- * How long the camera waits, idle, before returning home on its own --
31308
- * `null` when it has no such behaviour.
31327
+ * Whether the camera returns home on its own when left idle, and after how
31328
+ * long. `null` when it has no such behaviour at all.
31309
31329
  *
31310
31330
  * Reolink's guard point carries one (`timeout`, freely settable in
31311
31331
  * seconds). It is a real function of the camera that we did not expose at
31312
31332
  * all, and it belongs next to the home it governs rather than in a vendor
31313
31333
  * settings page nobody associates with Home.
31314
31334
  */
31315
- getHomeReturnSeconds: method(object({ deviceId: number() }), number().int().nullable()),
31316
- /** Set the idle-return delay. Refused by a camera that has no such timer. */
31317
- setHomeReturnSeconds: method(object({
31335
+ getHomeReturn: method(object({ deviceId: number() }), PtzHomeReturnSchema.nullable()),
31336
+ /**
31337
+ * Set both together. Refused by a camera with no idle-return behaviour.
31338
+ *
31339
+ * They travel together for the same reason they are read together: the
31340
+ * underlying write carries both, so setting one alone means reading the
31341
+ * other back first and racing whoever else is writing.
31342
+ */
31343
+ setHomeReturn: method(object({
31318
31344
  deviceId: number(),
31345
+ enabled: boolean(),
31319
31346
  seconds: number().int().min(0).max(3600)
31320
31347
  }), _void(), {
31321
31348
  kind: "mutation",
@@ -41006,7 +41033,7 @@ Object.freeze({
41006
41033
  addonId: null,
41007
41034
  access: "view"
41008
41035
  },
41009
- "ptz.getHomeReturnSeconds": {
41036
+ "ptz.getHomeReturn": {
41010
41037
  capName: "ptz",
41011
41038
  capScope: "device",
41012
41039
  addonId: null,
@@ -41066,7 +41093,7 @@ Object.freeze({
41066
41093
  addonId: null,
41067
41094
  access: "create"
41068
41095
  },
41069
- "ptz.setHomeReturnSeconds": {
41096
+ "ptz.setHomeReturn": {
41070
41097
  capName: "ptz",
41071
41098
  capScope: "device",
41072
41099
  addonId: null,
@@ -44255,7 +44282,7 @@ Object.freeze({
44255
44282
  form: "single",
44256
44283
  optional: false
44257
44284
  }],
44258
- "ptz.getHomeReturnSeconds": [{
44285
+ "ptz.getHomeReturn": [{
44259
44286
  name: "deviceId",
44260
44287
  form: "single",
44261
44288
  optional: false
@@ -44305,7 +44332,7 @@ Object.freeze({
44305
44332
  form: "single",
44306
44333
  optional: false
44307
44334
  }],
44308
- "ptz.setHomeReturnSeconds": [{
44335
+ "ptz.setHomeReturn": [{
44309
44336
  name: "deviceId",
44310
44337
  form: "single",
44311
44338
  optional: false
@@ -47253,10 +47280,10 @@ var AmcrestCamera = class AmcrestCamera extends BaseDevice {
47253
47280
  meta: { presetId: slot }
47254
47281
  });
47255
47282
  },
47256
- getHomeReturnSeconds: async () => {
47283
+ getHomeReturn: async () => {
47257
47284
  return null;
47258
47285
  },
47259
- setHomeReturnSeconds: async () => {
47286
+ setHomeReturn: async () => {
47260
47287
  throw new Error("Amcrest: the idle-return timer is not wired on this driver");
47261
47288
  },
47262
47289
  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).
@@ -31223,6 +31223,26 @@ var PtzHomePresetSchema = object({
31223
31223
  "none"
31224
31224
  ])
31225
31225
  });
31226
+ /**
31227
+ * The camera's own idle-return behaviour: whether it goes home by itself, and
31228
+ * after how long.
31229
+ *
31230
+ * ONE shape, not two scalars, because on the camera they are ONE fact —
31231
+ * Reolink's guard point carries `benable` and `timeout` in the same element,
31232
+ * written by the same command. Reading them apart means two round-trips that
31233
+ * can disagree.
31234
+ *
31235
+ * `enabled` and `seconds` are INDEPENDENT: a camera can hold a 68 s delay with
31236
+ * the behaviour switched off, which is exactly what the vendor app leaves when
31237
+ * you turn the guard point off without clearing it. The first version of this
31238
+ * cap reported only the delay, so that state was invisible — a camera could be
31239
+ * configured to return after 68 seconds with no way to say whether it should
31240
+ * return at all.
31241
+ */
31242
+ var PtzHomeReturnSchema = object({
31243
+ enabled: boolean(),
31244
+ seconds: number().int()
31245
+ });
31226
31246
  var ptzCapability = {
31227
31247
  name: "ptz",
31228
31248
  scope: "device",
@@ -31305,18 +31325,25 @@ var ptzCapability = {
31305
31325
  auth: "admin"
31306
31326
  }),
31307
31327
  /**
31308
- * How long the camera waits, idle, before returning home on its own --
31309
- * `null` when it has no such behaviour.
31328
+ * Whether the camera returns home on its own when left idle, and after how
31329
+ * long. `null` when it has no such behaviour at all.
31310
31330
  *
31311
31331
  * Reolink's guard point carries one (`timeout`, freely settable in
31312
31332
  * seconds). It is a real function of the camera that we did not expose at
31313
31333
  * all, and it belongs next to the home it governs rather than in a vendor
31314
31334
  * settings page nobody associates with Home.
31315
31335
  */
31316
- getHomeReturnSeconds: method(object({ deviceId: number() }), number().int().nullable()),
31317
- /** Set the idle-return delay. Refused by a camera that has no such timer. */
31318
- setHomeReturnSeconds: method(object({
31336
+ getHomeReturn: method(object({ deviceId: number() }), PtzHomeReturnSchema.nullable()),
31337
+ /**
31338
+ * Set both together. Refused by a camera with no idle-return behaviour.
31339
+ *
31340
+ * They travel together for the same reason they are read together: the
31341
+ * underlying write carries both, so setting one alone means reading the
31342
+ * other back first and racing whoever else is writing.
31343
+ */
31344
+ setHomeReturn: method(object({
31319
31345
  deviceId: number(),
31346
+ enabled: boolean(),
31320
31347
  seconds: number().int().min(0).max(3600)
31321
31348
  }), _void(), {
31322
31349
  kind: "mutation",
@@ -41007,7 +41034,7 @@ Object.freeze({
41007
41034
  addonId: null,
41008
41035
  access: "view"
41009
41036
  },
41010
- "ptz.getHomeReturnSeconds": {
41037
+ "ptz.getHomeReturn": {
41011
41038
  capName: "ptz",
41012
41039
  capScope: "device",
41013
41040
  addonId: null,
@@ -41067,7 +41094,7 @@ Object.freeze({
41067
41094
  addonId: null,
41068
41095
  access: "create"
41069
41096
  },
41070
- "ptz.setHomeReturnSeconds": {
41097
+ "ptz.setHomeReturn": {
41071
41098
  capName: "ptz",
41072
41099
  capScope: "device",
41073
41100
  addonId: null,
@@ -44256,7 +44283,7 @@ Object.freeze({
44256
44283
  form: "single",
44257
44284
  optional: false
44258
44285
  }],
44259
- "ptz.getHomeReturnSeconds": [{
44286
+ "ptz.getHomeReturn": [{
44260
44287
  name: "deviceId",
44261
44288
  form: "single",
44262
44289
  optional: false
@@ -44306,7 +44333,7 @@ Object.freeze({
44306
44333
  form: "single",
44307
44334
  optional: false
44308
44335
  }],
44309
- "ptz.setHomeReturnSeconds": [{
44336
+ "ptz.setHomeReturn": [{
44310
44337
  name: "deviceId",
44311
44338
  form: "single",
44312
44339
  optional: false
@@ -47254,10 +47281,10 @@ var AmcrestCamera = class AmcrestCamera extends BaseDevice {
47254
47281
  meta: { presetId: slot }
47255
47282
  });
47256
47283
  },
47257
- getHomeReturnSeconds: async () => {
47284
+ getHomeReturn: async () => {
47258
47285
  return null;
47259
47286
  },
47260
- setHomeReturnSeconds: async () => {
47287
+ setHomeReturn: async () => {
47261
47288
  throw new Error("Amcrest: the idle-return timer is not wired on this driver");
47262
47289
  },
47263
47290
  setHomePreset: async ({ deviceId, presetId }) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-amcrest",
3
- "version": "0.2.114",
3
+ "version": "0.2.115",
4
4
  "description": "Amcrest/Dahua camera device provider addon for CamStack — Dahua CGI over HTTP(S) with digest auth (snapshot, RTSP catalog, PTZ, image/day-night config)",
5
5
  "keywords": [
6
6
  "camstack",