@camstack/addon-provider-homeassistant 1.2.117 → 1.2.120
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-Badx--6A.mjs → dist-9vbU-7ZX.mjs} +188 -8
- package/dist/{dist-By4s88My.js → dist-CojINel_.js} +188 -8
- package/dist/ha-export/ha-export.addon.js +5 -1
- package/dist/ha-export/ha-export.addon.mjs +5 -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-CojINel_.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-9vbU-7ZX.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
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../types/dist/event-category-
|
|
1
|
+
//#region ../types/dist/event-category-BVDXG4tB.mjs
|
|
2
2
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
3
3
|
EventCategory["SystemBoot"] = "system.boot";
|
|
4
4
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -615,6 +615,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
615
615
|
* pull-reconcile from the provider's `getStatus` on reconnect. */
|
|
616
616
|
EventCategory["MeshNetworkChanged"] = "network.mesh.changed";
|
|
617
617
|
EventCategory["BackupCompleted"] = "backup.completed";
|
|
618
|
+
/**
|
|
619
|
+
* A whole backup RUN finished — every destination attempted, win or lose.
|
|
620
|
+
*
|
|
621
|
+
* `backup.completed` fires once per DESTINATION, which is the right grain for
|
|
622
|
+
* a progress UI and the wrong one for a notification: an operator with three
|
|
623
|
+
* destinations would be told three times. And a run where two of three
|
|
624
|
+
* destinations succeeded is not a clean success — a single "backup
|
|
625
|
+
* completed" that hid the failed one would be a lie, so the count of each is
|
|
626
|
+
* carried here and the message says both.
|
|
627
|
+
*
|
|
628
|
+
* Emitted by the backup orchestrator only after the destination loop, so a
|
|
629
|
+
* run that dies during the BUILD phase produces no completion at all.
|
|
630
|
+
*/
|
|
631
|
+
EventCategory["BackupRunCompleted"] = "backup.run-completed";
|
|
618
632
|
EventCategory["BackupRestored"] = "backup.restored";
|
|
619
633
|
EventCategory["NotificationDispatched"] = "notification.dispatched";
|
|
620
634
|
EventCategory["NotificationFailed"] = "notification.failed";
|
|
@@ -5345,7 +5359,7 @@ var ZodIssueCode = {
|
|
|
5345
5359
|
var ZodFirstPartyTypeKind;
|
|
5346
5360
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5347
5361
|
//#endregion
|
|
5348
|
-
//#region ../types/dist/sleep-
|
|
5362
|
+
//#region ../types/dist/sleep-DEuj7E3j.mjs
|
|
5349
5363
|
/**
|
|
5350
5364
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5351
5365
|
* window to float samples (D455).
|
|
@@ -11759,6 +11773,72 @@ var brokerCapability = {
|
|
|
11759
11773
|
}
|
|
11760
11774
|
};
|
|
11761
11775
|
DeviceType.Camera;
|
|
11776
|
+
/**
|
|
11777
|
+
* The signals a device can emit to WAKE its own stream.
|
|
11778
|
+
*
|
|
11779
|
+
* A camera whose stream is built on demand sleeps until something asks for it,
|
|
11780
|
+
* and "something" cannot be a consumer that is merely attached — a Frigate-style
|
|
11781
|
+
* puller holds a session open for ever, and treating that as demand would keep
|
|
11782
|
+
* a battery camera awake for ever, which is the whole thing the battery is for
|
|
11783
|
+
* (D173). So the wake has to come from the CAMERA: an event it noticed by
|
|
11784
|
+
* itself, with no stream running.
|
|
11785
|
+
*
|
|
11786
|
+
* ## The vocabulary is the PROVIDER'S, not ours
|
|
11787
|
+
*
|
|
11788
|
+
* Like `consumables`, this cap declares no vocabulary of its own. A provider
|
|
11789
|
+
* names each signal with a `code` it chooses and a `label` an operator reads.
|
|
11790
|
+
* Reolink offers motion and camera-native detection; another provider may offer
|
|
11791
|
+
* a tamper, a doorbell press, a PIR, or something no camera in this fleet has
|
|
11792
|
+
* yet. A fixed enum here would mean every new signal is a framework release.
|
|
11793
|
+
*
|
|
11794
|
+
* It is deliberately NOT derived from the caps a device already binds. Whether
|
|
11795
|
+
* a camera CAN push firmware motion is expressed by `motionSources` containing
|
|
11796
|
+
* `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
|
|
11797
|
+
* binding — but both answer "what drives the detection pipeline", which is a
|
|
11798
|
+
* different question from "what may wake a sleeping stream". A camera can do
|
|
11799
|
+
* the first and not be trusted with the second, and the operator picks per
|
|
11800
|
+
* camera. Two questions, two authorities.
|
|
11801
|
+
*
|
|
11802
|
+
* ## Availability is not permission
|
|
11803
|
+
*
|
|
11804
|
+
* `listSignals` says what the device CAN emit. Whether a given signal actually
|
|
11805
|
+
* wakes the stream is the operator's per-camera choice, held by the broker
|
|
11806
|
+
* alongside the cooldown — see the stream-broker cap's wake settings. A
|
|
11807
|
+
* provider declaring a signal is not a provider enabling it.
|
|
11808
|
+
*/
|
|
11809
|
+
/** One signal a device can emit. */
|
|
11810
|
+
var StreamSignalSchema = object({
|
|
11811
|
+
/** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
|
|
11812
|
+
code: string().min(1),
|
|
11813
|
+
/** What an operator reads in the picker. The provider's own wording. */
|
|
11814
|
+
label: string().min(1),
|
|
11815
|
+
/**
|
|
11816
|
+
* Whether the provider recommends this signal ON when a camera is first set
|
|
11817
|
+
* up. A provider knows which of its signals are cheap and reliable; an
|
|
11818
|
+
* operator should not have to discover that by trial. Reolink recommends
|
|
11819
|
+
* both of its own.
|
|
11820
|
+
*/
|
|
11821
|
+
recommended: boolean()
|
|
11822
|
+
});
|
|
11823
|
+
var StreamSignalsStatusSchema = object({
|
|
11824
|
+
signals: array(StreamSignalSchema),
|
|
11825
|
+
lastFetchedAt: number()
|
|
11826
|
+
});
|
|
11827
|
+
var streamSignalsCapability = {
|
|
11828
|
+
name: "stream-signals",
|
|
11829
|
+
scope: "device",
|
|
11830
|
+
deviceNative: true,
|
|
11831
|
+
mode: "singleton",
|
|
11832
|
+
deviceTypes: Object.values(DeviceType),
|
|
11833
|
+
runtimeState: StreamSignalsStatusSchema,
|
|
11834
|
+
methods: {
|
|
11835
|
+
/**
|
|
11836
|
+
* What this device can emit. Empty is a valid and common answer — most
|
|
11837
|
+
* cameras have nothing to offer here, and an empty list is what makes the
|
|
11838
|
+
* broker's picker show nothing rather than a false choice.
|
|
11839
|
+
*/
|
|
11840
|
+
listSignals: method(_void(), array(StreamSignalSchema).readonly()) }
|
|
11841
|
+
};
|
|
11762
11842
|
/** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
|
|
11763
11843
|
var StreamFormatSchema = _enum([
|
|
11764
11844
|
"webrtc",
|
|
@@ -12155,6 +12235,22 @@ var EgressTranscodeSchema = object({
|
|
|
12155
12235
|
camStreamId: string().nullable()
|
|
12156
12236
|
});
|
|
12157
12237
|
method(object({
|
|
12238
|
+
deviceId: number().int().nonnegative(),
|
|
12239
|
+
/** The provider's signal code. */
|
|
12240
|
+
code: string().min(1),
|
|
12241
|
+
/** Ms epoch. Absent ⇒ now. */
|
|
12242
|
+
at: number().optional()
|
|
12243
|
+
}), object({
|
|
12244
|
+
/** Whether the broker acted on it, and if not, why. */
|
|
12245
|
+
accepted: boolean(),
|
|
12246
|
+
reason: _enum([
|
|
12247
|
+
"woke",
|
|
12248
|
+
"hold-extended",
|
|
12249
|
+
"not-enabled",
|
|
12250
|
+
"no-consumer",
|
|
12251
|
+
"unknown-code"
|
|
12252
|
+
])
|
|
12253
|
+
}), { kind: "mutation" }), method(object({
|
|
12158
12254
|
deviceId: number().int().nonnegative(),
|
|
12159
12255
|
camStreamId: string().min(1),
|
|
12160
12256
|
kind: CamStreamKindSchema,
|
|
@@ -12409,6 +12505,16 @@ var PickStreamRequirementsSchema = object({
|
|
|
12409
12505
|
acceptCodecs: array(StreamCodecSchema).readonly().optional(),
|
|
12410
12506
|
/** Minimum vertical resolution. Streams shorter than this are dropped. */
|
|
12411
12507
|
minHeight: number().int().positive().optional(),
|
|
12508
|
+
/**
|
|
12509
|
+
* Maximum vertical resolution. Streams TALLER than this are dropped.
|
|
12510
|
+
*
|
|
12511
|
+
* A consumer can have a ceiling as real as its floor: Alexa documents
|
|
12512
|
+
* 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
|
|
12513
|
+
* Without this the ceiling had to be re-implemented by every caller — and
|
|
12514
|
+
* one caller implementing it privately is how a second scoring authority
|
|
12515
|
+
* gets born.
|
|
12516
|
+
*/
|
|
12517
|
+
maxHeight: number().int().positive().optional(),
|
|
12412
12518
|
/** Minimum horizontal resolution. */
|
|
12413
12519
|
minWidth: number().int().positive().optional(),
|
|
12414
12520
|
/**
|
|
@@ -12425,7 +12531,22 @@ var PickStreamRequirementsSchema = object({
|
|
|
12425
12531
|
* transcoded" guard: if the device is already serving the consumer's
|
|
12426
12532
|
* codec end-to-end, there's nothing to optimise.
|
|
12427
12533
|
*/
|
|
12428
|
-
requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
|
|
12534
|
+
requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
|
|
12535
|
+
/**
|
|
12536
|
+
* Whether a stream the consumer CANNOT decode may still be picked, on the
|
|
12537
|
+
* understanding that it will be transcoded.
|
|
12538
|
+
*
|
|
12539
|
+
* Default `false` — today's behaviour, and the right one for a bypass
|
|
12540
|
+
* question ("is there a stream I can forward untouched?"). Set `true` to
|
|
12541
|
+
* ask the larger question: "what is the best stream for me, transcoding if
|
|
12542
|
+
* I must?" A stream that satisfies `acceptCodecs` always outranks one that
|
|
12543
|
+
* does not, so a passthrough is never lost to a transcode; the answer says
|
|
12544
|
+
* which it is in {@link PickedCamStreamSchema.transcodes}.
|
|
12545
|
+
*
|
|
12546
|
+
* This is what lets one picker serve both the bypass and the full source
|
|
12547
|
+
* choice, instead of a consumer scoring privately when the bypass misses.
|
|
12548
|
+
*/
|
|
12549
|
+
allowTranscode: boolean().optional()
|
|
12429
12550
|
}).readonly();
|
|
12430
12551
|
var PickStreamPreferencesSchema = object({
|
|
12431
12552
|
/**
|
|
@@ -12439,12 +12560,32 @@ var PickStreamPreferencesSchema = object({
|
|
|
12439
12560
|
* picks the tallest stream; `'lowest'` picks the shortest (used by
|
|
12440
12561
|
* memory-constrained consumers / Apple Home guest sessions).
|
|
12441
12562
|
*/
|
|
12442
|
-
resolutionPreference: _enum(["highest", "lowest"]).optional()
|
|
12563
|
+
resolutionPreference: _enum(["highest", "lowest"]).optional(),
|
|
12564
|
+
/**
|
|
12565
|
+
* The height the consumer actually wants to DELIVER.
|
|
12566
|
+
*
|
|
12567
|
+
* Not a constraint — an ordering. With it set, the SMALLEST stream at or
|
|
12568
|
+
* above the target wins, and only if nothing reaches it does the tallest
|
|
12569
|
+
* take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
|
|
12570
|
+
* a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
|
|
12571
|
+
* express that: it says "as big as possible", which is a different wish.
|
|
12572
|
+
*
|
|
12573
|
+
* Ignored when absent, so every existing caller keeps its ordering.
|
|
12574
|
+
*/
|
|
12575
|
+
targetHeight: number().int().positive().optional()
|
|
12443
12576
|
}).readonly();
|
|
12444
12577
|
var PickedCamStreamSchema = object({
|
|
12445
12578
|
camStreamId: string(),
|
|
12446
12579
|
codec: string().optional(),
|
|
12447
12580
|
resolution: CamStreamResolutionSchema.optional(),
|
|
12581
|
+
/**
|
|
12582
|
+
* Whether serving this stream requires a decode + re-encode.
|
|
12583
|
+
*
|
|
12584
|
+
* `false` is a stream the consumer can take as it stands. Only ever `true`
|
|
12585
|
+
* when the caller asked for it with `allowTranscode`, so a caller that did
|
|
12586
|
+
* not ask cannot be handed a cost it never agreed to pay.
|
|
12587
|
+
*/
|
|
12588
|
+
transcodes: boolean(),
|
|
12448
12589
|
/** One-line explanation of why this stream won — for logs / debug UI. */
|
|
12449
12590
|
reason: string()
|
|
12450
12591
|
});
|
|
@@ -17062,6 +17203,8 @@ var NcSystemEventKindSchema = _enum([
|
|
|
17062
17203
|
"device-enabled",
|
|
17063
17204
|
"device-battery-low",
|
|
17064
17205
|
"device-battery-normal",
|
|
17206
|
+
"device-consumable-low",
|
|
17207
|
+
"device-consumable-normal",
|
|
17065
17208
|
"stream-online",
|
|
17066
17209
|
"stream-offline",
|
|
17067
17210
|
"node-online",
|
|
@@ -17080,6 +17223,7 @@ var NcSystemEventKindSchema = _enum([
|
|
|
17080
17223
|
"addon-updated",
|
|
17081
17224
|
"server-updated",
|
|
17082
17225
|
"export-completed",
|
|
17226
|
+
"backup-completed",
|
|
17083
17227
|
"camera-online",
|
|
17084
17228
|
"camera-offline",
|
|
17085
17229
|
"camera-disabled",
|
|
@@ -24377,10 +24521,28 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
|
|
|
24377
24521
|
}), boolean()), method(object({
|
|
24378
24522
|
deviceId: number().int().nonnegative(),
|
|
24379
24523
|
sessionId: string()
|
|
24380
|
-
}), object({
|
|
24381
|
-
|
|
24382
|
-
|
|
24383
|
-
|
|
24524
|
+
}), object({
|
|
24525
|
+
pendingRenegotiation: object({
|
|
24526
|
+
target: WebrtcStreamTargetSchema,
|
|
24527
|
+
epoch: number()
|
|
24528
|
+
}).nullable(),
|
|
24529
|
+
/**
|
|
24530
|
+
* Whether the session still EXISTS.
|
|
24531
|
+
*
|
|
24532
|
+
* A consumer that holds a resource for the life of a session needs to
|
|
24533
|
+
* be able to ask, because a session does not always end the way it
|
|
24534
|
+
* began. Measured on this hub 2026-09-13: an Echo that got stuck never
|
|
24535
|
+
* sent `SessionDisconnected`, so the Alexa exporter's
|
|
24536
|
+
* `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
|
|
24537
|
+
* H.264 transcode kept running for NOBODY for more than twenty
|
|
24538
|
+
* minutes. The WebRTC session had logged `WebRTC session closed`
|
|
24539
|
+
* minutes earlier — the broker knew; the holder had no way to ask.
|
|
24540
|
+
*
|
|
24541
|
+
* `false` for a session id the provider has never heard of, which is
|
|
24542
|
+
* the same answer as "it ended": either way nothing is holding it up.
|
|
24543
|
+
*/
|
|
24544
|
+
alive: boolean()
|
|
24545
|
+
}));
|
|
24384
24546
|
/**
|
|
24385
24547
|
* List of accessory children linked to a parent device. The cap surfaces
|
|
24386
24548
|
* the grouping and the per-child UI-visibility flag — the single source
|
|
@@ -34388,6 +34550,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
34388
34550
|
smoke: smokeCapability,
|
|
34389
34551
|
streamCatalog: streamCatalogCapability,
|
|
34390
34552
|
streamParams: streamParamsCapability,
|
|
34553
|
+
streamSignals: streamSignalsCapability,
|
|
34391
34554
|
switch: switchCapability,
|
|
34392
34555
|
tamper: tamperCapability,
|
|
34393
34556
|
temperatureSensor: temperatureSensorCapability,
|
|
@@ -40961,6 +41124,12 @@ Object.freeze({
|
|
|
40961
41124
|
addonId: null,
|
|
40962
41125
|
access: "create"
|
|
40963
41126
|
},
|
|
41127
|
+
"streamBroker.reportStreamSignal": {
|
|
41128
|
+
capName: "stream-broker",
|
|
41129
|
+
capScope: "system",
|
|
41130
|
+
addonId: null,
|
|
41131
|
+
access: "create"
|
|
41132
|
+
},
|
|
40964
41133
|
"streamBroker.restartProfile": {
|
|
40965
41134
|
capName: "stream-broker",
|
|
40966
41135
|
capScope: "system",
|
|
@@ -41045,6 +41214,12 @@ Object.freeze({
|
|
|
41045
41214
|
addonId: null,
|
|
41046
41215
|
access: "create"
|
|
41047
41216
|
},
|
|
41217
|
+
"streamSignals.listSignals": {
|
|
41218
|
+
capName: "stream-signals",
|
|
41219
|
+
capScope: "device",
|
|
41220
|
+
addonId: null,
|
|
41221
|
+
access: "view"
|
|
41222
|
+
},
|
|
41048
41223
|
"switch.setState": {
|
|
41049
41224
|
capName: "switch",
|
|
41050
41225
|
capScope: "device",
|
|
@@ -43417,6 +43592,11 @@ Object.freeze({
|
|
|
43417
43592
|
form: "single",
|
|
43418
43593
|
optional: false
|
|
43419
43594
|
}],
|
|
43595
|
+
"streamBroker.reportStreamSignal": [{
|
|
43596
|
+
name: "deviceId",
|
|
43597
|
+
form: "single",
|
|
43598
|
+
optional: false
|
|
43599
|
+
}],
|
|
43420
43600
|
"streamBroker.restartProfile": [{
|
|
43421
43601
|
name: "deviceId",
|
|
43422
43602
|
form: "single",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../types/dist/event-category-
|
|
1
|
+
//#region ../types/dist/event-category-BVDXG4tB.mjs
|
|
2
2
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
3
3
|
EventCategory["SystemBoot"] = "system.boot";
|
|
4
4
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -615,6 +615,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
615
615
|
* pull-reconcile from the provider's `getStatus` on reconnect. */
|
|
616
616
|
EventCategory["MeshNetworkChanged"] = "network.mesh.changed";
|
|
617
617
|
EventCategory["BackupCompleted"] = "backup.completed";
|
|
618
|
+
/**
|
|
619
|
+
* A whole backup RUN finished — every destination attempted, win or lose.
|
|
620
|
+
*
|
|
621
|
+
* `backup.completed` fires once per DESTINATION, which is the right grain for
|
|
622
|
+
* a progress UI and the wrong one for a notification: an operator with three
|
|
623
|
+
* destinations would be told three times. And a run where two of three
|
|
624
|
+
* destinations succeeded is not a clean success — a single "backup
|
|
625
|
+
* completed" that hid the failed one would be a lie, so the count of each is
|
|
626
|
+
* carried here and the message says both.
|
|
627
|
+
*
|
|
628
|
+
* Emitted by the backup orchestrator only after the destination loop, so a
|
|
629
|
+
* run that dies during the BUILD phase produces no completion at all.
|
|
630
|
+
*/
|
|
631
|
+
EventCategory["BackupRunCompleted"] = "backup.run-completed";
|
|
618
632
|
EventCategory["BackupRestored"] = "backup.restored";
|
|
619
633
|
EventCategory["NotificationDispatched"] = "notification.dispatched";
|
|
620
634
|
EventCategory["NotificationFailed"] = "notification.failed";
|
|
@@ -5345,7 +5359,7 @@ var ZodIssueCode = {
|
|
|
5345
5359
|
var ZodFirstPartyTypeKind;
|
|
5346
5360
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5347
5361
|
//#endregion
|
|
5348
|
-
//#region ../types/dist/sleep-
|
|
5362
|
+
//#region ../types/dist/sleep-DEuj7E3j.mjs
|
|
5349
5363
|
/**
|
|
5350
5364
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5351
5365
|
* window to float samples (D455).
|
|
@@ -11759,6 +11773,72 @@ var brokerCapability = {
|
|
|
11759
11773
|
}
|
|
11760
11774
|
};
|
|
11761
11775
|
DeviceType.Camera;
|
|
11776
|
+
/**
|
|
11777
|
+
* The signals a device can emit to WAKE its own stream.
|
|
11778
|
+
*
|
|
11779
|
+
* A camera whose stream is built on demand sleeps until something asks for it,
|
|
11780
|
+
* and "something" cannot be a consumer that is merely attached — a Frigate-style
|
|
11781
|
+
* puller holds a session open for ever, and treating that as demand would keep
|
|
11782
|
+
* a battery camera awake for ever, which is the whole thing the battery is for
|
|
11783
|
+
* (D173). So the wake has to come from the CAMERA: an event it noticed by
|
|
11784
|
+
* itself, with no stream running.
|
|
11785
|
+
*
|
|
11786
|
+
* ## The vocabulary is the PROVIDER'S, not ours
|
|
11787
|
+
*
|
|
11788
|
+
* Like `consumables`, this cap declares no vocabulary of its own. A provider
|
|
11789
|
+
* names each signal with a `code` it chooses and a `label` an operator reads.
|
|
11790
|
+
* Reolink offers motion and camera-native detection; another provider may offer
|
|
11791
|
+
* a tamper, a doorbell press, a PIR, or something no camera in this fleet has
|
|
11792
|
+
* yet. A fixed enum here would mean every new signal is a framework release.
|
|
11793
|
+
*
|
|
11794
|
+
* It is deliberately NOT derived from the caps a device already binds. Whether
|
|
11795
|
+
* a camera CAN push firmware motion is expressed by `motionSources` containing
|
|
11796
|
+
* `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
|
|
11797
|
+
* binding — but both answer "what drives the detection pipeline", which is a
|
|
11798
|
+
* different question from "what may wake a sleeping stream". A camera can do
|
|
11799
|
+
* the first and not be trusted with the second, and the operator picks per
|
|
11800
|
+
* camera. Two questions, two authorities.
|
|
11801
|
+
*
|
|
11802
|
+
* ## Availability is not permission
|
|
11803
|
+
*
|
|
11804
|
+
* `listSignals` says what the device CAN emit. Whether a given signal actually
|
|
11805
|
+
* wakes the stream is the operator's per-camera choice, held by the broker
|
|
11806
|
+
* alongside the cooldown — see the stream-broker cap's wake settings. A
|
|
11807
|
+
* provider declaring a signal is not a provider enabling it.
|
|
11808
|
+
*/
|
|
11809
|
+
/** One signal a device can emit. */
|
|
11810
|
+
var StreamSignalSchema = object({
|
|
11811
|
+
/** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
|
|
11812
|
+
code: string().min(1),
|
|
11813
|
+
/** What an operator reads in the picker. The provider's own wording. */
|
|
11814
|
+
label: string().min(1),
|
|
11815
|
+
/**
|
|
11816
|
+
* Whether the provider recommends this signal ON when a camera is first set
|
|
11817
|
+
* up. A provider knows which of its signals are cheap and reliable; an
|
|
11818
|
+
* operator should not have to discover that by trial. Reolink recommends
|
|
11819
|
+
* both of its own.
|
|
11820
|
+
*/
|
|
11821
|
+
recommended: boolean()
|
|
11822
|
+
});
|
|
11823
|
+
var StreamSignalsStatusSchema = object({
|
|
11824
|
+
signals: array(StreamSignalSchema),
|
|
11825
|
+
lastFetchedAt: number()
|
|
11826
|
+
});
|
|
11827
|
+
var streamSignalsCapability = {
|
|
11828
|
+
name: "stream-signals",
|
|
11829
|
+
scope: "device",
|
|
11830
|
+
deviceNative: true,
|
|
11831
|
+
mode: "singleton",
|
|
11832
|
+
deviceTypes: Object.values(DeviceType),
|
|
11833
|
+
runtimeState: StreamSignalsStatusSchema,
|
|
11834
|
+
methods: {
|
|
11835
|
+
/**
|
|
11836
|
+
* What this device can emit. Empty is a valid and common answer — most
|
|
11837
|
+
* cameras have nothing to offer here, and an empty list is what makes the
|
|
11838
|
+
* broker's picker show nothing rather than a false choice.
|
|
11839
|
+
*/
|
|
11840
|
+
listSignals: method(_void(), array(StreamSignalSchema).readonly()) }
|
|
11841
|
+
};
|
|
11762
11842
|
/** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
|
|
11763
11843
|
var StreamFormatSchema = _enum([
|
|
11764
11844
|
"webrtc",
|
|
@@ -12155,6 +12235,22 @@ var EgressTranscodeSchema = object({
|
|
|
12155
12235
|
camStreamId: string().nullable()
|
|
12156
12236
|
});
|
|
12157
12237
|
method(object({
|
|
12238
|
+
deviceId: number().int().nonnegative(),
|
|
12239
|
+
/** The provider's signal code. */
|
|
12240
|
+
code: string().min(1),
|
|
12241
|
+
/** Ms epoch. Absent ⇒ now. */
|
|
12242
|
+
at: number().optional()
|
|
12243
|
+
}), object({
|
|
12244
|
+
/** Whether the broker acted on it, and if not, why. */
|
|
12245
|
+
accepted: boolean(),
|
|
12246
|
+
reason: _enum([
|
|
12247
|
+
"woke",
|
|
12248
|
+
"hold-extended",
|
|
12249
|
+
"not-enabled",
|
|
12250
|
+
"no-consumer",
|
|
12251
|
+
"unknown-code"
|
|
12252
|
+
])
|
|
12253
|
+
}), { kind: "mutation" }), method(object({
|
|
12158
12254
|
deviceId: number().int().nonnegative(),
|
|
12159
12255
|
camStreamId: string().min(1),
|
|
12160
12256
|
kind: CamStreamKindSchema,
|
|
@@ -12409,6 +12505,16 @@ var PickStreamRequirementsSchema = object({
|
|
|
12409
12505
|
acceptCodecs: array(StreamCodecSchema).readonly().optional(),
|
|
12410
12506
|
/** Minimum vertical resolution. Streams shorter than this are dropped. */
|
|
12411
12507
|
minHeight: number().int().positive().optional(),
|
|
12508
|
+
/**
|
|
12509
|
+
* Maximum vertical resolution. Streams TALLER than this are dropped.
|
|
12510
|
+
*
|
|
12511
|
+
* A consumer can have a ceiling as real as its floor: Alexa documents
|
|
12512
|
+
* 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
|
|
12513
|
+
* Without this the ceiling had to be re-implemented by every caller — and
|
|
12514
|
+
* one caller implementing it privately is how a second scoring authority
|
|
12515
|
+
* gets born.
|
|
12516
|
+
*/
|
|
12517
|
+
maxHeight: number().int().positive().optional(),
|
|
12412
12518
|
/** Minimum horizontal resolution. */
|
|
12413
12519
|
minWidth: number().int().positive().optional(),
|
|
12414
12520
|
/**
|
|
@@ -12425,7 +12531,22 @@ var PickStreamRequirementsSchema = object({
|
|
|
12425
12531
|
* transcoded" guard: if the device is already serving the consumer's
|
|
12426
12532
|
* codec end-to-end, there's nothing to optimise.
|
|
12427
12533
|
*/
|
|
12428
|
-
requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
|
|
12534
|
+
requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
|
|
12535
|
+
/**
|
|
12536
|
+
* Whether a stream the consumer CANNOT decode may still be picked, on the
|
|
12537
|
+
* understanding that it will be transcoded.
|
|
12538
|
+
*
|
|
12539
|
+
* Default `false` — today's behaviour, and the right one for a bypass
|
|
12540
|
+
* question ("is there a stream I can forward untouched?"). Set `true` to
|
|
12541
|
+
* ask the larger question: "what is the best stream for me, transcoding if
|
|
12542
|
+
* I must?" A stream that satisfies `acceptCodecs` always outranks one that
|
|
12543
|
+
* does not, so a passthrough is never lost to a transcode; the answer says
|
|
12544
|
+
* which it is in {@link PickedCamStreamSchema.transcodes}.
|
|
12545
|
+
*
|
|
12546
|
+
* This is what lets one picker serve both the bypass and the full source
|
|
12547
|
+
* choice, instead of a consumer scoring privately when the bypass misses.
|
|
12548
|
+
*/
|
|
12549
|
+
allowTranscode: boolean().optional()
|
|
12429
12550
|
}).readonly();
|
|
12430
12551
|
var PickStreamPreferencesSchema = object({
|
|
12431
12552
|
/**
|
|
@@ -12439,12 +12560,32 @@ var PickStreamPreferencesSchema = object({
|
|
|
12439
12560
|
* picks the tallest stream; `'lowest'` picks the shortest (used by
|
|
12440
12561
|
* memory-constrained consumers / Apple Home guest sessions).
|
|
12441
12562
|
*/
|
|
12442
|
-
resolutionPreference: _enum(["highest", "lowest"]).optional()
|
|
12563
|
+
resolutionPreference: _enum(["highest", "lowest"]).optional(),
|
|
12564
|
+
/**
|
|
12565
|
+
* The height the consumer actually wants to DELIVER.
|
|
12566
|
+
*
|
|
12567
|
+
* Not a constraint — an ordering. With it set, the SMALLEST stream at or
|
|
12568
|
+
* above the target wins, and only if nothing reaches it does the tallest
|
|
12569
|
+
* take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
|
|
12570
|
+
* a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
|
|
12571
|
+
* express that: it says "as big as possible", which is a different wish.
|
|
12572
|
+
*
|
|
12573
|
+
* Ignored when absent, so every existing caller keeps its ordering.
|
|
12574
|
+
*/
|
|
12575
|
+
targetHeight: number().int().positive().optional()
|
|
12443
12576
|
}).readonly();
|
|
12444
12577
|
var PickedCamStreamSchema = object({
|
|
12445
12578
|
camStreamId: string(),
|
|
12446
12579
|
codec: string().optional(),
|
|
12447
12580
|
resolution: CamStreamResolutionSchema.optional(),
|
|
12581
|
+
/**
|
|
12582
|
+
* Whether serving this stream requires a decode + re-encode.
|
|
12583
|
+
*
|
|
12584
|
+
* `false` is a stream the consumer can take as it stands. Only ever `true`
|
|
12585
|
+
* when the caller asked for it with `allowTranscode`, so a caller that did
|
|
12586
|
+
* not ask cannot be handed a cost it never agreed to pay.
|
|
12587
|
+
*/
|
|
12588
|
+
transcodes: boolean(),
|
|
12448
12589
|
/** One-line explanation of why this stream won — for logs / debug UI. */
|
|
12449
12590
|
reason: string()
|
|
12450
12591
|
});
|
|
@@ -17062,6 +17203,8 @@ var NcSystemEventKindSchema = _enum([
|
|
|
17062
17203
|
"device-enabled",
|
|
17063
17204
|
"device-battery-low",
|
|
17064
17205
|
"device-battery-normal",
|
|
17206
|
+
"device-consumable-low",
|
|
17207
|
+
"device-consumable-normal",
|
|
17065
17208
|
"stream-online",
|
|
17066
17209
|
"stream-offline",
|
|
17067
17210
|
"node-online",
|
|
@@ -17080,6 +17223,7 @@ var NcSystemEventKindSchema = _enum([
|
|
|
17080
17223
|
"addon-updated",
|
|
17081
17224
|
"server-updated",
|
|
17082
17225
|
"export-completed",
|
|
17226
|
+
"backup-completed",
|
|
17083
17227
|
"camera-online",
|
|
17084
17228
|
"camera-offline",
|
|
17085
17229
|
"camera-disabled",
|
|
@@ -24377,10 +24521,28 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
|
|
|
24377
24521
|
}), boolean()), method(object({
|
|
24378
24522
|
deviceId: number().int().nonnegative(),
|
|
24379
24523
|
sessionId: string()
|
|
24380
|
-
}), object({
|
|
24381
|
-
|
|
24382
|
-
|
|
24383
|
-
|
|
24524
|
+
}), object({
|
|
24525
|
+
pendingRenegotiation: object({
|
|
24526
|
+
target: WebrtcStreamTargetSchema,
|
|
24527
|
+
epoch: number()
|
|
24528
|
+
}).nullable(),
|
|
24529
|
+
/**
|
|
24530
|
+
* Whether the session still EXISTS.
|
|
24531
|
+
*
|
|
24532
|
+
* A consumer that holds a resource for the life of a session needs to
|
|
24533
|
+
* be able to ask, because a session does not always end the way it
|
|
24534
|
+
* began. Measured on this hub 2026-09-13: an Echo that got stuck never
|
|
24535
|
+
* sent `SessionDisconnected`, so the Alexa exporter's
|
|
24536
|
+
* `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
|
|
24537
|
+
* H.264 transcode kept running for NOBODY for more than twenty
|
|
24538
|
+
* minutes. The WebRTC session had logged `WebRTC session closed`
|
|
24539
|
+
* minutes earlier — the broker knew; the holder had no way to ask.
|
|
24540
|
+
*
|
|
24541
|
+
* `false` for a session id the provider has never heard of, which is
|
|
24542
|
+
* the same answer as "it ended": either way nothing is holding it up.
|
|
24543
|
+
*/
|
|
24544
|
+
alive: boolean()
|
|
24545
|
+
}));
|
|
24384
24546
|
/**
|
|
24385
24547
|
* List of accessory children linked to a parent device. The cap surfaces
|
|
24386
24548
|
* the grouping and the per-child UI-visibility flag — the single source
|
|
@@ -34388,6 +34550,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
34388
34550
|
smoke: smokeCapability,
|
|
34389
34551
|
streamCatalog: streamCatalogCapability,
|
|
34390
34552
|
streamParams: streamParamsCapability,
|
|
34553
|
+
streamSignals: streamSignalsCapability,
|
|
34391
34554
|
switch: switchCapability,
|
|
34392
34555
|
tamper: tamperCapability,
|
|
34393
34556
|
temperatureSensor: temperatureSensorCapability,
|
|
@@ -40961,6 +41124,12 @@ Object.freeze({
|
|
|
40961
41124
|
addonId: null,
|
|
40962
41125
|
access: "create"
|
|
40963
41126
|
},
|
|
41127
|
+
"streamBroker.reportStreamSignal": {
|
|
41128
|
+
capName: "stream-broker",
|
|
41129
|
+
capScope: "system",
|
|
41130
|
+
addonId: null,
|
|
41131
|
+
access: "create"
|
|
41132
|
+
},
|
|
40964
41133
|
"streamBroker.restartProfile": {
|
|
40965
41134
|
capName: "stream-broker",
|
|
40966
41135
|
capScope: "system",
|
|
@@ -41045,6 +41214,12 @@ Object.freeze({
|
|
|
41045
41214
|
addonId: null,
|
|
41046
41215
|
access: "create"
|
|
41047
41216
|
},
|
|
41217
|
+
"streamSignals.listSignals": {
|
|
41218
|
+
capName: "stream-signals",
|
|
41219
|
+
capScope: "device",
|
|
41220
|
+
addonId: null,
|
|
41221
|
+
access: "view"
|
|
41222
|
+
},
|
|
41048
41223
|
"switch.setState": {
|
|
41049
41224
|
capName: "switch",
|
|
41050
41225
|
capScope: "device",
|
|
@@ -43417,6 +43592,11 @@ Object.freeze({
|
|
|
43417
43592
|
form: "single",
|
|
43418
43593
|
optional: false
|
|
43419
43594
|
}],
|
|
43595
|
+
"streamBroker.reportStreamSignal": [{
|
|
43596
|
+
name: "deviceId",
|
|
43597
|
+
form: "single",
|
|
43598
|
+
optional: false
|
|
43599
|
+
}],
|
|
43420
43600
|
"streamBroker.restartProfile": [{
|
|
43421
43601
|
name: "deviceId",
|
|
43422
43602
|
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-CojINel_.js");
|
|
7
7
|
let node_crypto = require("node:crypto");
|
|
8
8
|
//#region src/ha-export/topics.ts
|
|
9
9
|
/**
|
|
@@ -2756,6 +2756,10 @@ function capEntitySpecs(capName) {
|
|
|
2756
2756
|
return specs;
|
|
2757
2757
|
}
|
|
2758
2758
|
var CAPS_NOT_EXPORTED = [
|
|
2759
|
+
{
|
|
2760
|
+
cap: "stream-signals",
|
|
2761
|
+
reason: "A DECLARATION, not a state: it lists the signals a camera can emit to wake its own stream, so the broker can offer them as wake sources. Nothing about it changes over time and nothing about it is a reading — an entity here would show a constant list forever. The signals themselves already reach Home Assistant where they mean something: motion as the motion sensor, a camera-native detection as its own binary sensor."
|
|
2762
|
+
},
|
|
2759
2763
|
{
|
|
2760
2764
|
cap: "network-link",
|
|
2761
2765
|
reason: "Already exported, imperatively: the device catalog pushes a `Network link` sensor and a `Signal` percentage sensor for any device carrying the slice. A CAP_ENTITY_MAP row would produce a THIRD entity from the same slice, and the cap needs two entities from one slice (a link type and a percentage that is null on a wired link) which a single mapping row cannot express."
|
|
@@ -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-9vbU-7ZX.mjs";
|
|
2
2
|
import { createHmac, timingSafeEqual } from "node:crypto";
|
|
3
3
|
//#region src/ha-export/topics.ts
|
|
4
4
|
/**
|
|
@@ -2751,6 +2751,10 @@ function capEntitySpecs(capName) {
|
|
|
2751
2751
|
return specs;
|
|
2752
2752
|
}
|
|
2753
2753
|
var CAPS_NOT_EXPORTED = [
|
|
2754
|
+
{
|
|
2755
|
+
cap: "stream-signals",
|
|
2756
|
+
reason: "A DECLARATION, not a state: it lists the signals a camera can emit to wake its own stream, so the broker can offer them as wake sources. Nothing about it changes over time and nothing about it is a reading — an entity here would show a constant list forever. The signals themselves already reach Home Assistant where they mean something: motion as the motion sensor, a camera-native detection as its own binary sensor."
|
|
2757
|
+
},
|
|
2754
2758
|
{
|
|
2755
2759
|
cap: "network-link",
|
|
2756
2760
|
reason: "Already exported, imperatively: the device catalog pushes a `Network link` sensor and a `Signal` percentage sensor for any device carrying the slice. A CAP_ENTITY_MAP row would produce a THIRD entity from the same slice, and the cap needs two entities from one slice (a link type and a percentage that is null on a wired link) which a single mapping row cannot express."
|