@camstack/addon-provider-amcrest 0.2.114 → 0.2.116

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.
Files changed (3) hide show
  1. package/dist/addon.js +192 -12
  2. package/dist/addon.mjs +192 -12
  3. package/package.json +1 -1
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-Bs3xPtSh.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).
@@ -11845,6 +11845,24 @@ var GetStreamWithCodecInputSchema = object({
11845
11845
  });
11846
11846
  var RtpSourceSchema = object({
11847
11847
  url: string(),
11848
+ /**
11849
+ * The SENTRY counterpart of {@link url} — the dial that asks for the stream
11850
+ * WITHOUT asking for the camera — or `null` when this camera offers none.
11851
+ *
11852
+ * The broker answers it because the broker is the only thing that can:
11853
+ * eligibility is `sentryEligible` (a BATTERY camera that DECLARES the signals
11854
+ * cap), asked of facts only the broker holds. A consumer re-deriving it from
11855
+ * cap bindings would be a second authority, and two authorities on the same
11856
+ * question is how a composite camera ends up dialling a sleeping camera
11857
+ * because its own copy of the rule was a release behind.
11858
+ *
11859
+ * `null` is a real answer and is never a live url in disguise: a consumer
11860
+ * that silently fell back to {@link url} would perform exactly the wake this
11861
+ * field exists to prevent. Only a PASSTHROUGH acquisition can offer one — a
11862
+ * transcode hands back an egress the broker is feeding itself, which has no
11863
+ * sentry counterpart.
11864
+ */
11865
+ sentryUrl: string().nullable().optional(),
11848
11866
  videoCodec: _enum(["H264", "H265"]),
11849
11867
  audioCodec: string(),
11850
11868
  resolution: object({
@@ -28995,6 +29013,114 @@ var motionTriggerCapability = {
28995
29013
  durability: "session"
28996
29014
  };
28997
29015
  /**
29016
+ * camera-grid-layout — the geometry of a COMPOSITE camera, on the camera's own
29017
+ * page.
29018
+ *
29019
+ * ## Why this is a capability and not an addon settings schema
29020
+ *
29021
+ * It was one, and it did not render. The addon declared the editor as a
29022
+ * `type: 'widget'` field inside its own `deviceSettingsSchema()`; the hub
29023
+ * returned that section correctly and `ConfigFormField` renders `type:'widget'`
29024
+ * perfectly well — and nothing ever asked camera-grid for it. The Cluster →
29025
+ * Pipeline → Device Overrides page interrogates a HAND-WRITTEN list of four
29026
+ * addons (`PIPELINE_CLUSTER_DEVICE_ADDONS`), whose own comment says an addon
29027
+ * not on it "falls off silently".
29028
+ *
29029
+ * Adding a fifth name to that list would have been the wrong fix twice over:
29030
+ * that page is per-camera DETECTION tuning, and a grid's geometry belongs
29031
+ * beside PTZ and motion zones on the camera itself — which is exactly where the
29032
+ * framework already puts a widget, when the widget is declared on a CAPABILITY.
29033
+ * `deviceConfig.ui` is the mechanism (`motion-zones`, `ptz`, `ptz-autotrack`
29034
+ * all use it): the framework emits the structural section and the widget
29035
+ * self-persists through the cap's own mutations.
29036
+ *
29037
+ * ## Why one addon may implement it
29038
+ *
29039
+ * It is a device-scoped NATIVE cap, registered by the grid camera device
29040
+ * itself. Nothing else declares a composite camera, so nothing else has a
29041
+ * layout — and the device-scoped route means the widget asks THE camera, not
29042
+ * "the camera-grid addon", which is what let the old custom-action pair be
29043
+ * reached only by a caller that already knew the addon id.
29044
+ *
29045
+ * ## The tab
29046
+ *
29047
+ * `streaming`, not a top-tab of its own. A grid's geometry IS what its stream
29048
+ * is, so the Streaming tab is where it belongs; a `grid` top-tab would need an
29049
+ * entry in `WELL_KNOWN_TAB_MAP` or the device page renders the raw id as the
29050
+ * label (measured on the robot camera, 2026-09-06 — a tab called "navigation"
29051
+ * next to "PTZ").
29052
+ */
29053
+ /** A rectangle in normalized [0,1] coordinates of whatever contains it. */
29054
+ var GridNormalizedRectSchema = object({
29055
+ x: number().min(0).max(1),
29056
+ y: number().min(0).max(1),
29057
+ width: number().gt(0).max(1),
29058
+ height: number().gt(0).max(1)
29059
+ });
29060
+ /**
29061
+ * One source camera, the part of its picture taken, and where that part lands.
29062
+ *
29063
+ * Both rectangles are NORMALIZED (D519): a source camera can change resolution
29064
+ * — a profile switch, a firmware update, a substream that comes back different
29065
+ * — and a stored PIXEL rectangle would quietly start cutting the wrong region,
29066
+ * which is the class of bug nobody files.
29067
+ */
29068
+ var GridLayoutCellSchema = object({
29069
+ deviceId: number().int().positive(),
29070
+ /** The part of the SOURCE taken, normalized against the source. */
29071
+ source: GridNormalizedRectSchema,
29072
+ /** Where it lands, normalized against the CANVAS. */
29073
+ cell: GridNormalizedRectSchema
29074
+ });
29075
+ /**
29076
+ * Which profiles this grid can actually compose, and why not.
29077
+ *
29078
+ * A grid's `high` composes its sources' `high` and its `low` their `low`, so a
29079
+ * profile is on offer only when EVERY source can serve it. The refusal NAMES
29080
+ * the sources, because "this grid has no low" is not a finding — "615 has no
29081
+ * low" is, and it is the one an operator can act on.
29082
+ */
29083
+ var GridProfileOfferSchema = object({
29084
+ profile: _enum([
29085
+ "high",
29086
+ "mid",
29087
+ "low"
29088
+ ]),
29089
+ offered: boolean(),
29090
+ /** Sources that cannot serve it. Empty when it is offered, or when there are no cells. */
29091
+ missingSources: array(number().int().positive())
29092
+ });
29093
+ var GridLayoutViewSchema = object({
29094
+ /** The persisted grid row this camera was declared from. */
29095
+ instanceId: string(),
29096
+ deviceId: number().int().nonnegative(),
29097
+ name: string(),
29098
+ /** The canvas the operator laid out — this grid's `high`. mid/low are scaled from it. */
29099
+ width: number().int(),
29100
+ height: number().int(),
29101
+ fps: number().int(),
29102
+ cells: array(GridLayoutCellSchema),
29103
+ /** What the catalog will publish, and what it refuses to. Read-only. */
29104
+ profiles: array(GridProfileOfferSchema)
29105
+ });
29106
+ var GridLayoutPatchSchema = object({
29107
+ deviceId: number().int().nonnegative(),
29108
+ name: string().min(1).max(160).optional(),
29109
+ width: number().int().min(160).max(7680).optional(),
29110
+ height: number().int().min(120).max(4320).optional(),
29111
+ fps: number().int().min(1).max(60).optional(),
29112
+ /**
29113
+ * The whole cell list at once. A per-cell patch would need an ordering the
29114
+ * editor does not have, and a half-applied layout is a picture nobody asked
29115
+ * for.
29116
+ */
29117
+ cells: array(GridLayoutCellSchema).max(16)
29118
+ });
29119
+ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), GridLayoutViewSchema.nullable(), { auth: "admin" }), method(GridLayoutPatchSchema, GridLayoutViewSchema, {
29120
+ kind: "mutation",
29121
+ auth: "admin"
29122
+ });
29123
+ /**
28998
29124
  * Motion-zones share the same MaskShape vocabulary as privacy-mask — the
28999
29125
  * on-camera motion-detection mask is a single `grid` region (a row-major
29000
29126
  * boolean cell lattice the camera's onboard VMD evaluates). Composing it as
@@ -31222,6 +31348,26 @@ var PtzHomePresetSchema = object({
31222
31348
  "none"
31223
31349
  ])
31224
31350
  });
31351
+ /**
31352
+ * The camera's own idle-return behaviour: whether it goes home by itself, and
31353
+ * after how long.
31354
+ *
31355
+ * ONE shape, not two scalars, because on the camera they are ONE fact —
31356
+ * Reolink's guard point carries `benable` and `timeout` in the same element,
31357
+ * written by the same command. Reading them apart means two round-trips that
31358
+ * can disagree.
31359
+ *
31360
+ * `enabled` and `seconds` are INDEPENDENT: a camera can hold a 68 s delay with
31361
+ * the behaviour switched off, which is exactly what the vendor app leaves when
31362
+ * you turn the guard point off without clearing it. The first version of this
31363
+ * cap reported only the delay, so that state was invisible — a camera could be
31364
+ * configured to return after 68 seconds with no way to say whether it should
31365
+ * return at all.
31366
+ */
31367
+ var PtzHomeReturnSchema = object({
31368
+ enabled: boolean(),
31369
+ seconds: number().int()
31370
+ });
31225
31371
  var ptzCapability = {
31226
31372
  name: "ptz",
31227
31373
  scope: "device",
@@ -31304,18 +31450,25 @@ var ptzCapability = {
31304
31450
  auth: "admin"
31305
31451
  }),
31306
31452
  /**
31307
- * How long the camera waits, idle, before returning home on its own --
31308
- * `null` when it has no such behaviour.
31453
+ * Whether the camera returns home on its own when left idle, and after how
31454
+ * long. `null` when it has no such behaviour at all.
31309
31455
  *
31310
31456
  * Reolink's guard point carries one (`timeout`, freely settable in
31311
31457
  * seconds). It is a real function of the camera that we did not expose at
31312
31458
  * all, and it belongs next to the home it governs rather than in a vendor
31313
31459
  * settings page nobody associates with Home.
31314
31460
  */
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({
31461
+ getHomeReturn: method(object({ deviceId: number() }), PtzHomeReturnSchema.nullable()),
31462
+ /**
31463
+ * Set both together. Refused by a camera with no idle-return behaviour.
31464
+ *
31465
+ * They travel together for the same reason they are read together: the
31466
+ * underlying write carries both, so setting one alone means reading the
31467
+ * other back first and racing whoever else is writing.
31468
+ */
31469
+ setHomeReturn: method(object({
31318
31470
  deviceId: number(),
31471
+ enabled: boolean(),
31319
31472
  seconds: number().int().min(0).max(3600)
31320
31473
  }), _void(), {
31321
31474
  kind: "mutation",
@@ -37256,6 +37409,18 @@ Object.freeze({
37256
37409
  addonId: null,
37257
37410
  access: "view"
37258
37411
  },
37412
+ "cameraGridLayout.getLayout": {
37413
+ capName: "camera-grid-layout",
37414
+ capScope: "device",
37415
+ addonId: null,
37416
+ access: "view"
37417
+ },
37418
+ "cameraGridLayout.saveLayout": {
37419
+ capName: "camera-grid-layout",
37420
+ capScope: "device",
37421
+ addonId: null,
37422
+ access: "create"
37423
+ },
37259
37424
  "cameraStreams.getBrokerStreams": {
37260
37425
  capName: "camera-streams",
37261
37426
  capScope: "device",
@@ -41006,7 +41171,7 @@ Object.freeze({
41006
41171
  addonId: null,
41007
41172
  access: "view"
41008
41173
  },
41009
- "ptz.getHomeReturnSeconds": {
41174
+ "ptz.getHomeReturn": {
41010
41175
  capName: "ptz",
41011
41176
  capScope: "device",
41012
41177
  addonId: null,
@@ -41066,7 +41231,7 @@ Object.freeze({
41066
41231
  addonId: null,
41067
41232
  access: "create"
41068
41233
  },
41069
- "ptz.setHomeReturnSeconds": {
41234
+ "ptz.setHomeReturn": {
41070
41235
  capName: "ptz",
41071
41236
  capScope: "device",
41072
41237
  addonId: null,
@@ -42955,6 +43120,21 @@ Object.freeze({
42955
43120
  form: "single",
42956
43121
  optional: false
42957
43122
  }],
43123
+ "cameraGridLayout.getLayout": [{
43124
+ name: "deviceId",
43125
+ form: "single",
43126
+ optional: false
43127
+ }],
43128
+ "cameraGridLayout.saveLayout": [{
43129
+ name: "cells",
43130
+ form: "object-array",
43131
+ optional: false,
43132
+ itemField: "deviceId"
43133
+ }, {
43134
+ name: "deviceId",
43135
+ form: "single",
43136
+ optional: false
43137
+ }],
42958
43138
  "cameraStreams.getBrokerStreams": [{
42959
43139
  name: "deviceId",
42960
43140
  form: "single",
@@ -44255,7 +44435,7 @@ Object.freeze({
44255
44435
  form: "single",
44256
44436
  optional: false
44257
44437
  }],
44258
- "ptz.getHomeReturnSeconds": [{
44438
+ "ptz.getHomeReturn": [{
44259
44439
  name: "deviceId",
44260
44440
  form: "single",
44261
44441
  optional: false
@@ -44305,7 +44485,7 @@ Object.freeze({
44305
44485
  form: "single",
44306
44486
  optional: false
44307
44487
  }],
44308
- "ptz.setHomeReturnSeconds": [{
44488
+ "ptz.setHomeReturn": [{
44309
44489
  name: "deviceId",
44310
44490
  form: "single",
44311
44491
  optional: false
@@ -47253,10 +47433,10 @@ var AmcrestCamera = class AmcrestCamera extends BaseDevice {
47253
47433
  meta: { presetId: slot }
47254
47434
  });
47255
47435
  },
47256
- getHomeReturnSeconds: async () => {
47436
+ getHomeReturn: async () => {
47257
47437
  return null;
47258
47438
  },
47259
- setHomeReturnSeconds: async () => {
47439
+ setHomeReturn: async () => {
47260
47440
  throw new Error("Amcrest: the idle-return timer is not wired on this driver");
47261
47441
  },
47262
47442
  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-Bs3xPtSh.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).
@@ -11846,6 +11846,24 @@ var GetStreamWithCodecInputSchema = object({
11846
11846
  });
11847
11847
  var RtpSourceSchema = object({
11848
11848
  url: string(),
11849
+ /**
11850
+ * The SENTRY counterpart of {@link url} — the dial that asks for the stream
11851
+ * WITHOUT asking for the camera — or `null` when this camera offers none.
11852
+ *
11853
+ * The broker answers it because the broker is the only thing that can:
11854
+ * eligibility is `sentryEligible` (a BATTERY camera that DECLARES the signals
11855
+ * cap), asked of facts only the broker holds. A consumer re-deriving it from
11856
+ * cap bindings would be a second authority, and two authorities on the same
11857
+ * question is how a composite camera ends up dialling a sleeping camera
11858
+ * because its own copy of the rule was a release behind.
11859
+ *
11860
+ * `null` is a real answer and is never a live url in disguise: a consumer
11861
+ * that silently fell back to {@link url} would perform exactly the wake this
11862
+ * field exists to prevent. Only a PASSTHROUGH acquisition can offer one — a
11863
+ * transcode hands back an egress the broker is feeding itself, which has no
11864
+ * sentry counterpart.
11865
+ */
11866
+ sentryUrl: string().nullable().optional(),
11849
11867
  videoCodec: _enum(["H264", "H265"]),
11850
11868
  audioCodec: string(),
11851
11869
  resolution: object({
@@ -28996,6 +29014,114 @@ var motionTriggerCapability = {
28996
29014
  durability: "session"
28997
29015
  };
28998
29016
  /**
29017
+ * camera-grid-layout — the geometry of a COMPOSITE camera, on the camera's own
29018
+ * page.
29019
+ *
29020
+ * ## Why this is a capability and not an addon settings schema
29021
+ *
29022
+ * It was one, and it did not render. The addon declared the editor as a
29023
+ * `type: 'widget'` field inside its own `deviceSettingsSchema()`; the hub
29024
+ * returned that section correctly and `ConfigFormField` renders `type:'widget'`
29025
+ * perfectly well — and nothing ever asked camera-grid for it. The Cluster →
29026
+ * Pipeline → Device Overrides page interrogates a HAND-WRITTEN list of four
29027
+ * addons (`PIPELINE_CLUSTER_DEVICE_ADDONS`), whose own comment says an addon
29028
+ * not on it "falls off silently".
29029
+ *
29030
+ * Adding a fifth name to that list would have been the wrong fix twice over:
29031
+ * that page is per-camera DETECTION tuning, and a grid's geometry belongs
29032
+ * beside PTZ and motion zones on the camera itself — which is exactly where the
29033
+ * framework already puts a widget, when the widget is declared on a CAPABILITY.
29034
+ * `deviceConfig.ui` is the mechanism (`motion-zones`, `ptz`, `ptz-autotrack`
29035
+ * all use it): the framework emits the structural section and the widget
29036
+ * self-persists through the cap's own mutations.
29037
+ *
29038
+ * ## Why one addon may implement it
29039
+ *
29040
+ * It is a device-scoped NATIVE cap, registered by the grid camera device
29041
+ * itself. Nothing else declares a composite camera, so nothing else has a
29042
+ * layout — and the device-scoped route means the widget asks THE camera, not
29043
+ * "the camera-grid addon", which is what let the old custom-action pair be
29044
+ * reached only by a caller that already knew the addon id.
29045
+ *
29046
+ * ## The tab
29047
+ *
29048
+ * `streaming`, not a top-tab of its own. A grid's geometry IS what its stream
29049
+ * is, so the Streaming tab is where it belongs; a `grid` top-tab would need an
29050
+ * entry in `WELL_KNOWN_TAB_MAP` or the device page renders the raw id as the
29051
+ * label (measured on the robot camera, 2026-09-06 — a tab called "navigation"
29052
+ * next to "PTZ").
29053
+ */
29054
+ /** A rectangle in normalized [0,1] coordinates of whatever contains it. */
29055
+ var GridNormalizedRectSchema = object({
29056
+ x: number().min(0).max(1),
29057
+ y: number().min(0).max(1),
29058
+ width: number().gt(0).max(1),
29059
+ height: number().gt(0).max(1)
29060
+ });
29061
+ /**
29062
+ * One source camera, the part of its picture taken, and where that part lands.
29063
+ *
29064
+ * Both rectangles are NORMALIZED (D519): a source camera can change resolution
29065
+ * — a profile switch, a firmware update, a substream that comes back different
29066
+ * — and a stored PIXEL rectangle would quietly start cutting the wrong region,
29067
+ * which is the class of bug nobody files.
29068
+ */
29069
+ var GridLayoutCellSchema = object({
29070
+ deviceId: number().int().positive(),
29071
+ /** The part of the SOURCE taken, normalized against the source. */
29072
+ source: GridNormalizedRectSchema,
29073
+ /** Where it lands, normalized against the CANVAS. */
29074
+ cell: GridNormalizedRectSchema
29075
+ });
29076
+ /**
29077
+ * Which profiles this grid can actually compose, and why not.
29078
+ *
29079
+ * A grid's `high` composes its sources' `high` and its `low` their `low`, so a
29080
+ * profile is on offer only when EVERY source can serve it. The refusal NAMES
29081
+ * the sources, because "this grid has no low" is not a finding — "615 has no
29082
+ * low" is, and it is the one an operator can act on.
29083
+ */
29084
+ var GridProfileOfferSchema = object({
29085
+ profile: _enum([
29086
+ "high",
29087
+ "mid",
29088
+ "low"
29089
+ ]),
29090
+ offered: boolean(),
29091
+ /** Sources that cannot serve it. Empty when it is offered, or when there are no cells. */
29092
+ missingSources: array(number().int().positive())
29093
+ });
29094
+ var GridLayoutViewSchema = object({
29095
+ /** The persisted grid row this camera was declared from. */
29096
+ instanceId: string(),
29097
+ deviceId: number().int().nonnegative(),
29098
+ name: string(),
29099
+ /** The canvas the operator laid out — this grid's `high`. mid/low are scaled from it. */
29100
+ width: number().int(),
29101
+ height: number().int(),
29102
+ fps: number().int(),
29103
+ cells: array(GridLayoutCellSchema),
29104
+ /** What the catalog will publish, and what it refuses to. Read-only. */
29105
+ profiles: array(GridProfileOfferSchema)
29106
+ });
29107
+ var GridLayoutPatchSchema = object({
29108
+ deviceId: number().int().nonnegative(),
29109
+ name: string().min(1).max(160).optional(),
29110
+ width: number().int().min(160).max(7680).optional(),
29111
+ height: number().int().min(120).max(4320).optional(),
29112
+ fps: number().int().min(1).max(60).optional(),
29113
+ /**
29114
+ * The whole cell list at once. A per-cell patch would need an ordering the
29115
+ * editor does not have, and a half-applied layout is a picture nobody asked
29116
+ * for.
29117
+ */
29118
+ cells: array(GridLayoutCellSchema).max(16)
29119
+ });
29120
+ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), GridLayoutViewSchema.nullable(), { auth: "admin" }), method(GridLayoutPatchSchema, GridLayoutViewSchema, {
29121
+ kind: "mutation",
29122
+ auth: "admin"
29123
+ });
29124
+ /**
28999
29125
  * Motion-zones share the same MaskShape vocabulary as privacy-mask — the
29000
29126
  * on-camera motion-detection mask is a single `grid` region (a row-major
29001
29127
  * boolean cell lattice the camera's onboard VMD evaluates). Composing it as
@@ -31223,6 +31349,26 @@ var PtzHomePresetSchema = object({
31223
31349
  "none"
31224
31350
  ])
31225
31351
  });
31352
+ /**
31353
+ * The camera's own idle-return behaviour: whether it goes home by itself, and
31354
+ * after how long.
31355
+ *
31356
+ * ONE shape, not two scalars, because on the camera they are ONE fact —
31357
+ * Reolink's guard point carries `benable` and `timeout` in the same element,
31358
+ * written by the same command. Reading them apart means two round-trips that
31359
+ * can disagree.
31360
+ *
31361
+ * `enabled` and `seconds` are INDEPENDENT: a camera can hold a 68 s delay with
31362
+ * the behaviour switched off, which is exactly what the vendor app leaves when
31363
+ * you turn the guard point off without clearing it. The first version of this
31364
+ * cap reported only the delay, so that state was invisible — a camera could be
31365
+ * configured to return after 68 seconds with no way to say whether it should
31366
+ * return at all.
31367
+ */
31368
+ var PtzHomeReturnSchema = object({
31369
+ enabled: boolean(),
31370
+ seconds: number().int()
31371
+ });
31226
31372
  var ptzCapability = {
31227
31373
  name: "ptz",
31228
31374
  scope: "device",
@@ -31305,18 +31451,25 @@ var ptzCapability = {
31305
31451
  auth: "admin"
31306
31452
  }),
31307
31453
  /**
31308
- * How long the camera waits, idle, before returning home on its own --
31309
- * `null` when it has no such behaviour.
31454
+ * Whether the camera returns home on its own when left idle, and after how
31455
+ * long. `null` when it has no such behaviour at all.
31310
31456
  *
31311
31457
  * Reolink's guard point carries one (`timeout`, freely settable in
31312
31458
  * seconds). It is a real function of the camera that we did not expose at
31313
31459
  * all, and it belongs next to the home it governs rather than in a vendor
31314
31460
  * settings page nobody associates with Home.
31315
31461
  */
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({
31462
+ getHomeReturn: method(object({ deviceId: number() }), PtzHomeReturnSchema.nullable()),
31463
+ /**
31464
+ * Set both together. Refused by a camera with no idle-return behaviour.
31465
+ *
31466
+ * They travel together for the same reason they are read together: the
31467
+ * underlying write carries both, so setting one alone means reading the
31468
+ * other back first and racing whoever else is writing.
31469
+ */
31470
+ setHomeReturn: method(object({
31319
31471
  deviceId: number(),
31472
+ enabled: boolean(),
31320
31473
  seconds: number().int().min(0).max(3600)
31321
31474
  }), _void(), {
31322
31475
  kind: "mutation",
@@ -37257,6 +37410,18 @@ Object.freeze({
37257
37410
  addonId: null,
37258
37411
  access: "view"
37259
37412
  },
37413
+ "cameraGridLayout.getLayout": {
37414
+ capName: "camera-grid-layout",
37415
+ capScope: "device",
37416
+ addonId: null,
37417
+ access: "view"
37418
+ },
37419
+ "cameraGridLayout.saveLayout": {
37420
+ capName: "camera-grid-layout",
37421
+ capScope: "device",
37422
+ addonId: null,
37423
+ access: "create"
37424
+ },
37260
37425
  "cameraStreams.getBrokerStreams": {
37261
37426
  capName: "camera-streams",
37262
37427
  capScope: "device",
@@ -41007,7 +41172,7 @@ Object.freeze({
41007
41172
  addonId: null,
41008
41173
  access: "view"
41009
41174
  },
41010
- "ptz.getHomeReturnSeconds": {
41175
+ "ptz.getHomeReturn": {
41011
41176
  capName: "ptz",
41012
41177
  capScope: "device",
41013
41178
  addonId: null,
@@ -41067,7 +41232,7 @@ Object.freeze({
41067
41232
  addonId: null,
41068
41233
  access: "create"
41069
41234
  },
41070
- "ptz.setHomeReturnSeconds": {
41235
+ "ptz.setHomeReturn": {
41071
41236
  capName: "ptz",
41072
41237
  capScope: "device",
41073
41238
  addonId: null,
@@ -42956,6 +43121,21 @@ Object.freeze({
42956
43121
  form: "single",
42957
43122
  optional: false
42958
43123
  }],
43124
+ "cameraGridLayout.getLayout": [{
43125
+ name: "deviceId",
43126
+ form: "single",
43127
+ optional: false
43128
+ }],
43129
+ "cameraGridLayout.saveLayout": [{
43130
+ name: "cells",
43131
+ form: "object-array",
43132
+ optional: false,
43133
+ itemField: "deviceId"
43134
+ }, {
43135
+ name: "deviceId",
43136
+ form: "single",
43137
+ optional: false
43138
+ }],
42959
43139
  "cameraStreams.getBrokerStreams": [{
42960
43140
  name: "deviceId",
42961
43141
  form: "single",
@@ -44256,7 +44436,7 @@ Object.freeze({
44256
44436
  form: "single",
44257
44437
  optional: false
44258
44438
  }],
44259
- "ptz.getHomeReturnSeconds": [{
44439
+ "ptz.getHomeReturn": [{
44260
44440
  name: "deviceId",
44261
44441
  form: "single",
44262
44442
  optional: false
@@ -44306,7 +44486,7 @@ Object.freeze({
44306
44486
  form: "single",
44307
44487
  optional: false
44308
44488
  }],
44309
- "ptz.setHomeReturnSeconds": [{
44489
+ "ptz.setHomeReturn": [{
44310
44490
  name: "deviceId",
44311
44491
  form: "single",
44312
44492
  optional: false
@@ -47254,10 +47434,10 @@ var AmcrestCamera = class AmcrestCamera extends BaseDevice {
47254
47434
  meta: { presetId: slot }
47255
47435
  });
47256
47436
  },
47257
- getHomeReturnSeconds: async () => {
47437
+ getHomeReturn: async () => {
47258
47438
  return null;
47259
47439
  },
47260
- setHomeReturnSeconds: async () => {
47440
+ setHomeReturn: async () => {
47261
47441
  throw new Error("Amcrest: the idle-return timer is not wired on this driver");
47262
47442
  },
47263
47443
  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.116",
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",