@camstack/addon-provider-onvif 1.2.110 → 1.2.112

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
@@ -5363,7 +5363,7 @@ var ZodIssueCode = {
5363
5363
  var ZodFirstPartyTypeKind;
5364
5364
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5365
5365
  //#endregion
5366
- //#region ../types/dist/sleep-B1y0Fo1U.mjs
5366
+ //#region ../types/dist/sleep-Dk-BdnBf.mjs
5367
5367
  /**
5368
5368
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5369
5369
  * window to float samples (D455).
@@ -29049,6 +29049,26 @@ var PtzHomePresetSchema = object({
29049
29049
  "none"
29050
29050
  ])
29051
29051
  });
29052
+ /**
29053
+ * The camera's own idle-return behaviour: whether it goes home by itself, and
29054
+ * after how long.
29055
+ *
29056
+ * ONE shape, not two scalars, because on the camera they are ONE fact —
29057
+ * Reolink's guard point carries `benable` and `timeout` in the same element,
29058
+ * written by the same command. Reading them apart means two round-trips that
29059
+ * can disagree.
29060
+ *
29061
+ * `enabled` and `seconds` are INDEPENDENT: a camera can hold a 68 s delay with
29062
+ * the behaviour switched off, which is exactly what the vendor app leaves when
29063
+ * you turn the guard point off without clearing it. The first version of this
29064
+ * cap reported only the delay, so that state was invisible — a camera could be
29065
+ * configured to return after 68 seconds with no way to say whether it should
29066
+ * return at all.
29067
+ */
29068
+ var PtzHomeReturnSchema = object({
29069
+ enabled: boolean(),
29070
+ seconds: number().int()
29071
+ });
29052
29072
  var ptzCapability = {
29053
29073
  name: "ptz",
29054
29074
  scope: "device",
@@ -29108,6 +29128,54 @@ var ptzCapability = {
29108
29128
  auth: "admin"
29109
29129
  }),
29110
29130
  /**
29131
+ * Make WHERE THE HEAD IS POINTING RIGHT NOW this camera's home.
29132
+ *
29133
+ * `setHomePreset` takes a preset id, and a preset id is the wrong shape for
29134
+ * the most natural thing an operator does: aim the camera, then say "here".
29135
+ * It is also the only shape a camera whose home is NOT a preset can accept
29136
+ * -- Reolink's home is a guard point, a stored position with no id at all,
29137
+ * and hiding the control for that case (as the UI briefly did) left the one
29138
+ * vendor with a native home unable to set it.
29139
+ *
29140
+ * Each provider does it its own way:
29141
+ * reolink `setGrd` with `needSetPos`, pinning the guard point here
29142
+ * hikvision / amcrest save a preset, then pin it as home
29143
+ * onvif REFUSES -- its home is the PTZ origin and cannot be moved
29144
+ *
29145
+ * A provider that cannot honour it throws rather than silently doing
29146
+ * nothing: an operator who pressed "set home here" and saw no error would
29147
+ * believe it took.
29148
+ */
29149
+ captureHomeHere: method(object({ deviceId: number() }), _void(), {
29150
+ kind: "mutation",
29151
+ auth: "admin"
29152
+ }),
29153
+ /**
29154
+ * Whether the camera returns home on its own when left idle, and after how
29155
+ * long. `null` when it has no such behaviour at all.
29156
+ *
29157
+ * Reolink's guard point carries one (`timeout`, freely settable in
29158
+ * seconds). It is a real function of the camera that we did not expose at
29159
+ * all, and it belongs next to the home it governs rather than in a vendor
29160
+ * settings page nobody associates with Home.
29161
+ */
29162
+ getHomeReturn: method(object({ deviceId: number() }), PtzHomeReturnSchema.nullable()),
29163
+ /**
29164
+ * Set both together. Refused by a camera with no idle-return behaviour.
29165
+ *
29166
+ * They travel together for the same reason they are read together: the
29167
+ * underlying write carries both, so setting one alone means reading the
29168
+ * other back first and racing whoever else is writing.
29169
+ */
29170
+ setHomeReturn: method(object({
29171
+ deviceId: number(),
29172
+ enabled: boolean(),
29173
+ seconds: number().int().min(0).max(3600)
29174
+ }), _void(), {
29175
+ kind: "mutation",
29176
+ auth: "admin"
29177
+ }),
29178
+ /**
29111
29179
  * Pull the current PTZ position. Redundant with the auto-injected
29112
29180
  * `getStatus` method (see `status` below); kept for callers that
29113
29181
  * haven't migrated. Will be folded into `getStatus` in a future
@@ -36951,6 +37019,12 @@ Object.freeze({
36951
37019
  addonId: null,
36952
37020
  access: "create"
36953
37021
  },
37022
+ "ptz.captureHomeHere": {
37023
+ capName: "ptz",
37024
+ capScope: "device",
37025
+ addonId: null,
37026
+ access: "create"
37027
+ },
36954
37028
  "ptz.continuousMove": {
36955
37029
  capName: "ptz",
36956
37030
  capScope: "device",
@@ -36969,6 +37043,12 @@ Object.freeze({
36969
37043
  addonId: null,
36970
37044
  access: "view"
36971
37045
  },
37046
+ "ptz.getHomeReturn": {
37047
+ capName: "ptz",
37048
+ capScope: "device",
37049
+ addonId: null,
37050
+ access: "view"
37051
+ },
36972
37052
  "ptz.getOptions": {
36973
37053
  capName: "ptz",
36974
37054
  capScope: "device",
@@ -37023,6 +37103,12 @@ Object.freeze({
37023
37103
  addonId: null,
37024
37104
  access: "create"
37025
37105
  },
37106
+ "ptz.setHomeReturn": {
37107
+ capName: "ptz",
37108
+ capScope: "device",
37109
+ addonId: null,
37110
+ access: "create"
37111
+ },
37026
37112
  "ptz.stop": {
37027
37113
  capName: "ptz",
37028
37114
  capScope: "device",
@@ -40186,6 +40272,11 @@ Object.freeze({
40186
40272
  form: "single",
40187
40273
  optional: false
40188
40274
  }],
40275
+ "ptz.captureHomeHere": [{
40276
+ name: "deviceId",
40277
+ form: "single",
40278
+ optional: false
40279
+ }],
40189
40280
  "ptz.continuousMove": [{
40190
40281
  name: "deviceId",
40191
40282
  form: "single",
@@ -40201,6 +40292,11 @@ Object.freeze({
40201
40292
  form: "single",
40202
40293
  optional: false
40203
40294
  }],
40295
+ "ptz.getHomeReturn": [{
40296
+ name: "deviceId",
40297
+ form: "single",
40298
+ optional: false
40299
+ }],
40204
40300
  "ptz.getOptions": [{
40205
40301
  name: "deviceId",
40206
40302
  form: "single",
@@ -40246,6 +40342,11 @@ Object.freeze({
40246
40342
  form: "single",
40247
40343
  optional: false
40248
40344
  }],
40345
+ "ptz.setHomeReturn": [{
40346
+ name: "deviceId",
40347
+ form: "single",
40348
+ optional: false
40349
+ }],
40249
40350
  "ptz.stop": [{
40250
40351
  name: "deviceId",
40251
40352
  form: "single",
@@ -50383,6 +50484,15 @@ var OnvifCamera = class {
50383
50484
  source: "native"
50384
50485
  };
50385
50486
  },
50487
+ captureHomeHere: async () => {
50488
+ throw new Error("OnvifCamera: home is the PTZ origin on ONVIF and cannot be moved to the current position");
50489
+ },
50490
+ getHomeReturn: async () => {
50491
+ return null;
50492
+ },
50493
+ setHomeReturn: async () => {
50494
+ throw new Error("OnvifCamera: no idle-return timer on this driver");
50495
+ },
50386
50496
  setHomePreset: async () => {
50387
50497
  throw new Error("OnvifCamera: home is the PTZ origin on ONVIF and cannot be pointed at a preset");
50388
50498
  },
package/dist/addon.mjs CHANGED
@@ -5364,7 +5364,7 @@ var ZodIssueCode = {
5364
5364
  var ZodFirstPartyTypeKind;
5365
5365
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5366
5366
  //#endregion
5367
- //#region ../types/dist/sleep-B1y0Fo1U.mjs
5367
+ //#region ../types/dist/sleep-Dk-BdnBf.mjs
5368
5368
  /**
5369
5369
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5370
5370
  * window to float samples (D455).
@@ -29050,6 +29050,26 @@ var PtzHomePresetSchema = object({
29050
29050
  "none"
29051
29051
  ])
29052
29052
  });
29053
+ /**
29054
+ * The camera's own idle-return behaviour: whether it goes home by itself, and
29055
+ * after how long.
29056
+ *
29057
+ * ONE shape, not two scalars, because on the camera they are ONE fact —
29058
+ * Reolink's guard point carries `benable` and `timeout` in the same element,
29059
+ * written by the same command. Reading them apart means two round-trips that
29060
+ * can disagree.
29061
+ *
29062
+ * `enabled` and `seconds` are INDEPENDENT: a camera can hold a 68 s delay with
29063
+ * the behaviour switched off, which is exactly what the vendor app leaves when
29064
+ * you turn the guard point off without clearing it. The first version of this
29065
+ * cap reported only the delay, so that state was invisible — a camera could be
29066
+ * configured to return after 68 seconds with no way to say whether it should
29067
+ * return at all.
29068
+ */
29069
+ var PtzHomeReturnSchema = object({
29070
+ enabled: boolean(),
29071
+ seconds: number().int()
29072
+ });
29053
29073
  var ptzCapability = {
29054
29074
  name: "ptz",
29055
29075
  scope: "device",
@@ -29109,6 +29129,54 @@ var ptzCapability = {
29109
29129
  auth: "admin"
29110
29130
  }),
29111
29131
  /**
29132
+ * Make WHERE THE HEAD IS POINTING RIGHT NOW this camera's home.
29133
+ *
29134
+ * `setHomePreset` takes a preset id, and a preset id is the wrong shape for
29135
+ * the most natural thing an operator does: aim the camera, then say "here".
29136
+ * It is also the only shape a camera whose home is NOT a preset can accept
29137
+ * -- Reolink's home is a guard point, a stored position with no id at all,
29138
+ * and hiding the control for that case (as the UI briefly did) left the one
29139
+ * vendor with a native home unable to set it.
29140
+ *
29141
+ * Each provider does it its own way:
29142
+ * reolink `setGrd` with `needSetPos`, pinning the guard point here
29143
+ * hikvision / amcrest save a preset, then pin it as home
29144
+ * onvif REFUSES -- its home is the PTZ origin and cannot be moved
29145
+ *
29146
+ * A provider that cannot honour it throws rather than silently doing
29147
+ * nothing: an operator who pressed "set home here" and saw no error would
29148
+ * believe it took.
29149
+ */
29150
+ captureHomeHere: method(object({ deviceId: number() }), _void(), {
29151
+ kind: "mutation",
29152
+ auth: "admin"
29153
+ }),
29154
+ /**
29155
+ * Whether the camera returns home on its own when left idle, and after how
29156
+ * long. `null` when it has no such behaviour at all.
29157
+ *
29158
+ * Reolink's guard point carries one (`timeout`, freely settable in
29159
+ * seconds). It is a real function of the camera that we did not expose at
29160
+ * all, and it belongs next to the home it governs rather than in a vendor
29161
+ * settings page nobody associates with Home.
29162
+ */
29163
+ getHomeReturn: method(object({ deviceId: number() }), PtzHomeReturnSchema.nullable()),
29164
+ /**
29165
+ * Set both together. Refused by a camera with no idle-return behaviour.
29166
+ *
29167
+ * They travel together for the same reason they are read together: the
29168
+ * underlying write carries both, so setting one alone means reading the
29169
+ * other back first and racing whoever else is writing.
29170
+ */
29171
+ setHomeReturn: method(object({
29172
+ deviceId: number(),
29173
+ enabled: boolean(),
29174
+ seconds: number().int().min(0).max(3600)
29175
+ }), _void(), {
29176
+ kind: "mutation",
29177
+ auth: "admin"
29178
+ }),
29179
+ /**
29112
29180
  * Pull the current PTZ position. Redundant with the auto-injected
29113
29181
  * `getStatus` method (see `status` below); kept for callers that
29114
29182
  * haven't migrated. Will be folded into `getStatus` in a future
@@ -36952,6 +37020,12 @@ Object.freeze({
36952
37020
  addonId: null,
36953
37021
  access: "create"
36954
37022
  },
37023
+ "ptz.captureHomeHere": {
37024
+ capName: "ptz",
37025
+ capScope: "device",
37026
+ addonId: null,
37027
+ access: "create"
37028
+ },
36955
37029
  "ptz.continuousMove": {
36956
37030
  capName: "ptz",
36957
37031
  capScope: "device",
@@ -36970,6 +37044,12 @@ Object.freeze({
36970
37044
  addonId: null,
36971
37045
  access: "view"
36972
37046
  },
37047
+ "ptz.getHomeReturn": {
37048
+ capName: "ptz",
37049
+ capScope: "device",
37050
+ addonId: null,
37051
+ access: "view"
37052
+ },
36973
37053
  "ptz.getOptions": {
36974
37054
  capName: "ptz",
36975
37055
  capScope: "device",
@@ -37024,6 +37104,12 @@ Object.freeze({
37024
37104
  addonId: null,
37025
37105
  access: "create"
37026
37106
  },
37107
+ "ptz.setHomeReturn": {
37108
+ capName: "ptz",
37109
+ capScope: "device",
37110
+ addonId: null,
37111
+ access: "create"
37112
+ },
37027
37113
  "ptz.stop": {
37028
37114
  capName: "ptz",
37029
37115
  capScope: "device",
@@ -40187,6 +40273,11 @@ Object.freeze({
40187
40273
  form: "single",
40188
40274
  optional: false
40189
40275
  }],
40276
+ "ptz.captureHomeHere": [{
40277
+ name: "deviceId",
40278
+ form: "single",
40279
+ optional: false
40280
+ }],
40190
40281
  "ptz.continuousMove": [{
40191
40282
  name: "deviceId",
40192
40283
  form: "single",
@@ -40202,6 +40293,11 @@ Object.freeze({
40202
40293
  form: "single",
40203
40294
  optional: false
40204
40295
  }],
40296
+ "ptz.getHomeReturn": [{
40297
+ name: "deviceId",
40298
+ form: "single",
40299
+ optional: false
40300
+ }],
40205
40301
  "ptz.getOptions": [{
40206
40302
  name: "deviceId",
40207
40303
  form: "single",
@@ -40247,6 +40343,11 @@ Object.freeze({
40247
40343
  form: "single",
40248
40344
  optional: false
40249
40345
  }],
40346
+ "ptz.setHomeReturn": [{
40347
+ name: "deviceId",
40348
+ form: "single",
40349
+ optional: false
40350
+ }],
40250
40351
  "ptz.stop": [{
40251
40352
  name: "deviceId",
40252
40353
  form: "single",
@@ -50384,6 +50485,15 @@ var OnvifCamera = class {
50384
50485
  source: "native"
50385
50486
  };
50386
50487
  },
50488
+ captureHomeHere: async () => {
50489
+ throw new Error("OnvifCamera: home is the PTZ origin on ONVIF and cannot be moved to the current position");
50490
+ },
50491
+ getHomeReturn: async () => {
50492
+ return null;
50493
+ },
50494
+ setHomeReturn: async () => {
50495
+ throw new Error("OnvifCamera: no idle-return timer on this driver");
50496
+ },
50387
50497
  setHomePreset: async () => {
50388
50498
  throw new Error("OnvifCamera: home is the PTZ origin on ONVIF and cannot be pointed at a preset");
50389
50499
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-onvif",
3
- "version": "1.2.110",
3
+ "version": "1.2.112",
4
4
  "description": "ONVIF camera device provider addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",