@camstack/addon-provider-homeassistant 1.2.135 → 1.2.137
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 +1 -1
- package/dist/addon.mjs +1 -1
- package/dist/{dist-CBess7Ok.js → dist-DO2Nwww0.js} +180 -6
- package/dist/{dist-Byg3We_8.mjs → dist-ndOM_A1y.mjs} +180 -6
- package/dist/ha-export/ha-export.addon.js +1 -1
- package/dist/ha-export/ha-export.addon.mjs +1 -1
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_dist = require("./dist-
|
|
2
|
+
const require_dist = require("./dist-DO2Nwww0.js");
|
|
3
3
|
let node_crypto = require("node:crypto");
|
|
4
4
|
let node_zlib = require("node:zlib");
|
|
5
5
|
//#region src/ha-device-source.ts
|
package/dist/addon.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as presenceCapability, A as controlCapability, At as EventCategory, B as humiditySensorCapability, C as buildAddonRouteProvider, Ct as number, D as colorCapability, Dt as union, E as climateControlCapability, Et as string, F as eventEmitterCapability, G as motionCapability, H as lawnMowerControlCapability, I as fanControlCapability, J as notifierCapability, K as normalizeUnit, L as floodCapability, M as deviceAdoptionCapability, O as connectivityCapability, Ot as unknown, P as enumSensorCapability, Q as prepareNotification, R as gasCapability, S as brokerCapability, St as literal, T as carbonMonoxideCapability, Tt as record, U as lockControlCapability, V as imageCapability, W as mediaPlayerCapability, Y as numericSensorCapability, Z as powerMeterCapability, _ as automationControlCapability, _t as createEvent, at as temperatureSensorCapability, b as binaryCapability, bt as array, ct as valveCapability, d as TargetSchema, dt as weatherCapability, et as pressureSensorCapability, f as accessoriesCapability, ft as errMsg, g as ambientLightSensorCapability, gt as DeviceType, h as alarmPanelCapability, ht as DeviceRole, it as tamperCapability, j as coverCapability, k as contactCapability, kt as url, lt as vibrationCapability, m as airQualitySensorCapability, mt as DeviceFeature, n as BaseDevice, nt as smokeCapability, ot as updateCapability, p as addonRoutesCapability, q as notificationOutputCapability, r as BaseDeviceProvider, rt as switchCapability, s as EnumSensorDateTimeFormatSchema, st as vacuumControlCapability, tt as scriptRunnerCapability, ut as waterHeaterCapability, v as batteryCapability, w as buttonCapability, wt as object, x as brightnessCapability, xt as discriminatedUnion, y as bestLocationMatch, yt as _enum, z as humidifierCapability } from "./dist-
|
|
1
|
+
import { $ as presenceCapability, A as controlCapability, At as EventCategory, B as humiditySensorCapability, C as buildAddonRouteProvider, Ct as number, D as colorCapability, Dt as union, E as climateControlCapability, Et as string, F as eventEmitterCapability, G as motionCapability, H as lawnMowerControlCapability, I as fanControlCapability, J as notifierCapability, K as normalizeUnit, L as floodCapability, M as deviceAdoptionCapability, O as connectivityCapability, Ot as unknown, P as enumSensorCapability, Q as prepareNotification, R as gasCapability, S as brokerCapability, St as literal, T as carbonMonoxideCapability, Tt as record, U as lockControlCapability, V as imageCapability, W as mediaPlayerCapability, Y as numericSensorCapability, Z as powerMeterCapability, _ as automationControlCapability, _t as createEvent, at as temperatureSensorCapability, b as binaryCapability, bt as array, ct as valveCapability, d as TargetSchema, dt as weatherCapability, et as pressureSensorCapability, f as accessoriesCapability, ft as errMsg, g as ambientLightSensorCapability, gt as DeviceType, h as alarmPanelCapability, ht as DeviceRole, it as tamperCapability, j as coverCapability, k as contactCapability, kt as url, lt as vibrationCapability, m as airQualitySensorCapability, mt as DeviceFeature, n as BaseDevice, nt as smokeCapability, ot as updateCapability, p as addonRoutesCapability, q as notificationOutputCapability, r as BaseDeviceProvider, rt as switchCapability, s as EnumSensorDateTimeFormatSchema, st as vacuumControlCapability, tt as scriptRunnerCapability, ut as waterHeaterCapability, v as batteryCapability, w as buttonCapability, wt as object, x as brightnessCapability, xt as discriminatedUnion, y as bestLocationMatch, yt as _enum, z as humidifierCapability } from "./dist-ndOM_A1y.mjs";
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
import { brotliCompressSync, deflateSync, gzipSync } from "node:zlib";
|
|
4
4
|
//#region src/ha-device-source.ts
|
|
@@ -5359,7 +5359,7 @@ var ZodIssueCode = {
|
|
|
5359
5359
|
var ZodFirstPartyTypeKind;
|
|
5360
5360
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5361
5361
|
//#endregion
|
|
5362
|
-
//#region ../types/dist/sleep-
|
|
5362
|
+
//#region ../types/dist/sleep-Bs3xPtSh.mjs
|
|
5363
5363
|
/**
|
|
5364
5364
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5365
5365
|
* window to float samples (D455).
|
|
@@ -12119,6 +12119,24 @@ var GetStreamWithCodecInputSchema = object({
|
|
|
12119
12119
|
});
|
|
12120
12120
|
var RtpSourceSchema = object({
|
|
12121
12121
|
url: string(),
|
|
12122
|
+
/**
|
|
12123
|
+
* The SENTRY counterpart of {@link url} — the dial that asks for the stream
|
|
12124
|
+
* WITHOUT asking for the camera — or `null` when this camera offers none.
|
|
12125
|
+
*
|
|
12126
|
+
* The broker answers it because the broker is the only thing that can:
|
|
12127
|
+
* eligibility is `sentryEligible` (a BATTERY camera that DECLARES the signals
|
|
12128
|
+
* cap), asked of facts only the broker holds. A consumer re-deriving it from
|
|
12129
|
+
* cap bindings would be a second authority, and two authorities on the same
|
|
12130
|
+
* question is how a composite camera ends up dialling a sleeping camera
|
|
12131
|
+
* because its own copy of the rule was a release behind.
|
|
12132
|
+
*
|
|
12133
|
+
* `null` is a real answer and is never a live url in disguise: a consumer
|
|
12134
|
+
* that silently fell back to {@link url} would perform exactly the wake this
|
|
12135
|
+
* field exists to prevent. Only a PASSTHROUGH acquisition can offer one — a
|
|
12136
|
+
* transcode hands back an egress the broker is feeding itself, which has no
|
|
12137
|
+
* sentry counterpart.
|
|
12138
|
+
*/
|
|
12139
|
+
sentryUrl: string().nullable().optional(),
|
|
12122
12140
|
videoCodec: _enum(["H264", "H265"]),
|
|
12123
12141
|
audioCodec: string(),
|
|
12124
12142
|
resolution: object({
|
|
@@ -29346,6 +29364,114 @@ var motionTriggerCapability = {
|
|
|
29346
29364
|
durability: "session"
|
|
29347
29365
|
};
|
|
29348
29366
|
/**
|
|
29367
|
+
* camera-grid-layout — the geometry of a COMPOSITE camera, on the camera's own
|
|
29368
|
+
* page.
|
|
29369
|
+
*
|
|
29370
|
+
* ## Why this is a capability and not an addon settings schema
|
|
29371
|
+
*
|
|
29372
|
+
* It was one, and it did not render. The addon declared the editor as a
|
|
29373
|
+
* `type: 'widget'` field inside its own `deviceSettingsSchema()`; the hub
|
|
29374
|
+
* returned that section correctly and `ConfigFormField` renders `type:'widget'`
|
|
29375
|
+
* perfectly well — and nothing ever asked camera-grid for it. The Cluster →
|
|
29376
|
+
* Pipeline → Device Overrides page interrogates a HAND-WRITTEN list of four
|
|
29377
|
+
* addons (`PIPELINE_CLUSTER_DEVICE_ADDONS`), whose own comment says an addon
|
|
29378
|
+
* not on it "falls off silently".
|
|
29379
|
+
*
|
|
29380
|
+
* Adding a fifth name to that list would have been the wrong fix twice over:
|
|
29381
|
+
* that page is per-camera DETECTION tuning, and a grid's geometry belongs
|
|
29382
|
+
* beside PTZ and motion zones on the camera itself — which is exactly where the
|
|
29383
|
+
* framework already puts a widget, when the widget is declared on a CAPABILITY.
|
|
29384
|
+
* `deviceConfig.ui` is the mechanism (`motion-zones`, `ptz`, `ptz-autotrack`
|
|
29385
|
+
* all use it): the framework emits the structural section and the widget
|
|
29386
|
+
* self-persists through the cap's own mutations.
|
|
29387
|
+
*
|
|
29388
|
+
* ## Why one addon may implement it
|
|
29389
|
+
*
|
|
29390
|
+
* It is a device-scoped NATIVE cap, registered by the grid camera device
|
|
29391
|
+
* itself. Nothing else declares a composite camera, so nothing else has a
|
|
29392
|
+
* layout — and the device-scoped route means the widget asks THE camera, not
|
|
29393
|
+
* "the camera-grid addon", which is what let the old custom-action pair be
|
|
29394
|
+
* reached only by a caller that already knew the addon id.
|
|
29395
|
+
*
|
|
29396
|
+
* ## The tab
|
|
29397
|
+
*
|
|
29398
|
+
* `streaming`, not a top-tab of its own. A grid's geometry IS what its stream
|
|
29399
|
+
* is, so the Streaming tab is where it belongs; a `grid` top-tab would need an
|
|
29400
|
+
* entry in `WELL_KNOWN_TAB_MAP` or the device page renders the raw id as the
|
|
29401
|
+
* label (measured on the robot camera, 2026-09-06 — a tab called "navigation"
|
|
29402
|
+
* next to "PTZ").
|
|
29403
|
+
*/
|
|
29404
|
+
/** A rectangle in normalized [0,1] coordinates of whatever contains it. */
|
|
29405
|
+
var GridNormalizedRectSchema = object({
|
|
29406
|
+
x: number().min(0).max(1),
|
|
29407
|
+
y: number().min(0).max(1),
|
|
29408
|
+
width: number().gt(0).max(1),
|
|
29409
|
+
height: number().gt(0).max(1)
|
|
29410
|
+
});
|
|
29411
|
+
/**
|
|
29412
|
+
* One source camera, the part of its picture taken, and where that part lands.
|
|
29413
|
+
*
|
|
29414
|
+
* Both rectangles are NORMALIZED (D519): a source camera can change resolution
|
|
29415
|
+
* — a profile switch, a firmware update, a substream that comes back different
|
|
29416
|
+
* — and a stored PIXEL rectangle would quietly start cutting the wrong region,
|
|
29417
|
+
* which is the class of bug nobody files.
|
|
29418
|
+
*/
|
|
29419
|
+
var GridLayoutCellSchema = object({
|
|
29420
|
+
deviceId: number().int().positive(),
|
|
29421
|
+
/** The part of the SOURCE taken, normalized against the source. */
|
|
29422
|
+
source: GridNormalizedRectSchema,
|
|
29423
|
+
/** Where it lands, normalized against the CANVAS. */
|
|
29424
|
+
cell: GridNormalizedRectSchema
|
|
29425
|
+
});
|
|
29426
|
+
/**
|
|
29427
|
+
* Which profiles this grid can actually compose, and why not.
|
|
29428
|
+
*
|
|
29429
|
+
* A grid's `high` composes its sources' `high` and its `low` their `low`, so a
|
|
29430
|
+
* profile is on offer only when EVERY source can serve it. The refusal NAMES
|
|
29431
|
+
* the sources, because "this grid has no low" is not a finding — "615 has no
|
|
29432
|
+
* low" is, and it is the one an operator can act on.
|
|
29433
|
+
*/
|
|
29434
|
+
var GridProfileOfferSchema = object({
|
|
29435
|
+
profile: _enum([
|
|
29436
|
+
"high",
|
|
29437
|
+
"mid",
|
|
29438
|
+
"low"
|
|
29439
|
+
]),
|
|
29440
|
+
offered: boolean(),
|
|
29441
|
+
/** Sources that cannot serve it. Empty when it is offered, or when there are no cells. */
|
|
29442
|
+
missingSources: array(number().int().positive())
|
|
29443
|
+
});
|
|
29444
|
+
var GridLayoutViewSchema = object({
|
|
29445
|
+
/** The persisted grid row this camera was declared from. */
|
|
29446
|
+
instanceId: string(),
|
|
29447
|
+
deviceId: number().int().nonnegative(),
|
|
29448
|
+
name: string(),
|
|
29449
|
+
/** The canvas the operator laid out — this grid's `high`. mid/low are scaled from it. */
|
|
29450
|
+
width: number().int(),
|
|
29451
|
+
height: number().int(),
|
|
29452
|
+
fps: number().int(),
|
|
29453
|
+
cells: array(GridLayoutCellSchema),
|
|
29454
|
+
/** What the catalog will publish, and what it refuses to. Read-only. */
|
|
29455
|
+
profiles: array(GridProfileOfferSchema)
|
|
29456
|
+
});
|
|
29457
|
+
var GridLayoutPatchSchema = object({
|
|
29458
|
+
deviceId: number().int().nonnegative(),
|
|
29459
|
+
name: string().min(1).max(160).optional(),
|
|
29460
|
+
width: number().int().min(160).max(7680).optional(),
|
|
29461
|
+
height: number().int().min(120).max(4320).optional(),
|
|
29462
|
+
fps: number().int().min(1).max(60).optional(),
|
|
29463
|
+
/**
|
|
29464
|
+
* The whole cell list at once. A per-cell patch would need an ordering the
|
|
29465
|
+
* editor does not have, and a half-applied layout is a picture nobody asked
|
|
29466
|
+
* for.
|
|
29467
|
+
*/
|
|
29468
|
+
cells: array(GridLayoutCellSchema).max(16)
|
|
29469
|
+
});
|
|
29470
|
+
DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), GridLayoutViewSchema.nullable(), { auth: "admin" }), method(GridLayoutPatchSchema, GridLayoutViewSchema, {
|
|
29471
|
+
kind: "mutation",
|
|
29472
|
+
auth: "admin"
|
|
29473
|
+
});
|
|
29474
|
+
/**
|
|
29349
29475
|
* Motion-zones share the same MaskShape vocabulary as privacy-mask — the
|
|
29350
29476
|
* on-camera motion-detection mask is a single `grid` region (a row-major
|
|
29351
29477
|
* boolean cell lattice the camera's onboard VMD evaluates). Composing it as
|
|
@@ -31504,6 +31630,26 @@ var PtzHomePresetSchema = object({
|
|
|
31504
31630
|
"none"
|
|
31505
31631
|
])
|
|
31506
31632
|
});
|
|
31633
|
+
/**
|
|
31634
|
+
* The camera's own idle-return behaviour: whether it goes home by itself, and
|
|
31635
|
+
* after how long.
|
|
31636
|
+
*
|
|
31637
|
+
* ONE shape, not two scalars, because on the camera they are ONE fact —
|
|
31638
|
+
* Reolink's guard point carries `benable` and `timeout` in the same element,
|
|
31639
|
+
* written by the same command. Reading them apart means two round-trips that
|
|
31640
|
+
* can disagree.
|
|
31641
|
+
*
|
|
31642
|
+
* `enabled` and `seconds` are INDEPENDENT: a camera can hold a 68 s delay with
|
|
31643
|
+
* the behaviour switched off, which is exactly what the vendor app leaves when
|
|
31644
|
+
* you turn the guard point off without clearing it. The first version of this
|
|
31645
|
+
* cap reported only the delay, so that state was invisible — a camera could be
|
|
31646
|
+
* configured to return after 68 seconds with no way to say whether it should
|
|
31647
|
+
* return at all.
|
|
31648
|
+
*/
|
|
31649
|
+
var PtzHomeReturnSchema = object({
|
|
31650
|
+
enabled: boolean(),
|
|
31651
|
+
seconds: number().int()
|
|
31652
|
+
});
|
|
31507
31653
|
DeviceType.Camera, method(PtzMoveCommandSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }), method(PtzMoveCommandSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), array(PtzPresetSchema)), method(object({
|
|
31508
31654
|
deviceId: number(),
|
|
31509
31655
|
presetId: string()
|
|
@@ -31529,8 +31675,9 @@ DeviceType.Camera, method(PtzMoveCommandSchema.extend({ deviceId: number() }), _
|
|
|
31529
31675
|
}), method(object({ deviceId: number() }), _void(), {
|
|
31530
31676
|
kind: "mutation",
|
|
31531
31677
|
auth: "admin"
|
|
31532
|
-
}), method(object({ deviceId: number() }),
|
|
31678
|
+
}), method(object({ deviceId: number() }), PtzHomeReturnSchema.nullable()), method(object({
|
|
31533
31679
|
deviceId: number(),
|
|
31680
|
+
enabled: boolean(),
|
|
31534
31681
|
seconds: number().int().min(0).max(3600)
|
|
31535
31682
|
}), _void(), {
|
|
31536
31683
|
kind: "mutation",
|
|
@@ -37051,6 +37198,18 @@ Object.freeze({
|
|
|
37051
37198
|
addonId: null,
|
|
37052
37199
|
access: "view"
|
|
37053
37200
|
},
|
|
37201
|
+
"cameraGridLayout.getLayout": {
|
|
37202
|
+
capName: "camera-grid-layout",
|
|
37203
|
+
capScope: "device",
|
|
37204
|
+
addonId: null,
|
|
37205
|
+
access: "view"
|
|
37206
|
+
},
|
|
37207
|
+
"cameraGridLayout.saveLayout": {
|
|
37208
|
+
capName: "camera-grid-layout",
|
|
37209
|
+
capScope: "device",
|
|
37210
|
+
addonId: null,
|
|
37211
|
+
access: "create"
|
|
37212
|
+
},
|
|
37054
37213
|
"cameraStreams.getBrokerStreams": {
|
|
37055
37214
|
capName: "camera-streams",
|
|
37056
37215
|
capScope: "device",
|
|
@@ -40801,7 +40960,7 @@ Object.freeze({
|
|
|
40801
40960
|
addonId: null,
|
|
40802
40961
|
access: "view"
|
|
40803
40962
|
},
|
|
40804
|
-
"ptz.
|
|
40963
|
+
"ptz.getHomeReturn": {
|
|
40805
40964
|
capName: "ptz",
|
|
40806
40965
|
capScope: "device",
|
|
40807
40966
|
addonId: null,
|
|
@@ -40861,7 +41020,7 @@ Object.freeze({
|
|
|
40861
41020
|
addonId: null,
|
|
40862
41021
|
access: "create"
|
|
40863
41022
|
},
|
|
40864
|
-
"ptz.
|
|
41023
|
+
"ptz.setHomeReturn": {
|
|
40865
41024
|
capName: "ptz",
|
|
40866
41025
|
capScope: "device",
|
|
40867
41026
|
addonId: null,
|
|
@@ -42750,6 +42909,21 @@ Object.freeze({
|
|
|
42750
42909
|
form: "single",
|
|
42751
42910
|
optional: false
|
|
42752
42911
|
}],
|
|
42912
|
+
"cameraGridLayout.getLayout": [{
|
|
42913
|
+
name: "deviceId",
|
|
42914
|
+
form: "single",
|
|
42915
|
+
optional: false
|
|
42916
|
+
}],
|
|
42917
|
+
"cameraGridLayout.saveLayout": [{
|
|
42918
|
+
name: "cells",
|
|
42919
|
+
form: "object-array",
|
|
42920
|
+
optional: false,
|
|
42921
|
+
itemField: "deviceId"
|
|
42922
|
+
}, {
|
|
42923
|
+
name: "deviceId",
|
|
42924
|
+
form: "single",
|
|
42925
|
+
optional: false
|
|
42926
|
+
}],
|
|
42753
42927
|
"cameraStreams.getBrokerStreams": [{
|
|
42754
42928
|
name: "deviceId",
|
|
42755
42929
|
form: "single",
|
|
@@ -44050,7 +44224,7 @@ Object.freeze({
|
|
|
44050
44224
|
form: "single",
|
|
44051
44225
|
optional: false
|
|
44052
44226
|
}],
|
|
44053
|
-
"ptz.
|
|
44227
|
+
"ptz.getHomeReturn": [{
|
|
44054
44228
|
name: "deviceId",
|
|
44055
44229
|
form: "single",
|
|
44056
44230
|
optional: false
|
|
@@ -44100,7 +44274,7 @@ Object.freeze({
|
|
|
44100
44274
|
form: "single",
|
|
44101
44275
|
optional: false
|
|
44102
44276
|
}],
|
|
44103
|
-
"ptz.
|
|
44277
|
+
"ptz.setHomeReturn": [{
|
|
44104
44278
|
name: "deviceId",
|
|
44105
44279
|
form: "single",
|
|
44106
44280
|
optional: false
|
|
@@ -5359,7 +5359,7 @@ var ZodIssueCode = {
|
|
|
5359
5359
|
var ZodFirstPartyTypeKind;
|
|
5360
5360
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5361
5361
|
//#endregion
|
|
5362
|
-
//#region ../types/dist/sleep-
|
|
5362
|
+
//#region ../types/dist/sleep-Bs3xPtSh.mjs
|
|
5363
5363
|
/**
|
|
5364
5364
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5365
5365
|
* window to float samples (D455).
|
|
@@ -12119,6 +12119,24 @@ var GetStreamWithCodecInputSchema = object({
|
|
|
12119
12119
|
});
|
|
12120
12120
|
var RtpSourceSchema = object({
|
|
12121
12121
|
url: string(),
|
|
12122
|
+
/**
|
|
12123
|
+
* The SENTRY counterpart of {@link url} — the dial that asks for the stream
|
|
12124
|
+
* WITHOUT asking for the camera — or `null` when this camera offers none.
|
|
12125
|
+
*
|
|
12126
|
+
* The broker answers it because the broker is the only thing that can:
|
|
12127
|
+
* eligibility is `sentryEligible` (a BATTERY camera that DECLARES the signals
|
|
12128
|
+
* cap), asked of facts only the broker holds. A consumer re-deriving it from
|
|
12129
|
+
* cap bindings would be a second authority, and two authorities on the same
|
|
12130
|
+
* question is how a composite camera ends up dialling a sleeping camera
|
|
12131
|
+
* because its own copy of the rule was a release behind.
|
|
12132
|
+
*
|
|
12133
|
+
* `null` is a real answer and is never a live url in disguise: a consumer
|
|
12134
|
+
* that silently fell back to {@link url} would perform exactly the wake this
|
|
12135
|
+
* field exists to prevent. Only a PASSTHROUGH acquisition can offer one — a
|
|
12136
|
+
* transcode hands back an egress the broker is feeding itself, which has no
|
|
12137
|
+
* sentry counterpart.
|
|
12138
|
+
*/
|
|
12139
|
+
sentryUrl: string().nullable().optional(),
|
|
12122
12140
|
videoCodec: _enum(["H264", "H265"]),
|
|
12123
12141
|
audioCodec: string(),
|
|
12124
12142
|
resolution: object({
|
|
@@ -29346,6 +29364,114 @@ var motionTriggerCapability = {
|
|
|
29346
29364
|
durability: "session"
|
|
29347
29365
|
};
|
|
29348
29366
|
/**
|
|
29367
|
+
* camera-grid-layout — the geometry of a COMPOSITE camera, on the camera's own
|
|
29368
|
+
* page.
|
|
29369
|
+
*
|
|
29370
|
+
* ## Why this is a capability and not an addon settings schema
|
|
29371
|
+
*
|
|
29372
|
+
* It was one, and it did not render. The addon declared the editor as a
|
|
29373
|
+
* `type: 'widget'` field inside its own `deviceSettingsSchema()`; the hub
|
|
29374
|
+
* returned that section correctly and `ConfigFormField` renders `type:'widget'`
|
|
29375
|
+
* perfectly well — and nothing ever asked camera-grid for it. The Cluster →
|
|
29376
|
+
* Pipeline → Device Overrides page interrogates a HAND-WRITTEN list of four
|
|
29377
|
+
* addons (`PIPELINE_CLUSTER_DEVICE_ADDONS`), whose own comment says an addon
|
|
29378
|
+
* not on it "falls off silently".
|
|
29379
|
+
*
|
|
29380
|
+
* Adding a fifth name to that list would have been the wrong fix twice over:
|
|
29381
|
+
* that page is per-camera DETECTION tuning, and a grid's geometry belongs
|
|
29382
|
+
* beside PTZ and motion zones on the camera itself — which is exactly where the
|
|
29383
|
+
* framework already puts a widget, when the widget is declared on a CAPABILITY.
|
|
29384
|
+
* `deviceConfig.ui` is the mechanism (`motion-zones`, `ptz`, `ptz-autotrack`
|
|
29385
|
+
* all use it): the framework emits the structural section and the widget
|
|
29386
|
+
* self-persists through the cap's own mutations.
|
|
29387
|
+
*
|
|
29388
|
+
* ## Why one addon may implement it
|
|
29389
|
+
*
|
|
29390
|
+
* It is a device-scoped NATIVE cap, registered by the grid camera device
|
|
29391
|
+
* itself. Nothing else declares a composite camera, so nothing else has a
|
|
29392
|
+
* layout — and the device-scoped route means the widget asks THE camera, not
|
|
29393
|
+
* "the camera-grid addon", which is what let the old custom-action pair be
|
|
29394
|
+
* reached only by a caller that already knew the addon id.
|
|
29395
|
+
*
|
|
29396
|
+
* ## The tab
|
|
29397
|
+
*
|
|
29398
|
+
* `streaming`, not a top-tab of its own. A grid's geometry IS what its stream
|
|
29399
|
+
* is, so the Streaming tab is where it belongs; a `grid` top-tab would need an
|
|
29400
|
+
* entry in `WELL_KNOWN_TAB_MAP` or the device page renders the raw id as the
|
|
29401
|
+
* label (measured on the robot camera, 2026-09-06 — a tab called "navigation"
|
|
29402
|
+
* next to "PTZ").
|
|
29403
|
+
*/
|
|
29404
|
+
/** A rectangle in normalized [0,1] coordinates of whatever contains it. */
|
|
29405
|
+
var GridNormalizedRectSchema = object({
|
|
29406
|
+
x: number().min(0).max(1),
|
|
29407
|
+
y: number().min(0).max(1),
|
|
29408
|
+
width: number().gt(0).max(1),
|
|
29409
|
+
height: number().gt(0).max(1)
|
|
29410
|
+
});
|
|
29411
|
+
/**
|
|
29412
|
+
* One source camera, the part of its picture taken, and where that part lands.
|
|
29413
|
+
*
|
|
29414
|
+
* Both rectangles are NORMALIZED (D519): a source camera can change resolution
|
|
29415
|
+
* — a profile switch, a firmware update, a substream that comes back different
|
|
29416
|
+
* — and a stored PIXEL rectangle would quietly start cutting the wrong region,
|
|
29417
|
+
* which is the class of bug nobody files.
|
|
29418
|
+
*/
|
|
29419
|
+
var GridLayoutCellSchema = object({
|
|
29420
|
+
deviceId: number().int().positive(),
|
|
29421
|
+
/** The part of the SOURCE taken, normalized against the source. */
|
|
29422
|
+
source: GridNormalizedRectSchema,
|
|
29423
|
+
/** Where it lands, normalized against the CANVAS. */
|
|
29424
|
+
cell: GridNormalizedRectSchema
|
|
29425
|
+
});
|
|
29426
|
+
/**
|
|
29427
|
+
* Which profiles this grid can actually compose, and why not.
|
|
29428
|
+
*
|
|
29429
|
+
* A grid's `high` composes its sources' `high` and its `low` their `low`, so a
|
|
29430
|
+
* profile is on offer only when EVERY source can serve it. The refusal NAMES
|
|
29431
|
+
* the sources, because "this grid has no low" is not a finding — "615 has no
|
|
29432
|
+
* low" is, and it is the one an operator can act on.
|
|
29433
|
+
*/
|
|
29434
|
+
var GridProfileOfferSchema = object({
|
|
29435
|
+
profile: _enum([
|
|
29436
|
+
"high",
|
|
29437
|
+
"mid",
|
|
29438
|
+
"low"
|
|
29439
|
+
]),
|
|
29440
|
+
offered: boolean(),
|
|
29441
|
+
/** Sources that cannot serve it. Empty when it is offered, or when there are no cells. */
|
|
29442
|
+
missingSources: array(number().int().positive())
|
|
29443
|
+
});
|
|
29444
|
+
var GridLayoutViewSchema = object({
|
|
29445
|
+
/** The persisted grid row this camera was declared from. */
|
|
29446
|
+
instanceId: string(),
|
|
29447
|
+
deviceId: number().int().nonnegative(),
|
|
29448
|
+
name: string(),
|
|
29449
|
+
/** The canvas the operator laid out — this grid's `high`. mid/low are scaled from it. */
|
|
29450
|
+
width: number().int(),
|
|
29451
|
+
height: number().int(),
|
|
29452
|
+
fps: number().int(),
|
|
29453
|
+
cells: array(GridLayoutCellSchema),
|
|
29454
|
+
/** What the catalog will publish, and what it refuses to. Read-only. */
|
|
29455
|
+
profiles: array(GridProfileOfferSchema)
|
|
29456
|
+
});
|
|
29457
|
+
var GridLayoutPatchSchema = object({
|
|
29458
|
+
deviceId: number().int().nonnegative(),
|
|
29459
|
+
name: string().min(1).max(160).optional(),
|
|
29460
|
+
width: number().int().min(160).max(7680).optional(),
|
|
29461
|
+
height: number().int().min(120).max(4320).optional(),
|
|
29462
|
+
fps: number().int().min(1).max(60).optional(),
|
|
29463
|
+
/**
|
|
29464
|
+
* The whole cell list at once. A per-cell patch would need an ordering the
|
|
29465
|
+
* editor does not have, and a half-applied layout is a picture nobody asked
|
|
29466
|
+
* for.
|
|
29467
|
+
*/
|
|
29468
|
+
cells: array(GridLayoutCellSchema).max(16)
|
|
29469
|
+
});
|
|
29470
|
+
DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), GridLayoutViewSchema.nullable(), { auth: "admin" }), method(GridLayoutPatchSchema, GridLayoutViewSchema, {
|
|
29471
|
+
kind: "mutation",
|
|
29472
|
+
auth: "admin"
|
|
29473
|
+
});
|
|
29474
|
+
/**
|
|
29349
29475
|
* Motion-zones share the same MaskShape vocabulary as privacy-mask — the
|
|
29350
29476
|
* on-camera motion-detection mask is a single `grid` region (a row-major
|
|
29351
29477
|
* boolean cell lattice the camera's onboard VMD evaluates). Composing it as
|
|
@@ -31504,6 +31630,26 @@ var PtzHomePresetSchema = object({
|
|
|
31504
31630
|
"none"
|
|
31505
31631
|
])
|
|
31506
31632
|
});
|
|
31633
|
+
/**
|
|
31634
|
+
* The camera's own idle-return behaviour: whether it goes home by itself, and
|
|
31635
|
+
* after how long.
|
|
31636
|
+
*
|
|
31637
|
+
* ONE shape, not two scalars, because on the camera they are ONE fact —
|
|
31638
|
+
* Reolink's guard point carries `benable` and `timeout` in the same element,
|
|
31639
|
+
* written by the same command. Reading them apart means two round-trips that
|
|
31640
|
+
* can disagree.
|
|
31641
|
+
*
|
|
31642
|
+
* `enabled` and `seconds` are INDEPENDENT: a camera can hold a 68 s delay with
|
|
31643
|
+
* the behaviour switched off, which is exactly what the vendor app leaves when
|
|
31644
|
+
* you turn the guard point off without clearing it. The first version of this
|
|
31645
|
+
* cap reported only the delay, so that state was invisible — a camera could be
|
|
31646
|
+
* configured to return after 68 seconds with no way to say whether it should
|
|
31647
|
+
* return at all.
|
|
31648
|
+
*/
|
|
31649
|
+
var PtzHomeReturnSchema = object({
|
|
31650
|
+
enabled: boolean(),
|
|
31651
|
+
seconds: number().int()
|
|
31652
|
+
});
|
|
31507
31653
|
DeviceType.Camera, method(PtzMoveCommandSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }), method(PtzMoveCommandSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), array(PtzPresetSchema)), method(object({
|
|
31508
31654
|
deviceId: number(),
|
|
31509
31655
|
presetId: string()
|
|
@@ -31529,8 +31675,9 @@ DeviceType.Camera, method(PtzMoveCommandSchema.extend({ deviceId: number() }), _
|
|
|
31529
31675
|
}), method(object({ deviceId: number() }), _void(), {
|
|
31530
31676
|
kind: "mutation",
|
|
31531
31677
|
auth: "admin"
|
|
31532
|
-
}), method(object({ deviceId: number() }),
|
|
31678
|
+
}), method(object({ deviceId: number() }), PtzHomeReturnSchema.nullable()), method(object({
|
|
31533
31679
|
deviceId: number(),
|
|
31680
|
+
enabled: boolean(),
|
|
31534
31681
|
seconds: number().int().min(0).max(3600)
|
|
31535
31682
|
}), _void(), {
|
|
31536
31683
|
kind: "mutation",
|
|
@@ -37051,6 +37198,18 @@ Object.freeze({
|
|
|
37051
37198
|
addonId: null,
|
|
37052
37199
|
access: "view"
|
|
37053
37200
|
},
|
|
37201
|
+
"cameraGridLayout.getLayout": {
|
|
37202
|
+
capName: "camera-grid-layout",
|
|
37203
|
+
capScope: "device",
|
|
37204
|
+
addonId: null,
|
|
37205
|
+
access: "view"
|
|
37206
|
+
},
|
|
37207
|
+
"cameraGridLayout.saveLayout": {
|
|
37208
|
+
capName: "camera-grid-layout",
|
|
37209
|
+
capScope: "device",
|
|
37210
|
+
addonId: null,
|
|
37211
|
+
access: "create"
|
|
37212
|
+
},
|
|
37054
37213
|
"cameraStreams.getBrokerStreams": {
|
|
37055
37214
|
capName: "camera-streams",
|
|
37056
37215
|
capScope: "device",
|
|
@@ -40801,7 +40960,7 @@ Object.freeze({
|
|
|
40801
40960
|
addonId: null,
|
|
40802
40961
|
access: "view"
|
|
40803
40962
|
},
|
|
40804
|
-
"ptz.
|
|
40963
|
+
"ptz.getHomeReturn": {
|
|
40805
40964
|
capName: "ptz",
|
|
40806
40965
|
capScope: "device",
|
|
40807
40966
|
addonId: null,
|
|
@@ -40861,7 +41020,7 @@ Object.freeze({
|
|
|
40861
41020
|
addonId: null,
|
|
40862
41021
|
access: "create"
|
|
40863
41022
|
},
|
|
40864
|
-
"ptz.
|
|
41023
|
+
"ptz.setHomeReturn": {
|
|
40865
41024
|
capName: "ptz",
|
|
40866
41025
|
capScope: "device",
|
|
40867
41026
|
addonId: null,
|
|
@@ -42750,6 +42909,21 @@ Object.freeze({
|
|
|
42750
42909
|
form: "single",
|
|
42751
42910
|
optional: false
|
|
42752
42911
|
}],
|
|
42912
|
+
"cameraGridLayout.getLayout": [{
|
|
42913
|
+
name: "deviceId",
|
|
42914
|
+
form: "single",
|
|
42915
|
+
optional: false
|
|
42916
|
+
}],
|
|
42917
|
+
"cameraGridLayout.saveLayout": [{
|
|
42918
|
+
name: "cells",
|
|
42919
|
+
form: "object-array",
|
|
42920
|
+
optional: false,
|
|
42921
|
+
itemField: "deviceId"
|
|
42922
|
+
}, {
|
|
42923
|
+
name: "deviceId",
|
|
42924
|
+
form: "single",
|
|
42925
|
+
optional: false
|
|
42926
|
+
}],
|
|
42753
42927
|
"cameraStreams.getBrokerStreams": [{
|
|
42754
42928
|
name: "deviceId",
|
|
42755
42929
|
form: "single",
|
|
@@ -44050,7 +44224,7 @@ Object.freeze({
|
|
|
44050
44224
|
form: "single",
|
|
44051
44225
|
optional: false
|
|
44052
44226
|
}],
|
|
44053
|
-
"ptz.
|
|
44227
|
+
"ptz.getHomeReturn": [{
|
|
44054
44228
|
name: "deviceId",
|
|
44055
44229
|
form: "single",
|
|
44056
44230
|
optional: false
|
|
@@ -44100,7 +44274,7 @@ Object.freeze({
|
|
|
44100
44274
|
form: "single",
|
|
44101
44275
|
optional: false
|
|
44102
44276
|
}],
|
|
44103
|
-
"ptz.
|
|
44277
|
+
"ptz.setHomeReturn": [{
|
|
44104
44278
|
name: "deviceId",
|
|
44105
44279
|
form: "single",
|
|
44106
44280
|
optional: false
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
//#endregion
|
|
6
|
-
const require_dist = require("../dist-
|
|
6
|
+
const require_dist = require("../dist-DO2Nwww0.js");
|
|
7
7
|
let node_crypto = require("node:crypto");
|
|
8
8
|
//#region src/ha-export/topics.ts
|
|
9
9
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { At as EventCategory, C as buildAddonRouteProvider, Et as string, N as deviceExportCapability, X as oauthIntegrationCapability, a as COCO_TO_MACRO, c as FanDirectionSchema, i as CAMERA_SWITCH_ORDER, l as HvacModeSchema, o as CameraSwitchIdSchema, p as addonRoutesCapability, pt as BaseAddon, t as AlarmArmModeSchema, u as MediaPlayerRepeatSchema, vt as nodePin } from "../dist-
|
|
1
|
+
import { At as EventCategory, C as buildAddonRouteProvider, Et as string, N as deviceExportCapability, X as oauthIntegrationCapability, a as COCO_TO_MACRO, c as FanDirectionSchema, i as CAMERA_SWITCH_ORDER, l as HvacModeSchema, o as CameraSwitchIdSchema, p as addonRoutesCapability, pt as BaseAddon, t as AlarmArmModeSchema, u as MediaPlayerRepeatSchema, vt as nodePin } from "../dist-ndOM_A1y.mjs";
|
|
2
2
|
import { createHmac, timingSafeEqual } from "node:crypto";
|
|
3
3
|
//#region src/ha-export/topics.ts
|
|
4
4
|
/**
|