@camstack/addon-provider-dreame 0.2.102 → 0.2.103
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 +188 -8
- package/dist/addon.mjs +188 -8
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -52672,7 +52672,7 @@ var DreameCameraStream = class extends TypedEmitter {
|
|
|
52672
52672
|
}
|
|
52673
52673
|
};
|
|
52674
52674
|
//#endregion
|
|
52675
|
-
//#region ../types/dist/event-category-
|
|
52675
|
+
//#region ../types/dist/event-category-BVDXG4tB.mjs
|
|
52676
52676
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
52677
52677
|
EventCategory["SystemBoot"] = "system.boot";
|
|
52678
52678
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -53289,6 +53289,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
53289
53289
|
* pull-reconcile from the provider's `getStatus` on reconnect. */
|
|
53290
53290
|
EventCategory["MeshNetworkChanged"] = "network.mesh.changed";
|
|
53291
53291
|
EventCategory["BackupCompleted"] = "backup.completed";
|
|
53292
|
+
/**
|
|
53293
|
+
* A whole backup RUN finished — every destination attempted, win or lose.
|
|
53294
|
+
*
|
|
53295
|
+
* `backup.completed` fires once per DESTINATION, which is the right grain for
|
|
53296
|
+
* a progress UI and the wrong one for a notification: an operator with three
|
|
53297
|
+
* destinations would be told three times. And a run where two of three
|
|
53298
|
+
* destinations succeeded is not a clean success — a single "backup
|
|
53299
|
+
* completed" that hid the failed one would be a lie, so the count of each is
|
|
53300
|
+
* carried here and the message says both.
|
|
53301
|
+
*
|
|
53302
|
+
* Emitted by the backup orchestrator only after the destination loop, so a
|
|
53303
|
+
* run that dies during the BUILD phase produces no completion at all.
|
|
53304
|
+
*/
|
|
53305
|
+
EventCategory["BackupRunCompleted"] = "backup.run-completed";
|
|
53292
53306
|
EventCategory["BackupRestored"] = "backup.restored";
|
|
53293
53307
|
EventCategory["NotificationDispatched"] = "notification.dispatched";
|
|
53294
53308
|
EventCategory["NotificationFailed"] = "notification.failed";
|
|
@@ -58019,7 +58033,7 @@ var ZodIssueCode = {
|
|
|
58019
58033
|
var ZodFirstPartyTypeKind;
|
|
58020
58034
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
58021
58035
|
//#endregion
|
|
58022
|
-
//#region ../types/dist/sleep-
|
|
58036
|
+
//#region ../types/dist/sleep-DEuj7E3j.mjs
|
|
58023
58037
|
/**
|
|
58024
58038
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
58025
58039
|
* window to float samples (D455).
|
|
@@ -64163,6 +64177,72 @@ method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, Broke
|
|
|
64163
64177
|
auth: "admin"
|
|
64164
64178
|
}), method(GetStateInputSchema, unknown().nullable()), method(_void(), RegistryStatusSchema);
|
|
64165
64179
|
DeviceType.Camera;
|
|
64180
|
+
/**
|
|
64181
|
+
* The signals a device can emit to WAKE its own stream.
|
|
64182
|
+
*
|
|
64183
|
+
* A camera whose stream is built on demand sleeps until something asks for it,
|
|
64184
|
+
* and "something" cannot be a consumer that is merely attached — a Frigate-style
|
|
64185
|
+
* puller holds a session open for ever, and treating that as demand would keep
|
|
64186
|
+
* a battery camera awake for ever, which is the whole thing the battery is for
|
|
64187
|
+
* (D173). So the wake has to come from the CAMERA: an event it noticed by
|
|
64188
|
+
* itself, with no stream running.
|
|
64189
|
+
*
|
|
64190
|
+
* ## The vocabulary is the PROVIDER'S, not ours
|
|
64191
|
+
*
|
|
64192
|
+
* Like `consumables`, this cap declares no vocabulary of its own. A provider
|
|
64193
|
+
* names each signal with a `code` it chooses and a `label` an operator reads.
|
|
64194
|
+
* Reolink offers motion and camera-native detection; another provider may offer
|
|
64195
|
+
* a tamper, a doorbell press, a PIR, or something no camera in this fleet has
|
|
64196
|
+
* yet. A fixed enum here would mean every new signal is a framework release.
|
|
64197
|
+
*
|
|
64198
|
+
* It is deliberately NOT derived from the caps a device already binds. Whether
|
|
64199
|
+
* a camera CAN push firmware motion is expressed by `motionSources` containing
|
|
64200
|
+
* `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
|
|
64201
|
+
* binding — but both answer "what drives the detection pipeline", which is a
|
|
64202
|
+
* different question from "what may wake a sleeping stream". A camera can do
|
|
64203
|
+
* the first and not be trusted with the second, and the operator picks per
|
|
64204
|
+
* camera. Two questions, two authorities.
|
|
64205
|
+
*
|
|
64206
|
+
* ## Availability is not permission
|
|
64207
|
+
*
|
|
64208
|
+
* `listSignals` says what the device CAN emit. Whether a given signal actually
|
|
64209
|
+
* wakes the stream is the operator's per-camera choice, held by the broker
|
|
64210
|
+
* alongside the cooldown — see the stream-broker cap's wake settings. A
|
|
64211
|
+
* provider declaring a signal is not a provider enabling it.
|
|
64212
|
+
*/
|
|
64213
|
+
/** One signal a device can emit. */
|
|
64214
|
+
var StreamSignalSchema = object({
|
|
64215
|
+
/** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
|
|
64216
|
+
code: string().min(1),
|
|
64217
|
+
/** What an operator reads in the picker. The provider's own wording. */
|
|
64218
|
+
label: string().min(1),
|
|
64219
|
+
/**
|
|
64220
|
+
* Whether the provider recommends this signal ON when a camera is first set
|
|
64221
|
+
* up. A provider knows which of its signals are cheap and reliable; an
|
|
64222
|
+
* operator should not have to discover that by trial. Reolink recommends
|
|
64223
|
+
* both of its own.
|
|
64224
|
+
*/
|
|
64225
|
+
recommended: boolean()
|
|
64226
|
+
});
|
|
64227
|
+
var StreamSignalsStatusSchema = object({
|
|
64228
|
+
signals: array(StreamSignalSchema),
|
|
64229
|
+
lastFetchedAt: number()
|
|
64230
|
+
});
|
|
64231
|
+
var streamSignalsCapability = {
|
|
64232
|
+
name: "stream-signals",
|
|
64233
|
+
scope: "device",
|
|
64234
|
+
deviceNative: true,
|
|
64235
|
+
mode: "singleton",
|
|
64236
|
+
deviceTypes: Object.values(DeviceType),
|
|
64237
|
+
runtimeState: StreamSignalsStatusSchema,
|
|
64238
|
+
methods: {
|
|
64239
|
+
/**
|
|
64240
|
+
* What this device can emit. Empty is a valid and common answer — most
|
|
64241
|
+
* cameras have nothing to offer here, and an empty list is what makes the
|
|
64242
|
+
* broker's picker show nothing rather than a false choice.
|
|
64243
|
+
*/
|
|
64244
|
+
listSignals: method(_void(), array(StreamSignalSchema).readonly()) }
|
|
64245
|
+
};
|
|
64166
64246
|
/** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
|
|
64167
64247
|
var StreamFormatSchema = _enum([
|
|
64168
64248
|
"webrtc",
|
|
@@ -64559,6 +64639,22 @@ var EgressTranscodeSchema = object({
|
|
|
64559
64639
|
camStreamId: string().nullable()
|
|
64560
64640
|
});
|
|
64561
64641
|
method(object({
|
|
64642
|
+
deviceId: number().int().nonnegative(),
|
|
64643
|
+
/** The provider's signal code. */
|
|
64644
|
+
code: string().min(1),
|
|
64645
|
+
/** Ms epoch. Absent ⇒ now. */
|
|
64646
|
+
at: number().optional()
|
|
64647
|
+
}), object({
|
|
64648
|
+
/** Whether the broker acted on it, and if not, why. */
|
|
64649
|
+
accepted: boolean(),
|
|
64650
|
+
reason: _enum([
|
|
64651
|
+
"woke",
|
|
64652
|
+
"hold-extended",
|
|
64653
|
+
"not-enabled",
|
|
64654
|
+
"no-consumer",
|
|
64655
|
+
"unknown-code"
|
|
64656
|
+
])
|
|
64657
|
+
}), { kind: "mutation" }), method(object({
|
|
64562
64658
|
deviceId: number().int().nonnegative(),
|
|
64563
64659
|
camStreamId: string().min(1),
|
|
64564
64660
|
kind: CamStreamKindSchema,
|
|
@@ -64813,6 +64909,16 @@ var PickStreamRequirementsSchema = object({
|
|
|
64813
64909
|
acceptCodecs: array(StreamCodecSchema).readonly().optional(),
|
|
64814
64910
|
/** Minimum vertical resolution. Streams shorter than this are dropped. */
|
|
64815
64911
|
minHeight: number().int().positive().optional(),
|
|
64912
|
+
/**
|
|
64913
|
+
* Maximum vertical resolution. Streams TALLER than this are dropped.
|
|
64914
|
+
*
|
|
64915
|
+
* A consumer can have a ceiling as real as its floor: Alexa documents
|
|
64916
|
+
* 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
|
|
64917
|
+
* Without this the ceiling had to be re-implemented by every caller — and
|
|
64918
|
+
* one caller implementing it privately is how a second scoring authority
|
|
64919
|
+
* gets born.
|
|
64920
|
+
*/
|
|
64921
|
+
maxHeight: number().int().positive().optional(),
|
|
64816
64922
|
/** Minimum horizontal resolution. */
|
|
64817
64923
|
minWidth: number().int().positive().optional(),
|
|
64818
64924
|
/**
|
|
@@ -64829,7 +64935,22 @@ var PickStreamRequirementsSchema = object({
|
|
|
64829
64935
|
* transcoded" guard: if the device is already serving the consumer's
|
|
64830
64936
|
* codec end-to-end, there's nothing to optimise.
|
|
64831
64937
|
*/
|
|
64832
|
-
requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
|
|
64938
|
+
requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
|
|
64939
|
+
/**
|
|
64940
|
+
* Whether a stream the consumer CANNOT decode may still be picked, on the
|
|
64941
|
+
* understanding that it will be transcoded.
|
|
64942
|
+
*
|
|
64943
|
+
* Default `false` — today's behaviour, and the right one for a bypass
|
|
64944
|
+
* question ("is there a stream I can forward untouched?"). Set `true` to
|
|
64945
|
+
* ask the larger question: "what is the best stream for me, transcoding if
|
|
64946
|
+
* I must?" A stream that satisfies `acceptCodecs` always outranks one that
|
|
64947
|
+
* does not, so a passthrough is never lost to a transcode; the answer says
|
|
64948
|
+
* which it is in {@link PickedCamStreamSchema.transcodes}.
|
|
64949
|
+
*
|
|
64950
|
+
* This is what lets one picker serve both the bypass and the full source
|
|
64951
|
+
* choice, instead of a consumer scoring privately when the bypass misses.
|
|
64952
|
+
*/
|
|
64953
|
+
allowTranscode: boolean().optional()
|
|
64833
64954
|
}).readonly();
|
|
64834
64955
|
var PickStreamPreferencesSchema = object({
|
|
64835
64956
|
/**
|
|
@@ -64843,12 +64964,32 @@ var PickStreamPreferencesSchema = object({
|
|
|
64843
64964
|
* picks the tallest stream; `'lowest'` picks the shortest (used by
|
|
64844
64965
|
* memory-constrained consumers / Apple Home guest sessions).
|
|
64845
64966
|
*/
|
|
64846
|
-
resolutionPreference: _enum(["highest", "lowest"]).optional()
|
|
64967
|
+
resolutionPreference: _enum(["highest", "lowest"]).optional(),
|
|
64968
|
+
/**
|
|
64969
|
+
* The height the consumer actually wants to DELIVER.
|
|
64970
|
+
*
|
|
64971
|
+
* Not a constraint — an ordering. With it set, the SMALLEST stream at or
|
|
64972
|
+
* above the target wins, and only if nothing reaches it does the tallest
|
|
64973
|
+
* take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
|
|
64974
|
+
* a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
|
|
64975
|
+
* express that: it says "as big as possible", which is a different wish.
|
|
64976
|
+
*
|
|
64977
|
+
* Ignored when absent, so every existing caller keeps its ordering.
|
|
64978
|
+
*/
|
|
64979
|
+
targetHeight: number().int().positive().optional()
|
|
64847
64980
|
}).readonly();
|
|
64848
64981
|
var PickedCamStreamSchema = object({
|
|
64849
64982
|
camStreamId: string(),
|
|
64850
64983
|
codec: string().optional(),
|
|
64851
64984
|
resolution: CamStreamResolutionSchema.optional(),
|
|
64985
|
+
/**
|
|
64986
|
+
* Whether serving this stream requires a decode + re-encode.
|
|
64987
|
+
*
|
|
64988
|
+
* `false` is a stream the consumer can take as it stands. Only ever `true`
|
|
64989
|
+
* when the caller asked for it with `allowTranscode`, so a caller that did
|
|
64990
|
+
* not ask cannot be handed a cost it never agreed to pay.
|
|
64991
|
+
*/
|
|
64992
|
+
transcodes: boolean(),
|
|
64852
64993
|
/** One-line explanation of why this stream won — for logs / debug UI. */
|
|
64853
64994
|
reason: string()
|
|
64854
64995
|
});
|
|
@@ -69382,6 +69523,8 @@ var NcSystemEventKindSchema = _enum([
|
|
|
69382
69523
|
"device-enabled",
|
|
69383
69524
|
"device-battery-low",
|
|
69384
69525
|
"device-battery-normal",
|
|
69526
|
+
"device-consumable-low",
|
|
69527
|
+
"device-consumable-normal",
|
|
69385
69528
|
"stream-online",
|
|
69386
69529
|
"stream-offline",
|
|
69387
69530
|
"node-online",
|
|
@@ -69400,6 +69543,7 @@ var NcSystemEventKindSchema = _enum([
|
|
|
69400
69543
|
"addon-updated",
|
|
69401
69544
|
"server-updated",
|
|
69402
69545
|
"export-completed",
|
|
69546
|
+
"backup-completed",
|
|
69403
69547
|
"camera-online",
|
|
69404
69548
|
"camera-offline",
|
|
69405
69549
|
"camera-disabled",
|
|
@@ -76681,10 +76825,28 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
|
|
|
76681
76825
|
}), boolean()), method(object({
|
|
76682
76826
|
deviceId: number().int().nonnegative(),
|
|
76683
76827
|
sessionId: string()
|
|
76684
|
-
}), object({
|
|
76685
|
-
|
|
76686
|
-
|
|
76687
|
-
|
|
76828
|
+
}), object({
|
|
76829
|
+
pendingRenegotiation: object({
|
|
76830
|
+
target: WebrtcStreamTargetSchema,
|
|
76831
|
+
epoch: number()
|
|
76832
|
+
}).nullable(),
|
|
76833
|
+
/**
|
|
76834
|
+
* Whether the session still EXISTS.
|
|
76835
|
+
*
|
|
76836
|
+
* A consumer that holds a resource for the life of a session needs to
|
|
76837
|
+
* be able to ask, because a session does not always end the way it
|
|
76838
|
+
* began. Measured on this hub 2026-09-13: an Echo that got stuck never
|
|
76839
|
+
* sent `SessionDisconnected`, so the Alexa exporter's
|
|
76840
|
+
* `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
|
|
76841
|
+
* H.264 transcode kept running for NOBODY for more than twenty
|
|
76842
|
+
* minutes. The WebRTC session had logged `WebRTC session closed`
|
|
76843
|
+
* minutes earlier — the broker knew; the holder had no way to ask.
|
|
76844
|
+
*
|
|
76845
|
+
* `false` for a session id the provider has never heard of, which is
|
|
76846
|
+
* the same answer as "it ended": either way nothing is holding it up.
|
|
76847
|
+
*/
|
|
76848
|
+
alive: boolean()
|
|
76849
|
+
}));
|
|
76688
76850
|
object({
|
|
76689
76851
|
/** All accessory children of the parent. */
|
|
76690
76852
|
childDeviceIds: array(number()).readonly(),
|
|
@@ -86776,6 +86938,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
86776
86938
|
smoke: smokeCapability,
|
|
86777
86939
|
streamCatalog: streamCatalogCapability,
|
|
86778
86940
|
streamParams: streamParamsCapability,
|
|
86941
|
+
streamSignals: streamSignalsCapability,
|
|
86779
86942
|
switch: switchCapability,
|
|
86780
86943
|
tamper: tamperCapability,
|
|
86781
86944
|
temperatureSensor: temperatureSensorCapability,
|
|
@@ -93349,6 +93512,12 @@ Object.freeze({
|
|
|
93349
93512
|
addonId: null,
|
|
93350
93513
|
access: "create"
|
|
93351
93514
|
},
|
|
93515
|
+
"streamBroker.reportStreamSignal": {
|
|
93516
|
+
capName: "stream-broker",
|
|
93517
|
+
capScope: "system",
|
|
93518
|
+
addonId: null,
|
|
93519
|
+
access: "create"
|
|
93520
|
+
},
|
|
93352
93521
|
"streamBroker.restartProfile": {
|
|
93353
93522
|
capName: "stream-broker",
|
|
93354
93523
|
capScope: "system",
|
|
@@ -93433,6 +93602,12 @@ Object.freeze({
|
|
|
93433
93602
|
addonId: null,
|
|
93434
93603
|
access: "create"
|
|
93435
93604
|
},
|
|
93605
|
+
"streamSignals.listSignals": {
|
|
93606
|
+
capName: "stream-signals",
|
|
93607
|
+
capScope: "device",
|
|
93608
|
+
addonId: null,
|
|
93609
|
+
access: "view"
|
|
93610
|
+
},
|
|
93436
93611
|
"switch.setState": {
|
|
93437
93612
|
capName: "switch",
|
|
93438
93613
|
capScope: "device",
|
|
@@ -95805,6 +95980,11 @@ Object.freeze({
|
|
|
95805
95980
|
form: "single",
|
|
95806
95981
|
optional: false
|
|
95807
95982
|
}],
|
|
95983
|
+
"streamBroker.reportStreamSignal": [{
|
|
95984
|
+
name: "deviceId",
|
|
95985
|
+
form: "single",
|
|
95986
|
+
optional: false
|
|
95987
|
+
}],
|
|
95808
95988
|
"streamBroker.restartProfile": [{
|
|
95809
95989
|
name: "deviceId",
|
|
95810
95990
|
form: "single",
|
package/dist/addon.mjs
CHANGED
|
@@ -52669,7 +52669,7 @@ var DreameCameraStream = class extends TypedEmitter {
|
|
|
52669
52669
|
}
|
|
52670
52670
|
};
|
|
52671
52671
|
//#endregion
|
|
52672
|
-
//#region ../types/dist/event-category-
|
|
52672
|
+
//#region ../types/dist/event-category-BVDXG4tB.mjs
|
|
52673
52673
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
52674
52674
|
EventCategory["SystemBoot"] = "system.boot";
|
|
52675
52675
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -53286,6 +53286,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
53286
53286
|
* pull-reconcile from the provider's `getStatus` on reconnect. */
|
|
53287
53287
|
EventCategory["MeshNetworkChanged"] = "network.mesh.changed";
|
|
53288
53288
|
EventCategory["BackupCompleted"] = "backup.completed";
|
|
53289
|
+
/**
|
|
53290
|
+
* A whole backup RUN finished — every destination attempted, win or lose.
|
|
53291
|
+
*
|
|
53292
|
+
* `backup.completed` fires once per DESTINATION, which is the right grain for
|
|
53293
|
+
* a progress UI and the wrong one for a notification: an operator with three
|
|
53294
|
+
* destinations would be told three times. And a run where two of three
|
|
53295
|
+
* destinations succeeded is not a clean success — a single "backup
|
|
53296
|
+
* completed" that hid the failed one would be a lie, so the count of each is
|
|
53297
|
+
* carried here and the message says both.
|
|
53298
|
+
*
|
|
53299
|
+
* Emitted by the backup orchestrator only after the destination loop, so a
|
|
53300
|
+
* run that dies during the BUILD phase produces no completion at all.
|
|
53301
|
+
*/
|
|
53302
|
+
EventCategory["BackupRunCompleted"] = "backup.run-completed";
|
|
53289
53303
|
EventCategory["BackupRestored"] = "backup.restored";
|
|
53290
53304
|
EventCategory["NotificationDispatched"] = "notification.dispatched";
|
|
53291
53305
|
EventCategory["NotificationFailed"] = "notification.failed";
|
|
@@ -58016,7 +58030,7 @@ var ZodIssueCode = {
|
|
|
58016
58030
|
var ZodFirstPartyTypeKind;
|
|
58017
58031
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
58018
58032
|
//#endregion
|
|
58019
|
-
//#region ../types/dist/sleep-
|
|
58033
|
+
//#region ../types/dist/sleep-DEuj7E3j.mjs
|
|
58020
58034
|
/**
|
|
58021
58035
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
58022
58036
|
* window to float samples (D455).
|
|
@@ -64160,6 +64174,72 @@ method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, Broke
|
|
|
64160
64174
|
auth: "admin"
|
|
64161
64175
|
}), method(GetStateInputSchema, unknown().nullable()), method(_void(), RegistryStatusSchema);
|
|
64162
64176
|
DeviceType.Camera;
|
|
64177
|
+
/**
|
|
64178
|
+
* The signals a device can emit to WAKE its own stream.
|
|
64179
|
+
*
|
|
64180
|
+
* A camera whose stream is built on demand sleeps until something asks for it,
|
|
64181
|
+
* and "something" cannot be a consumer that is merely attached — a Frigate-style
|
|
64182
|
+
* puller holds a session open for ever, and treating that as demand would keep
|
|
64183
|
+
* a battery camera awake for ever, which is the whole thing the battery is for
|
|
64184
|
+
* (D173). So the wake has to come from the CAMERA: an event it noticed by
|
|
64185
|
+
* itself, with no stream running.
|
|
64186
|
+
*
|
|
64187
|
+
* ## The vocabulary is the PROVIDER'S, not ours
|
|
64188
|
+
*
|
|
64189
|
+
* Like `consumables`, this cap declares no vocabulary of its own. A provider
|
|
64190
|
+
* names each signal with a `code` it chooses and a `label` an operator reads.
|
|
64191
|
+
* Reolink offers motion and camera-native detection; another provider may offer
|
|
64192
|
+
* a tamper, a doorbell press, a PIR, or something no camera in this fleet has
|
|
64193
|
+
* yet. A fixed enum here would mean every new signal is a framework release.
|
|
64194
|
+
*
|
|
64195
|
+
* It is deliberately NOT derived from the caps a device already binds. Whether
|
|
64196
|
+
* a camera CAN push firmware motion is expressed by `motionSources` containing
|
|
64197
|
+
* `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
|
|
64198
|
+
* binding — but both answer "what drives the detection pipeline", which is a
|
|
64199
|
+
* different question from "what may wake a sleeping stream". A camera can do
|
|
64200
|
+
* the first and not be trusted with the second, and the operator picks per
|
|
64201
|
+
* camera. Two questions, two authorities.
|
|
64202
|
+
*
|
|
64203
|
+
* ## Availability is not permission
|
|
64204
|
+
*
|
|
64205
|
+
* `listSignals` says what the device CAN emit. Whether a given signal actually
|
|
64206
|
+
* wakes the stream is the operator's per-camera choice, held by the broker
|
|
64207
|
+
* alongside the cooldown — see the stream-broker cap's wake settings. A
|
|
64208
|
+
* provider declaring a signal is not a provider enabling it.
|
|
64209
|
+
*/
|
|
64210
|
+
/** One signal a device can emit. */
|
|
64211
|
+
var StreamSignalSchema = object({
|
|
64212
|
+
/** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
|
|
64213
|
+
code: string().min(1),
|
|
64214
|
+
/** What an operator reads in the picker. The provider's own wording. */
|
|
64215
|
+
label: string().min(1),
|
|
64216
|
+
/**
|
|
64217
|
+
* Whether the provider recommends this signal ON when a camera is first set
|
|
64218
|
+
* up. A provider knows which of its signals are cheap and reliable; an
|
|
64219
|
+
* operator should not have to discover that by trial. Reolink recommends
|
|
64220
|
+
* both of its own.
|
|
64221
|
+
*/
|
|
64222
|
+
recommended: boolean()
|
|
64223
|
+
});
|
|
64224
|
+
var StreamSignalsStatusSchema = object({
|
|
64225
|
+
signals: array(StreamSignalSchema),
|
|
64226
|
+
lastFetchedAt: number()
|
|
64227
|
+
});
|
|
64228
|
+
var streamSignalsCapability = {
|
|
64229
|
+
name: "stream-signals",
|
|
64230
|
+
scope: "device",
|
|
64231
|
+
deviceNative: true,
|
|
64232
|
+
mode: "singleton",
|
|
64233
|
+
deviceTypes: Object.values(DeviceType),
|
|
64234
|
+
runtimeState: StreamSignalsStatusSchema,
|
|
64235
|
+
methods: {
|
|
64236
|
+
/**
|
|
64237
|
+
* What this device can emit. Empty is a valid and common answer — most
|
|
64238
|
+
* cameras have nothing to offer here, and an empty list is what makes the
|
|
64239
|
+
* broker's picker show nothing rather than a false choice.
|
|
64240
|
+
*/
|
|
64241
|
+
listSignals: method(_void(), array(StreamSignalSchema).readonly()) }
|
|
64242
|
+
};
|
|
64163
64243
|
/** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
|
|
64164
64244
|
var StreamFormatSchema = _enum([
|
|
64165
64245
|
"webrtc",
|
|
@@ -64556,6 +64636,22 @@ var EgressTranscodeSchema = object({
|
|
|
64556
64636
|
camStreamId: string().nullable()
|
|
64557
64637
|
});
|
|
64558
64638
|
method(object({
|
|
64639
|
+
deviceId: number().int().nonnegative(),
|
|
64640
|
+
/** The provider's signal code. */
|
|
64641
|
+
code: string().min(1),
|
|
64642
|
+
/** Ms epoch. Absent ⇒ now. */
|
|
64643
|
+
at: number().optional()
|
|
64644
|
+
}), object({
|
|
64645
|
+
/** Whether the broker acted on it, and if not, why. */
|
|
64646
|
+
accepted: boolean(),
|
|
64647
|
+
reason: _enum([
|
|
64648
|
+
"woke",
|
|
64649
|
+
"hold-extended",
|
|
64650
|
+
"not-enabled",
|
|
64651
|
+
"no-consumer",
|
|
64652
|
+
"unknown-code"
|
|
64653
|
+
])
|
|
64654
|
+
}), { kind: "mutation" }), method(object({
|
|
64559
64655
|
deviceId: number().int().nonnegative(),
|
|
64560
64656
|
camStreamId: string().min(1),
|
|
64561
64657
|
kind: CamStreamKindSchema,
|
|
@@ -64810,6 +64906,16 @@ var PickStreamRequirementsSchema = object({
|
|
|
64810
64906
|
acceptCodecs: array(StreamCodecSchema).readonly().optional(),
|
|
64811
64907
|
/** Minimum vertical resolution. Streams shorter than this are dropped. */
|
|
64812
64908
|
minHeight: number().int().positive().optional(),
|
|
64909
|
+
/**
|
|
64910
|
+
* Maximum vertical resolution. Streams TALLER than this are dropped.
|
|
64911
|
+
*
|
|
64912
|
+
* A consumer can have a ceiling as real as its floor: Alexa documents
|
|
64913
|
+
* 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
|
|
64914
|
+
* Without this the ceiling had to be re-implemented by every caller — and
|
|
64915
|
+
* one caller implementing it privately is how a second scoring authority
|
|
64916
|
+
* gets born.
|
|
64917
|
+
*/
|
|
64918
|
+
maxHeight: number().int().positive().optional(),
|
|
64813
64919
|
/** Minimum horizontal resolution. */
|
|
64814
64920
|
minWidth: number().int().positive().optional(),
|
|
64815
64921
|
/**
|
|
@@ -64826,7 +64932,22 @@ var PickStreamRequirementsSchema = object({
|
|
|
64826
64932
|
* transcoded" guard: if the device is already serving the consumer's
|
|
64827
64933
|
* codec end-to-end, there's nothing to optimise.
|
|
64828
64934
|
*/
|
|
64829
|
-
requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
|
|
64935
|
+
requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
|
|
64936
|
+
/**
|
|
64937
|
+
* Whether a stream the consumer CANNOT decode may still be picked, on the
|
|
64938
|
+
* understanding that it will be transcoded.
|
|
64939
|
+
*
|
|
64940
|
+
* Default `false` — today's behaviour, and the right one for a bypass
|
|
64941
|
+
* question ("is there a stream I can forward untouched?"). Set `true` to
|
|
64942
|
+
* ask the larger question: "what is the best stream for me, transcoding if
|
|
64943
|
+
* I must?" A stream that satisfies `acceptCodecs` always outranks one that
|
|
64944
|
+
* does not, so a passthrough is never lost to a transcode; the answer says
|
|
64945
|
+
* which it is in {@link PickedCamStreamSchema.transcodes}.
|
|
64946
|
+
*
|
|
64947
|
+
* This is what lets one picker serve both the bypass and the full source
|
|
64948
|
+
* choice, instead of a consumer scoring privately when the bypass misses.
|
|
64949
|
+
*/
|
|
64950
|
+
allowTranscode: boolean().optional()
|
|
64830
64951
|
}).readonly();
|
|
64831
64952
|
var PickStreamPreferencesSchema = object({
|
|
64832
64953
|
/**
|
|
@@ -64840,12 +64961,32 @@ var PickStreamPreferencesSchema = object({
|
|
|
64840
64961
|
* picks the tallest stream; `'lowest'` picks the shortest (used by
|
|
64841
64962
|
* memory-constrained consumers / Apple Home guest sessions).
|
|
64842
64963
|
*/
|
|
64843
|
-
resolutionPreference: _enum(["highest", "lowest"]).optional()
|
|
64964
|
+
resolutionPreference: _enum(["highest", "lowest"]).optional(),
|
|
64965
|
+
/**
|
|
64966
|
+
* The height the consumer actually wants to DELIVER.
|
|
64967
|
+
*
|
|
64968
|
+
* Not a constraint — an ordering. With it set, the SMALLEST stream at or
|
|
64969
|
+
* above the target wins, and only if nothing reaches it does the tallest
|
|
64970
|
+
* take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
|
|
64971
|
+
* a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
|
|
64972
|
+
* express that: it says "as big as possible", which is a different wish.
|
|
64973
|
+
*
|
|
64974
|
+
* Ignored when absent, so every existing caller keeps its ordering.
|
|
64975
|
+
*/
|
|
64976
|
+
targetHeight: number().int().positive().optional()
|
|
64844
64977
|
}).readonly();
|
|
64845
64978
|
var PickedCamStreamSchema = object({
|
|
64846
64979
|
camStreamId: string(),
|
|
64847
64980
|
codec: string().optional(),
|
|
64848
64981
|
resolution: CamStreamResolutionSchema.optional(),
|
|
64982
|
+
/**
|
|
64983
|
+
* Whether serving this stream requires a decode + re-encode.
|
|
64984
|
+
*
|
|
64985
|
+
* `false` is a stream the consumer can take as it stands. Only ever `true`
|
|
64986
|
+
* when the caller asked for it with `allowTranscode`, so a caller that did
|
|
64987
|
+
* not ask cannot be handed a cost it never agreed to pay.
|
|
64988
|
+
*/
|
|
64989
|
+
transcodes: boolean(),
|
|
64849
64990
|
/** One-line explanation of why this stream won — for logs / debug UI. */
|
|
64850
64991
|
reason: string()
|
|
64851
64992
|
});
|
|
@@ -69379,6 +69520,8 @@ var NcSystemEventKindSchema = _enum([
|
|
|
69379
69520
|
"device-enabled",
|
|
69380
69521
|
"device-battery-low",
|
|
69381
69522
|
"device-battery-normal",
|
|
69523
|
+
"device-consumable-low",
|
|
69524
|
+
"device-consumable-normal",
|
|
69382
69525
|
"stream-online",
|
|
69383
69526
|
"stream-offline",
|
|
69384
69527
|
"node-online",
|
|
@@ -69397,6 +69540,7 @@ var NcSystemEventKindSchema = _enum([
|
|
|
69397
69540
|
"addon-updated",
|
|
69398
69541
|
"server-updated",
|
|
69399
69542
|
"export-completed",
|
|
69543
|
+
"backup-completed",
|
|
69400
69544
|
"camera-online",
|
|
69401
69545
|
"camera-offline",
|
|
69402
69546
|
"camera-disabled",
|
|
@@ -76678,10 +76822,28 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
|
|
|
76678
76822
|
}), boolean()), method(object({
|
|
76679
76823
|
deviceId: number().int().nonnegative(),
|
|
76680
76824
|
sessionId: string()
|
|
76681
|
-
}), object({
|
|
76682
|
-
|
|
76683
|
-
|
|
76684
|
-
|
|
76825
|
+
}), object({
|
|
76826
|
+
pendingRenegotiation: object({
|
|
76827
|
+
target: WebrtcStreamTargetSchema,
|
|
76828
|
+
epoch: number()
|
|
76829
|
+
}).nullable(),
|
|
76830
|
+
/**
|
|
76831
|
+
* Whether the session still EXISTS.
|
|
76832
|
+
*
|
|
76833
|
+
* A consumer that holds a resource for the life of a session needs to
|
|
76834
|
+
* be able to ask, because a session does not always end the way it
|
|
76835
|
+
* began. Measured on this hub 2026-09-13: an Echo that got stuck never
|
|
76836
|
+
* sent `SessionDisconnected`, so the Alexa exporter's
|
|
76837
|
+
* `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
|
|
76838
|
+
* H.264 transcode kept running for NOBODY for more than twenty
|
|
76839
|
+
* minutes. The WebRTC session had logged `WebRTC session closed`
|
|
76840
|
+
* minutes earlier — the broker knew; the holder had no way to ask.
|
|
76841
|
+
*
|
|
76842
|
+
* `false` for a session id the provider has never heard of, which is
|
|
76843
|
+
* the same answer as "it ended": either way nothing is holding it up.
|
|
76844
|
+
*/
|
|
76845
|
+
alive: boolean()
|
|
76846
|
+
}));
|
|
76685
76847
|
object({
|
|
76686
76848
|
/** All accessory children of the parent. */
|
|
76687
76849
|
childDeviceIds: array(number()).readonly(),
|
|
@@ -86773,6 +86935,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
86773
86935
|
smoke: smokeCapability,
|
|
86774
86936
|
streamCatalog: streamCatalogCapability,
|
|
86775
86937
|
streamParams: streamParamsCapability,
|
|
86938
|
+
streamSignals: streamSignalsCapability,
|
|
86776
86939
|
switch: switchCapability,
|
|
86777
86940
|
tamper: tamperCapability,
|
|
86778
86941
|
temperatureSensor: temperatureSensorCapability,
|
|
@@ -93346,6 +93509,12 @@ Object.freeze({
|
|
|
93346
93509
|
addonId: null,
|
|
93347
93510
|
access: "create"
|
|
93348
93511
|
},
|
|
93512
|
+
"streamBroker.reportStreamSignal": {
|
|
93513
|
+
capName: "stream-broker",
|
|
93514
|
+
capScope: "system",
|
|
93515
|
+
addonId: null,
|
|
93516
|
+
access: "create"
|
|
93517
|
+
},
|
|
93349
93518
|
"streamBroker.restartProfile": {
|
|
93350
93519
|
capName: "stream-broker",
|
|
93351
93520
|
capScope: "system",
|
|
@@ -93430,6 +93599,12 @@ Object.freeze({
|
|
|
93430
93599
|
addonId: null,
|
|
93431
93600
|
access: "create"
|
|
93432
93601
|
},
|
|
93602
|
+
"streamSignals.listSignals": {
|
|
93603
|
+
capName: "stream-signals",
|
|
93604
|
+
capScope: "device",
|
|
93605
|
+
addonId: null,
|
|
93606
|
+
access: "view"
|
|
93607
|
+
},
|
|
93433
93608
|
"switch.setState": {
|
|
93434
93609
|
capName: "switch",
|
|
93435
93610
|
capScope: "device",
|
|
@@ -95802,6 +95977,11 @@ Object.freeze({
|
|
|
95802
95977
|
form: "single",
|
|
95803
95978
|
optional: false
|
|
95804
95979
|
}],
|
|
95980
|
+
"streamBroker.reportStreamSignal": [{
|
|
95981
|
+
name: "deviceId",
|
|
95982
|
+
form: "single",
|
|
95983
|
+
optional: false
|
|
95984
|
+
}],
|
|
95805
95985
|
"streamBroker.restartProfile": [{
|
|
95806
95986
|
name: "deviceId",
|
|
95807
95987
|
form: "single",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-dreame",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.103",
|
|
4
4
|
"description": "Dreame robot-vacuum / lawn-mower device-provider addon for CamStack — wraps the @apocaliss92/nodedreame Dreamehome cloud client",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|