@camstack/addon-provider-homeassistant 1.2.124 → 1.2.126
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-Cna51hy3.js → dist-CtfLmU_u.js} +201 -3
- package/dist/{dist-BGU-lGVF.mjs → dist-DSmGE3CV.mjs} +201 -3
- package/dist/ha-export/ha-export.addon.js +1 -1
- package/dist/ha-export/ha-export.addon.mjs +1 -1
- package/package.json +2 -2
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-CtfLmU_u.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-DSmGE3CV.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-BDR76Ykr.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).
|
|
@@ -11831,6 +11831,21 @@ var streamSignalsCapability = {
|
|
|
11831
11831
|
mode: "singleton",
|
|
11832
11832
|
deviceTypes: Object.values(DeviceType),
|
|
11833
11833
|
runtimeState: StreamSignalsStatusSchema,
|
|
11834
|
+
/**
|
|
11835
|
+
* Runtime-state durability: **session** — mirrored in RAM, never written.
|
|
11836
|
+
*
|
|
11837
|
+
* The slice holds what the DEVICE says it can emit. That is a probed fact,
|
|
11838
|
+
* not an operator choice: the provider re-declares it on every registration,
|
|
11839
|
+
* so losing it loses nothing and persisting it would freeze an answer the
|
|
11840
|
+
* camera is entitled to change. Measured the same day on the sibling case —
|
|
11841
|
+
* `native-object-detection.supportedClasses` was persisted, and a firmware
|
|
11842
|
+
* class the camera really detected stayed missing for the life of the row
|
|
11843
|
+
* because the fix could not reach it.
|
|
11844
|
+
*
|
|
11845
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
11846
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
11847
|
+
*/
|
|
11848
|
+
durability: "session",
|
|
11834
11849
|
methods: {
|
|
11835
11850
|
/**
|
|
11836
11851
|
* What this device can emit. Empty is a valid and common answer — most
|
|
@@ -18546,6 +18561,48 @@ var NcAlarmConfigSchema = object({
|
|
|
18546
18561
|
settings: NcAlarmSettingsSchema,
|
|
18547
18562
|
coverage: array(NcAlarmModeCoverageSchema)
|
|
18548
18563
|
});
|
|
18564
|
+
/**
|
|
18565
|
+
* ONE rule's demand on ONE camera's clip ring.
|
|
18566
|
+
*
|
|
18567
|
+
* A rule, not a camera: the broker takes the MAX over the asks that reach a
|
|
18568
|
+
* camera, so the answer stays a faithful description of the rules and the
|
|
18569
|
+
* bounding (the byte budget, the broker's own ceiling) stays where the cost
|
|
18570
|
+
* lives. A camera that appears in no ask is being told **nothing** — which is
|
|
18571
|
+
* a different thing from never having been told, and only the envelope
|
|
18572
|
+
* (`rulesLoaded`) can tell those apart.
|
|
18573
|
+
*/
|
|
18574
|
+
var NcClipRetentionAskSchema = object({
|
|
18575
|
+
/**
|
|
18576
|
+
* The camera this ask is about. **Absent = every camera**, which is what a
|
|
18577
|
+
* rule with no `conditions.devices` means: it can fire anywhere, so it is
|
|
18578
|
+
* asking everywhere.
|
|
18579
|
+
*/
|
|
18580
|
+
deviceId: number().int().nonnegative().optional(),
|
|
18581
|
+
/** Seconds of history the rule needs held for it. Never zero — a rule that
|
|
18582
|
+
* needs nothing produces no ask at all. */
|
|
18583
|
+
seconds: number().min(0).max(60),
|
|
18584
|
+
/** The profile the rule cuts from, when it named one. Absent = the cheapest
|
|
18585
|
+
* assigned, which is what the cut defaults to. */
|
|
18586
|
+
profile: CamProfileSchema.optional(),
|
|
18587
|
+
/** Who is asking — so a retention the operator did not expect names a rule. */
|
|
18588
|
+
ruleId: string(),
|
|
18589
|
+
ruleName: string(),
|
|
18590
|
+
/** Why this many seconds: the rule's own window, or the occupancy ceiling. */
|
|
18591
|
+
reason: _enum(["window", "occupancy"])
|
|
18592
|
+
});
|
|
18593
|
+
/**
|
|
18594
|
+
* The whole answer, with the one bit that keeps absence from reading as zero.
|
|
18595
|
+
*
|
|
18596
|
+
* `rulesLoaded` is false until the rule ledger has completed a load at least
|
|
18597
|
+
* once. A centre that is up but has not read its rules yet answers with an
|
|
18598
|
+
* empty ask list that means nothing at all — applying it would drop every
|
|
18599
|
+
* camera's ring to zero for the first events after a restart, which is the
|
|
18600
|
+
* footage this mechanism exists to keep.
|
|
18601
|
+
*/
|
|
18602
|
+
var NcClipRetentionPlanSchema = object({
|
|
18603
|
+
rulesLoaded: boolean(),
|
|
18604
|
+
asks: array(NcClipRetentionAskSchema).readonly()
|
|
18605
|
+
});
|
|
18549
18606
|
method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), method(object({ ruleId: string() }), object({ rule: NcRuleSchema.nullable() }), { auth: "admin" }), method(object({ rule: NcRuleInputSchema }), object({ rule: NcRuleSchema }), {
|
|
18550
18607
|
kind: "mutation",
|
|
18551
18608
|
auth: "admin",
|
|
@@ -18566,7 +18623,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
18566
18623
|
}), object({ success: literal(true) }), {
|
|
18567
18624
|
kind: "mutation",
|
|
18568
18625
|
auth: "admin"
|
|
18569
|
-
}), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
18626
|
+
}), method(object({}), NcClipRetentionPlanSchema, { auth: "admin" }), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
18570
18627
|
deviceId: number().int(),
|
|
18571
18628
|
muted: boolean()
|
|
18572
18629
|
}), object({ success: literal(true) }), {
|
|
@@ -21156,6 +21213,33 @@ var RunReplayFrameProcessorResultSchema = object({ tracks: array(object({
|
|
|
21156
21213
|
* solid is this track", cheaper than re-deriving it from a trajectory. */
|
|
21157
21214
|
framesMatched: number().int()
|
|
21158
21215
|
})).readonly() });
|
|
21216
|
+
/**
|
|
21217
|
+
* The long-term series a camera produces. A closed union so a typo cannot
|
|
21218
|
+
* invent one, and the ONE declaration of it — the addon's `AnalyticsLtsSeries`
|
|
21219
|
+
* is an alias of this, not a second list.
|
|
21220
|
+
*/
|
|
21221
|
+
var AnalyticsLtsSeriesSchema = _enum([
|
|
21222
|
+
"motion",
|
|
21223
|
+
"audio-dbfs",
|
|
21224
|
+
"battery",
|
|
21225
|
+
"occupancy"
|
|
21226
|
+
]);
|
|
21227
|
+
/**
|
|
21228
|
+
* One closed 5-minute bucket of a long-term series.
|
|
21229
|
+
*
|
|
21230
|
+
* `samples` is how many readings the bucket folded — it is the ACTIVITY for a
|
|
21231
|
+
* series like `motion`, and the confidence for one like `occupancy`. A bucket
|
|
21232
|
+
* that exists at all was measured; a bucket that is absent was not, which is a
|
|
21233
|
+
* different claim from zero and the reason this is a sparse series.
|
|
21234
|
+
*/
|
|
21235
|
+
var LtsBucketSchema = object({
|
|
21236
|
+
scope: string(),
|
|
21237
|
+
bucketStart: number().int(),
|
|
21238
|
+
samples: number().int().nonnegative(),
|
|
21239
|
+
sum: number(),
|
|
21240
|
+
min: number(),
|
|
21241
|
+
max: number()
|
|
21242
|
+
});
|
|
21159
21243
|
DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
|
|
21160
21244
|
deviceId: number(),
|
|
21161
21245
|
trackId: string()
|
|
@@ -21202,6 +21286,14 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
21202
21286
|
kinds: array(string()).optional(),
|
|
21203
21287
|
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
21204
21288
|
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
|
|
21289
|
+
deviceId: number(),
|
|
21290
|
+
series: AnalyticsLtsSeriesSchema,
|
|
21291
|
+
/** Omit for EVERY scope of this series in the range. */
|
|
21292
|
+
scope: string().optional(),
|
|
21293
|
+
from: number(),
|
|
21294
|
+
to: number(),
|
|
21295
|
+
limit: number().int().positive().optional()
|
|
21296
|
+
}), array(LtsBucketSchema).readonly()), method(object({
|
|
21205
21297
|
deviceId: number(),
|
|
21206
21298
|
since: number(),
|
|
21207
21299
|
until: number(),
|
|
@@ -22188,7 +22280,47 @@ var RunnerLocalMetricsSchema = object({
|
|
|
22188
22280
|
queueDepth: number(),
|
|
22189
22281
|
frameLazy: FrameLazyMetricsSchema.optional()
|
|
22190
22282
|
});
|
|
22283
|
+
/**
|
|
22284
|
+
* Pipeline Runner capability — runtime detection workhorse.
|
|
22285
|
+
*
|
|
22286
|
+
* One instance per node. Receives camera assignments from
|
|
22287
|
+
* `addon-pipeline-orchestrator`, subscribes to the local stream-broker for
|
|
22288
|
+
* decoded frames, drains motion + detection queues, calls the local
|
|
22289
|
+
* `motion-detection` and `pipeline-executor` capabilities, and emits typed
|
|
22290
|
+
* `pipeline.inference-result` and `detection.motion-analysis` events on
|
|
22291
|
+
* the bus.
|
|
22292
|
+
*
|
|
22293
|
+
* Distinct from `pipeline-orchestrator` (the hub-side load balancer) — the
|
|
22294
|
+
* runner has zero knowledge of other agents, no global state, and never
|
|
22295
|
+
* makes assignment decisions itself.
|
|
22296
|
+
*/
|
|
22297
|
+
/**
|
|
22298
|
+
* Why a runner declined to look at a camera out of band. Named rather than a
|
|
22299
|
+
* bare `false`: a camera asleep on battery (D173), one attached elsewhere, one
|
|
22300
|
+
* already mid-session and one already bursting are four different facts, and a
|
|
22301
|
+
* caller told only "no" cannot tell a protection from a bug.
|
|
22302
|
+
*/
|
|
22303
|
+
var OccupancyBurstRefusalSchema = _enum([
|
|
22304
|
+
"not-attached",
|
|
22305
|
+
"battery-asleep",
|
|
22306
|
+
"not-watching",
|
|
22307
|
+
"already-bursting"
|
|
22308
|
+
]);
|
|
22191
22309
|
method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mutation" }), method(object({ deviceId: number() }), object({ success: literal(true) }), { kind: "mutation" }), method(ReportMotionInputSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), RunnerLocalLoadSchema), method(_void(), RunnerLocalMetricsSchema), method(object({ deviceId: number() }), CameraMetricsSchema.nullable()), method(_void(), array(CameraMetricsWithDeviceIdSchema).readonly()), method(_void(), array(number()).readonly()), method(object({
|
|
22310
|
+
deviceId: number(),
|
|
22311
|
+
/** How many frames to collect. The caller sizes this against what its
|
|
22312
|
+
* own confirmation needs; the runner clamps it to the field's range. */
|
|
22313
|
+
frames: number().int().positive().optional(),
|
|
22314
|
+
/** Why, for the log. A burst nobody can attribute is a cost nobody can
|
|
22315
|
+
* defend — the periodic one at least has a timer to point at. */
|
|
22316
|
+
reason: string()
|
|
22317
|
+
}), object({
|
|
22318
|
+
started: boolean(),
|
|
22319
|
+
refusedBecause: OccupancyBurstRefusalSchema.optional()
|
|
22320
|
+
}), {
|
|
22321
|
+
auth: "admin",
|
|
22322
|
+
kind: "mutation"
|
|
22323
|
+
}), method(object({
|
|
22192
22324
|
handle: FrameHandleSchema,
|
|
22193
22325
|
bbox: NativeCropBboxSchema,
|
|
22194
22326
|
maxWidth: number().int().positive().optional(),
|
|
@@ -34020,7 +34152,28 @@ var PerScopeBreakdownSchema = object({
|
|
|
34020
34152
|
/** Total tracked objects in this scope (frame / zone / unzoned). */
|
|
34021
34153
|
totalObjects: number().int().nonnegative(),
|
|
34022
34154
|
/** Per-class count. Keys are macro class names (e.g. `person`, `car`). */
|
|
34023
|
-
byClass: record(string(), number().int().nonnegative())
|
|
34155
|
+
byClass: record(string(), number().int().nonnegative()),
|
|
34156
|
+
/**
|
|
34157
|
+
* Of `totalObjects`, how many are STANDING — objects the census holds,
|
|
34158
|
+
* present but not going anywhere (a parked car, a bin, a statue).
|
|
34159
|
+
*
|
|
34160
|
+
* The operator's question about a scene has two halves and they answer
|
|
34161
|
+
* different things: "what is parked here" is stable for hours and must not
|
|
34162
|
+
* flap, while "who is walking through" is the thing an alert is about. One
|
|
34163
|
+
* number could only serve one of them, and `totalObjects` served the first
|
|
34164
|
+
* badly — a passer-by moved it and every occupancy rule saw a change.
|
|
34165
|
+
*
|
|
34166
|
+
* `standing + transient === totalObjects`, always. The total keeps its old
|
|
34167
|
+
* meaning exactly, so no rule written against it changes behaviour.
|
|
34168
|
+
*
|
|
34169
|
+
* ABSENT means UNKNOWN, never zero (D393): a snapshot from a node older than
|
|
34170
|
+
* this field cannot say, and a reader that folds absence in as 0 reports "no
|
|
34171
|
+
* parked objects here" about a camera whose lot is full.
|
|
34172
|
+
*/
|
|
34173
|
+
standingObjects: number().int().nonnegative().optional(),
|
|
34174
|
+
/** Of `totalObjects`, how many are passing through. See `standingObjects` —
|
|
34175
|
+
* same absence rule. */
|
|
34176
|
+
transientObjects: number().int().nonnegative().optional()
|
|
34024
34177
|
});
|
|
34025
34178
|
var ZoneScopeBreakdownSchema = PerScopeBreakdownSchema.extend({
|
|
34026
34179
|
zoneId: string(),
|
|
@@ -34143,6 +34296,23 @@ var HistoryPointSchema = object({
|
|
|
34143
34296
|
* triple covers the three spatial scopes (per-zone, frame-wide,
|
|
34144
34297
|
* outside-any-zone). Crossing them with `className?` gives the full
|
|
34145
34298
|
* combinatorial coverage the operator UI requested.
|
|
34299
|
+
*
|
|
34300
|
+
* ## ⚠️ The three history methods are DEPRECATED
|
|
34301
|
+
*
|
|
34302
|
+
* They are served from a 60-MINUTE in-memory ring. It dies with the process,
|
|
34303
|
+
* so after a restart they report nothing about a night that did happen, and any
|
|
34304
|
+
* window past an hour is silently clamped — a caller cannot tell a clamp from
|
|
34305
|
+
* an empty scene. The presets in the occupancy chart existed to hide that
|
|
34306
|
+
* horizon rather than to answer a question.
|
|
34307
|
+
*
|
|
34308
|
+
* Use `pipelineAnalytics.readLongTermSeries({ series: 'occupancy', scope })`
|
|
34309
|
+
* instead. Those rows are already written for every camera, ~60 bytes per
|
|
34310
|
+
* (camera, scope, 5-minute bucket), kept for a year, and survive a restart.
|
|
34311
|
+
* Spell the scope with `occupancyScope(zoneId?, className?)` — the same
|
|
34312
|
+
* function the writer uses, so the two cannot drift.
|
|
34313
|
+
*
|
|
34314
|
+
* The ring stays until these three go, and it is the only thing left reading
|
|
34315
|
+
* it. Do not add a fourth caller.
|
|
34146
34316
|
*/
|
|
34147
34317
|
var zoneAnalyticsCapability = {
|
|
34148
34318
|
name: "zone-analytics",
|
|
@@ -38824,6 +38994,12 @@ Object.freeze({
|
|
|
38824
38994
|
addonId: null,
|
|
38825
38995
|
access: "view"
|
|
38826
38996
|
},
|
|
38997
|
+
"notificationRules.getClipRetentionAsks": {
|
|
38998
|
+
capName: "notification-rules",
|
|
38999
|
+
capScope: "system",
|
|
39000
|
+
addonId: null,
|
|
39001
|
+
access: "view"
|
|
39002
|
+
},
|
|
38827
39003
|
"notificationRules.getConditionCatalog": {
|
|
38828
39004
|
capName: "notification-rules",
|
|
38829
39005
|
capScope: "system",
|
|
@@ -39334,6 +39510,12 @@ Object.freeze({
|
|
|
39334
39510
|
addonId: null,
|
|
39335
39511
|
access: "create"
|
|
39336
39512
|
},
|
|
39513
|
+
"pipelineAnalytics.readLongTermSeries": {
|
|
39514
|
+
capName: "pipeline-analytics",
|
|
39515
|
+
capScope: "device",
|
|
39516
|
+
addonId: null,
|
|
39517
|
+
access: "view"
|
|
39518
|
+
},
|
|
39337
39519
|
"pipelineAnalytics.rebuildObjectEmbeddings": {
|
|
39338
39520
|
capName: "pipeline-analytics",
|
|
39339
39521
|
capScope: "device",
|
|
@@ -40006,6 +40188,12 @@ Object.freeze({
|
|
|
40006
40188
|
addonId: null,
|
|
40007
40189
|
access: "create"
|
|
40008
40190
|
},
|
|
40191
|
+
"pipelineRunner.requestOccupancyBurst": {
|
|
40192
|
+
capName: "pipeline-runner",
|
|
40193
|
+
capScope: "system",
|
|
40194
|
+
addonId: null,
|
|
40195
|
+
access: "create"
|
|
40196
|
+
},
|
|
40009
40197
|
"pipelineRunner.runDetailSubtree": {
|
|
40010
40198
|
capName: "pipeline-runner",
|
|
40011
40199
|
capScope: "system",
|
|
@@ -43150,6 +43338,11 @@ Object.freeze({
|
|
|
43150
43338
|
form: "single",
|
|
43151
43339
|
optional: false
|
|
43152
43340
|
}],
|
|
43341
|
+
"pipelineAnalytics.readLongTermSeries": [{
|
|
43342
|
+
name: "deviceId",
|
|
43343
|
+
form: "single",
|
|
43344
|
+
optional: false
|
|
43345
|
+
}],
|
|
43153
43346
|
"pipelineAnalytics.rebuildObjectEmbeddings": [{
|
|
43154
43347
|
name: "deviceId",
|
|
43155
43348
|
form: "single",
|
|
@@ -43340,6 +43533,11 @@ Object.freeze({
|
|
|
43340
43533
|
form: "single",
|
|
43341
43534
|
optional: false
|
|
43342
43535
|
}],
|
|
43536
|
+
"pipelineRunner.requestOccupancyBurst": [{
|
|
43537
|
+
name: "deviceId",
|
|
43538
|
+
form: "single",
|
|
43539
|
+
optional: false
|
|
43540
|
+
}],
|
|
43343
43541
|
"pipelineRunner.runDetailSubtree": [{
|
|
43344
43542
|
name: "deviceId",
|
|
43345
43543
|
form: "single",
|
|
@@ -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-BDR76Ykr.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).
|
|
@@ -11831,6 +11831,21 @@ var streamSignalsCapability = {
|
|
|
11831
11831
|
mode: "singleton",
|
|
11832
11832
|
deviceTypes: Object.values(DeviceType),
|
|
11833
11833
|
runtimeState: StreamSignalsStatusSchema,
|
|
11834
|
+
/**
|
|
11835
|
+
* Runtime-state durability: **session** — mirrored in RAM, never written.
|
|
11836
|
+
*
|
|
11837
|
+
* The slice holds what the DEVICE says it can emit. That is a probed fact,
|
|
11838
|
+
* not an operator choice: the provider re-declares it on every registration,
|
|
11839
|
+
* so losing it loses nothing and persisting it would freeze an answer the
|
|
11840
|
+
* camera is entitled to change. Measured the same day on the sibling case —
|
|
11841
|
+
* `native-object-detection.supportedClasses` was persisted, and a firmware
|
|
11842
|
+
* class the camera really detected stayed missing for the life of the row
|
|
11843
|
+
* because the fix could not reach it.
|
|
11844
|
+
*
|
|
11845
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
11846
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
11847
|
+
*/
|
|
11848
|
+
durability: "session",
|
|
11834
11849
|
methods: {
|
|
11835
11850
|
/**
|
|
11836
11851
|
* What this device can emit. Empty is a valid and common answer — most
|
|
@@ -18546,6 +18561,48 @@ var NcAlarmConfigSchema = object({
|
|
|
18546
18561
|
settings: NcAlarmSettingsSchema,
|
|
18547
18562
|
coverage: array(NcAlarmModeCoverageSchema)
|
|
18548
18563
|
});
|
|
18564
|
+
/**
|
|
18565
|
+
* ONE rule's demand on ONE camera's clip ring.
|
|
18566
|
+
*
|
|
18567
|
+
* A rule, not a camera: the broker takes the MAX over the asks that reach a
|
|
18568
|
+
* camera, so the answer stays a faithful description of the rules and the
|
|
18569
|
+
* bounding (the byte budget, the broker's own ceiling) stays where the cost
|
|
18570
|
+
* lives. A camera that appears in no ask is being told **nothing** — which is
|
|
18571
|
+
* a different thing from never having been told, and only the envelope
|
|
18572
|
+
* (`rulesLoaded`) can tell those apart.
|
|
18573
|
+
*/
|
|
18574
|
+
var NcClipRetentionAskSchema = object({
|
|
18575
|
+
/**
|
|
18576
|
+
* The camera this ask is about. **Absent = every camera**, which is what a
|
|
18577
|
+
* rule with no `conditions.devices` means: it can fire anywhere, so it is
|
|
18578
|
+
* asking everywhere.
|
|
18579
|
+
*/
|
|
18580
|
+
deviceId: number().int().nonnegative().optional(),
|
|
18581
|
+
/** Seconds of history the rule needs held for it. Never zero — a rule that
|
|
18582
|
+
* needs nothing produces no ask at all. */
|
|
18583
|
+
seconds: number().min(0).max(60),
|
|
18584
|
+
/** The profile the rule cuts from, when it named one. Absent = the cheapest
|
|
18585
|
+
* assigned, which is what the cut defaults to. */
|
|
18586
|
+
profile: CamProfileSchema.optional(),
|
|
18587
|
+
/** Who is asking — so a retention the operator did not expect names a rule. */
|
|
18588
|
+
ruleId: string(),
|
|
18589
|
+
ruleName: string(),
|
|
18590
|
+
/** Why this many seconds: the rule's own window, or the occupancy ceiling. */
|
|
18591
|
+
reason: _enum(["window", "occupancy"])
|
|
18592
|
+
});
|
|
18593
|
+
/**
|
|
18594
|
+
* The whole answer, with the one bit that keeps absence from reading as zero.
|
|
18595
|
+
*
|
|
18596
|
+
* `rulesLoaded` is false until the rule ledger has completed a load at least
|
|
18597
|
+
* once. A centre that is up but has not read its rules yet answers with an
|
|
18598
|
+
* empty ask list that means nothing at all — applying it would drop every
|
|
18599
|
+
* camera's ring to zero for the first events after a restart, which is the
|
|
18600
|
+
* footage this mechanism exists to keep.
|
|
18601
|
+
*/
|
|
18602
|
+
var NcClipRetentionPlanSchema = object({
|
|
18603
|
+
rulesLoaded: boolean(),
|
|
18604
|
+
asks: array(NcClipRetentionAskSchema).readonly()
|
|
18605
|
+
});
|
|
18549
18606
|
method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), method(object({ ruleId: string() }), object({ rule: NcRuleSchema.nullable() }), { auth: "admin" }), method(object({ rule: NcRuleInputSchema }), object({ rule: NcRuleSchema }), {
|
|
18550
18607
|
kind: "mutation",
|
|
18551
18608
|
auth: "admin",
|
|
@@ -18566,7 +18623,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
18566
18623
|
}), object({ success: literal(true) }), {
|
|
18567
18624
|
kind: "mutation",
|
|
18568
18625
|
auth: "admin"
|
|
18569
|
-
}), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
18626
|
+
}), method(object({}), NcClipRetentionPlanSchema, { auth: "admin" }), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
18570
18627
|
deviceId: number().int(),
|
|
18571
18628
|
muted: boolean()
|
|
18572
18629
|
}), object({ success: literal(true) }), {
|
|
@@ -21156,6 +21213,33 @@ var RunReplayFrameProcessorResultSchema = object({ tracks: array(object({
|
|
|
21156
21213
|
* solid is this track", cheaper than re-deriving it from a trajectory. */
|
|
21157
21214
|
framesMatched: number().int()
|
|
21158
21215
|
})).readonly() });
|
|
21216
|
+
/**
|
|
21217
|
+
* The long-term series a camera produces. A closed union so a typo cannot
|
|
21218
|
+
* invent one, and the ONE declaration of it — the addon's `AnalyticsLtsSeries`
|
|
21219
|
+
* is an alias of this, not a second list.
|
|
21220
|
+
*/
|
|
21221
|
+
var AnalyticsLtsSeriesSchema = _enum([
|
|
21222
|
+
"motion",
|
|
21223
|
+
"audio-dbfs",
|
|
21224
|
+
"battery",
|
|
21225
|
+
"occupancy"
|
|
21226
|
+
]);
|
|
21227
|
+
/**
|
|
21228
|
+
* One closed 5-minute bucket of a long-term series.
|
|
21229
|
+
*
|
|
21230
|
+
* `samples` is how many readings the bucket folded — it is the ACTIVITY for a
|
|
21231
|
+
* series like `motion`, and the confidence for one like `occupancy`. A bucket
|
|
21232
|
+
* that exists at all was measured; a bucket that is absent was not, which is a
|
|
21233
|
+
* different claim from zero and the reason this is a sparse series.
|
|
21234
|
+
*/
|
|
21235
|
+
var LtsBucketSchema = object({
|
|
21236
|
+
scope: string(),
|
|
21237
|
+
bucketStart: number().int(),
|
|
21238
|
+
samples: number().int().nonnegative(),
|
|
21239
|
+
sum: number(),
|
|
21240
|
+
min: number(),
|
|
21241
|
+
max: number()
|
|
21242
|
+
});
|
|
21159
21243
|
DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
|
|
21160
21244
|
deviceId: number(),
|
|
21161
21245
|
trackId: string()
|
|
@@ -21202,6 +21286,14 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
21202
21286
|
kinds: array(string()).optional(),
|
|
21203
21287
|
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
21204
21288
|
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
|
|
21289
|
+
deviceId: number(),
|
|
21290
|
+
series: AnalyticsLtsSeriesSchema,
|
|
21291
|
+
/** Omit for EVERY scope of this series in the range. */
|
|
21292
|
+
scope: string().optional(),
|
|
21293
|
+
from: number(),
|
|
21294
|
+
to: number(),
|
|
21295
|
+
limit: number().int().positive().optional()
|
|
21296
|
+
}), array(LtsBucketSchema).readonly()), method(object({
|
|
21205
21297
|
deviceId: number(),
|
|
21206
21298
|
since: number(),
|
|
21207
21299
|
until: number(),
|
|
@@ -22188,7 +22280,47 @@ var RunnerLocalMetricsSchema = object({
|
|
|
22188
22280
|
queueDepth: number(),
|
|
22189
22281
|
frameLazy: FrameLazyMetricsSchema.optional()
|
|
22190
22282
|
});
|
|
22283
|
+
/**
|
|
22284
|
+
* Pipeline Runner capability — runtime detection workhorse.
|
|
22285
|
+
*
|
|
22286
|
+
* One instance per node. Receives camera assignments from
|
|
22287
|
+
* `addon-pipeline-orchestrator`, subscribes to the local stream-broker for
|
|
22288
|
+
* decoded frames, drains motion + detection queues, calls the local
|
|
22289
|
+
* `motion-detection` and `pipeline-executor` capabilities, and emits typed
|
|
22290
|
+
* `pipeline.inference-result` and `detection.motion-analysis` events on
|
|
22291
|
+
* the bus.
|
|
22292
|
+
*
|
|
22293
|
+
* Distinct from `pipeline-orchestrator` (the hub-side load balancer) — the
|
|
22294
|
+
* runner has zero knowledge of other agents, no global state, and never
|
|
22295
|
+
* makes assignment decisions itself.
|
|
22296
|
+
*/
|
|
22297
|
+
/**
|
|
22298
|
+
* Why a runner declined to look at a camera out of band. Named rather than a
|
|
22299
|
+
* bare `false`: a camera asleep on battery (D173), one attached elsewhere, one
|
|
22300
|
+
* already mid-session and one already bursting are four different facts, and a
|
|
22301
|
+
* caller told only "no" cannot tell a protection from a bug.
|
|
22302
|
+
*/
|
|
22303
|
+
var OccupancyBurstRefusalSchema = _enum([
|
|
22304
|
+
"not-attached",
|
|
22305
|
+
"battery-asleep",
|
|
22306
|
+
"not-watching",
|
|
22307
|
+
"already-bursting"
|
|
22308
|
+
]);
|
|
22191
22309
|
method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mutation" }), method(object({ deviceId: number() }), object({ success: literal(true) }), { kind: "mutation" }), method(ReportMotionInputSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), RunnerLocalLoadSchema), method(_void(), RunnerLocalMetricsSchema), method(object({ deviceId: number() }), CameraMetricsSchema.nullable()), method(_void(), array(CameraMetricsWithDeviceIdSchema).readonly()), method(_void(), array(number()).readonly()), method(object({
|
|
22310
|
+
deviceId: number(),
|
|
22311
|
+
/** How many frames to collect. The caller sizes this against what its
|
|
22312
|
+
* own confirmation needs; the runner clamps it to the field's range. */
|
|
22313
|
+
frames: number().int().positive().optional(),
|
|
22314
|
+
/** Why, for the log. A burst nobody can attribute is a cost nobody can
|
|
22315
|
+
* defend — the periodic one at least has a timer to point at. */
|
|
22316
|
+
reason: string()
|
|
22317
|
+
}), object({
|
|
22318
|
+
started: boolean(),
|
|
22319
|
+
refusedBecause: OccupancyBurstRefusalSchema.optional()
|
|
22320
|
+
}), {
|
|
22321
|
+
auth: "admin",
|
|
22322
|
+
kind: "mutation"
|
|
22323
|
+
}), method(object({
|
|
22192
22324
|
handle: FrameHandleSchema,
|
|
22193
22325
|
bbox: NativeCropBboxSchema,
|
|
22194
22326
|
maxWidth: number().int().positive().optional(),
|
|
@@ -34020,7 +34152,28 @@ var PerScopeBreakdownSchema = object({
|
|
|
34020
34152
|
/** Total tracked objects in this scope (frame / zone / unzoned). */
|
|
34021
34153
|
totalObjects: number().int().nonnegative(),
|
|
34022
34154
|
/** Per-class count. Keys are macro class names (e.g. `person`, `car`). */
|
|
34023
|
-
byClass: record(string(), number().int().nonnegative())
|
|
34155
|
+
byClass: record(string(), number().int().nonnegative()),
|
|
34156
|
+
/**
|
|
34157
|
+
* Of `totalObjects`, how many are STANDING — objects the census holds,
|
|
34158
|
+
* present but not going anywhere (a parked car, a bin, a statue).
|
|
34159
|
+
*
|
|
34160
|
+
* The operator's question about a scene has two halves and they answer
|
|
34161
|
+
* different things: "what is parked here" is stable for hours and must not
|
|
34162
|
+
* flap, while "who is walking through" is the thing an alert is about. One
|
|
34163
|
+
* number could only serve one of them, and `totalObjects` served the first
|
|
34164
|
+
* badly — a passer-by moved it and every occupancy rule saw a change.
|
|
34165
|
+
*
|
|
34166
|
+
* `standing + transient === totalObjects`, always. The total keeps its old
|
|
34167
|
+
* meaning exactly, so no rule written against it changes behaviour.
|
|
34168
|
+
*
|
|
34169
|
+
* ABSENT means UNKNOWN, never zero (D393): a snapshot from a node older than
|
|
34170
|
+
* this field cannot say, and a reader that folds absence in as 0 reports "no
|
|
34171
|
+
* parked objects here" about a camera whose lot is full.
|
|
34172
|
+
*/
|
|
34173
|
+
standingObjects: number().int().nonnegative().optional(),
|
|
34174
|
+
/** Of `totalObjects`, how many are passing through. See `standingObjects` —
|
|
34175
|
+
* same absence rule. */
|
|
34176
|
+
transientObjects: number().int().nonnegative().optional()
|
|
34024
34177
|
});
|
|
34025
34178
|
var ZoneScopeBreakdownSchema = PerScopeBreakdownSchema.extend({
|
|
34026
34179
|
zoneId: string(),
|
|
@@ -34143,6 +34296,23 @@ var HistoryPointSchema = object({
|
|
|
34143
34296
|
* triple covers the three spatial scopes (per-zone, frame-wide,
|
|
34144
34297
|
* outside-any-zone). Crossing them with `className?` gives the full
|
|
34145
34298
|
* combinatorial coverage the operator UI requested.
|
|
34299
|
+
*
|
|
34300
|
+
* ## ⚠️ The three history methods are DEPRECATED
|
|
34301
|
+
*
|
|
34302
|
+
* They are served from a 60-MINUTE in-memory ring. It dies with the process,
|
|
34303
|
+
* so after a restart they report nothing about a night that did happen, and any
|
|
34304
|
+
* window past an hour is silently clamped — a caller cannot tell a clamp from
|
|
34305
|
+
* an empty scene. The presets in the occupancy chart existed to hide that
|
|
34306
|
+
* horizon rather than to answer a question.
|
|
34307
|
+
*
|
|
34308
|
+
* Use `pipelineAnalytics.readLongTermSeries({ series: 'occupancy', scope })`
|
|
34309
|
+
* instead. Those rows are already written for every camera, ~60 bytes per
|
|
34310
|
+
* (camera, scope, 5-minute bucket), kept for a year, and survive a restart.
|
|
34311
|
+
* Spell the scope with `occupancyScope(zoneId?, className?)` — the same
|
|
34312
|
+
* function the writer uses, so the two cannot drift.
|
|
34313
|
+
*
|
|
34314
|
+
* The ring stays until these three go, and it is the only thing left reading
|
|
34315
|
+
* it. Do not add a fourth caller.
|
|
34146
34316
|
*/
|
|
34147
34317
|
var zoneAnalyticsCapability = {
|
|
34148
34318
|
name: "zone-analytics",
|
|
@@ -38824,6 +38994,12 @@ Object.freeze({
|
|
|
38824
38994
|
addonId: null,
|
|
38825
38995
|
access: "view"
|
|
38826
38996
|
},
|
|
38997
|
+
"notificationRules.getClipRetentionAsks": {
|
|
38998
|
+
capName: "notification-rules",
|
|
38999
|
+
capScope: "system",
|
|
39000
|
+
addonId: null,
|
|
39001
|
+
access: "view"
|
|
39002
|
+
},
|
|
38827
39003
|
"notificationRules.getConditionCatalog": {
|
|
38828
39004
|
capName: "notification-rules",
|
|
38829
39005
|
capScope: "system",
|
|
@@ -39334,6 +39510,12 @@ Object.freeze({
|
|
|
39334
39510
|
addonId: null,
|
|
39335
39511
|
access: "create"
|
|
39336
39512
|
},
|
|
39513
|
+
"pipelineAnalytics.readLongTermSeries": {
|
|
39514
|
+
capName: "pipeline-analytics",
|
|
39515
|
+
capScope: "device",
|
|
39516
|
+
addonId: null,
|
|
39517
|
+
access: "view"
|
|
39518
|
+
},
|
|
39337
39519
|
"pipelineAnalytics.rebuildObjectEmbeddings": {
|
|
39338
39520
|
capName: "pipeline-analytics",
|
|
39339
39521
|
capScope: "device",
|
|
@@ -40006,6 +40188,12 @@ Object.freeze({
|
|
|
40006
40188
|
addonId: null,
|
|
40007
40189
|
access: "create"
|
|
40008
40190
|
},
|
|
40191
|
+
"pipelineRunner.requestOccupancyBurst": {
|
|
40192
|
+
capName: "pipeline-runner",
|
|
40193
|
+
capScope: "system",
|
|
40194
|
+
addonId: null,
|
|
40195
|
+
access: "create"
|
|
40196
|
+
},
|
|
40009
40197
|
"pipelineRunner.runDetailSubtree": {
|
|
40010
40198
|
capName: "pipeline-runner",
|
|
40011
40199
|
capScope: "system",
|
|
@@ -43150,6 +43338,11 @@ Object.freeze({
|
|
|
43150
43338
|
form: "single",
|
|
43151
43339
|
optional: false
|
|
43152
43340
|
}],
|
|
43341
|
+
"pipelineAnalytics.readLongTermSeries": [{
|
|
43342
|
+
name: "deviceId",
|
|
43343
|
+
form: "single",
|
|
43344
|
+
optional: false
|
|
43345
|
+
}],
|
|
43153
43346
|
"pipelineAnalytics.rebuildObjectEmbeddings": [{
|
|
43154
43347
|
name: "deviceId",
|
|
43155
43348
|
form: "single",
|
|
@@ -43340,6 +43533,11 @@ Object.freeze({
|
|
|
43340
43533
|
form: "single",
|
|
43341
43534
|
optional: false
|
|
43342
43535
|
}],
|
|
43536
|
+
"pipelineRunner.requestOccupancyBurst": [{
|
|
43537
|
+
name: "deviceId",
|
|
43538
|
+
form: "single",
|
|
43539
|
+
optional: false
|
|
43540
|
+
}],
|
|
43343
43541
|
"pipelineRunner.runDetailSubtree": [{
|
|
43344
43542
|
name: "deviceId",
|
|
43345
43543
|
form: "single",
|
|
@@ -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-CtfLmU_u.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-DSmGE3CV.mjs";
|
|
2
2
|
import { createHmac, timingSafeEqual } from "node:crypto";
|
|
3
3
|
//#region src/ha-export/topics.ts
|
|
4
4
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-homeassistant",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.126",
|
|
4
4
|
"description": "Home Assistant device provider addon for CamStack",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
"dev": "vite build --watch",
|
|
127
127
|
"typecheck": "tsc --noEmit",
|
|
128
128
|
"test": "vitest run",
|
|
129
|
-
"publish": "npm publish --access public"
|
|
129
|
+
"publish:npm": "npm publish --access public"
|
|
130
130
|
},
|
|
131
131
|
"dependencies": {
|
|
132
132
|
"home-assistant-js-websocket": "^9.4.0"
|