@camstack/addon-provider-hikvision 1.2.109 → 1.2.110
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
|
@@ -6,7 +6,7 @@ let node_crypto = require("node:crypto");
|
|
|
6
6
|
let node_http = require("node:http");
|
|
7
7
|
let node_https = require("node:https");
|
|
8
8
|
let node_os = require("node:os");
|
|
9
|
-
//#region ../types/dist/event-category-
|
|
9
|
+
//#region ../types/dist/event-category-BVDXG4tB.mjs
|
|
10
10
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
11
11
|
EventCategory["SystemBoot"] = "system.boot";
|
|
12
12
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -623,6 +623,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
623
623
|
* pull-reconcile from the provider's `getStatus` on reconnect. */
|
|
624
624
|
EventCategory["MeshNetworkChanged"] = "network.mesh.changed";
|
|
625
625
|
EventCategory["BackupCompleted"] = "backup.completed";
|
|
626
|
+
/**
|
|
627
|
+
* A whole backup RUN finished — every destination attempted, win or lose.
|
|
628
|
+
*
|
|
629
|
+
* `backup.completed` fires once per DESTINATION, which is the right grain for
|
|
630
|
+
* a progress UI and the wrong one for a notification: an operator with three
|
|
631
|
+
* destinations would be told three times. And a run where two of three
|
|
632
|
+
* destinations succeeded is not a clean success — a single "backup
|
|
633
|
+
* completed" that hid the failed one would be a lie, so the count of each is
|
|
634
|
+
* carried here and the message says both.
|
|
635
|
+
*
|
|
636
|
+
* Emitted by the backup orchestrator only after the destination loop, so a
|
|
637
|
+
* run that dies during the BUILD phase produces no completion at all.
|
|
638
|
+
*/
|
|
639
|
+
EventCategory["BackupRunCompleted"] = "backup.run-completed";
|
|
626
640
|
EventCategory["BackupRestored"] = "backup.restored";
|
|
627
641
|
EventCategory["NotificationDispatched"] = "notification.dispatched";
|
|
628
642
|
EventCategory["NotificationFailed"] = "notification.failed";
|
|
@@ -5353,7 +5367,7 @@ var ZodIssueCode = {
|
|
|
5353
5367
|
var ZodFirstPartyTypeKind;
|
|
5354
5368
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5355
5369
|
//#endregion
|
|
5356
|
-
//#region ../types/dist/sleep-
|
|
5370
|
+
//#region ../types/dist/sleep-DEuj7E3j.mjs
|
|
5357
5371
|
/**
|
|
5358
5372
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5359
5373
|
* window to float samples (D455).
|
|
@@ -11766,6 +11780,72 @@ method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, Broke
|
|
|
11766
11780
|
auth: "admin"
|
|
11767
11781
|
}), method(GetStateInputSchema, unknown().nullable()), method(_void(), RegistryStatusSchema);
|
|
11768
11782
|
DeviceType.Camera;
|
|
11783
|
+
/**
|
|
11784
|
+
* The signals a device can emit to WAKE its own stream.
|
|
11785
|
+
*
|
|
11786
|
+
* A camera whose stream is built on demand sleeps until something asks for it,
|
|
11787
|
+
* and "something" cannot be a consumer that is merely attached — a Frigate-style
|
|
11788
|
+
* puller holds a session open for ever, and treating that as demand would keep
|
|
11789
|
+
* a battery camera awake for ever, which is the whole thing the battery is for
|
|
11790
|
+
* (D173). So the wake has to come from the CAMERA: an event it noticed by
|
|
11791
|
+
* itself, with no stream running.
|
|
11792
|
+
*
|
|
11793
|
+
* ## The vocabulary is the PROVIDER'S, not ours
|
|
11794
|
+
*
|
|
11795
|
+
* Like `consumables`, this cap declares no vocabulary of its own. A provider
|
|
11796
|
+
* names each signal with a `code` it chooses and a `label` an operator reads.
|
|
11797
|
+
* Reolink offers motion and camera-native detection; another provider may offer
|
|
11798
|
+
* a tamper, a doorbell press, a PIR, or something no camera in this fleet has
|
|
11799
|
+
* yet. A fixed enum here would mean every new signal is a framework release.
|
|
11800
|
+
*
|
|
11801
|
+
* It is deliberately NOT derived from the caps a device already binds. Whether
|
|
11802
|
+
* a camera CAN push firmware motion is expressed by `motionSources` containing
|
|
11803
|
+
* `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
|
|
11804
|
+
* binding — but both answer "what drives the detection pipeline", which is a
|
|
11805
|
+
* different question from "what may wake a sleeping stream". A camera can do
|
|
11806
|
+
* the first and not be trusted with the second, and the operator picks per
|
|
11807
|
+
* camera. Two questions, two authorities.
|
|
11808
|
+
*
|
|
11809
|
+
* ## Availability is not permission
|
|
11810
|
+
*
|
|
11811
|
+
* `listSignals` says what the device CAN emit. Whether a given signal actually
|
|
11812
|
+
* wakes the stream is the operator's per-camera choice, held by the broker
|
|
11813
|
+
* alongside the cooldown — see the stream-broker cap's wake settings. A
|
|
11814
|
+
* provider declaring a signal is not a provider enabling it.
|
|
11815
|
+
*/
|
|
11816
|
+
/** One signal a device can emit. */
|
|
11817
|
+
var StreamSignalSchema = object({
|
|
11818
|
+
/** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
|
|
11819
|
+
code: string().min(1),
|
|
11820
|
+
/** What an operator reads in the picker. The provider's own wording. */
|
|
11821
|
+
label: string().min(1),
|
|
11822
|
+
/**
|
|
11823
|
+
* Whether the provider recommends this signal ON when a camera is first set
|
|
11824
|
+
* up. A provider knows which of its signals are cheap and reliable; an
|
|
11825
|
+
* operator should not have to discover that by trial. Reolink recommends
|
|
11826
|
+
* both of its own.
|
|
11827
|
+
*/
|
|
11828
|
+
recommended: boolean()
|
|
11829
|
+
});
|
|
11830
|
+
var StreamSignalsStatusSchema = object({
|
|
11831
|
+
signals: array(StreamSignalSchema),
|
|
11832
|
+
lastFetchedAt: number()
|
|
11833
|
+
});
|
|
11834
|
+
var streamSignalsCapability = {
|
|
11835
|
+
name: "stream-signals",
|
|
11836
|
+
scope: "device",
|
|
11837
|
+
deviceNative: true,
|
|
11838
|
+
mode: "singleton",
|
|
11839
|
+
deviceTypes: Object.values(DeviceType),
|
|
11840
|
+
runtimeState: StreamSignalsStatusSchema,
|
|
11841
|
+
methods: {
|
|
11842
|
+
/**
|
|
11843
|
+
* What this device can emit. Empty is a valid and common answer — most
|
|
11844
|
+
* cameras have nothing to offer here, and an empty list is what makes the
|
|
11845
|
+
* broker's picker show nothing rather than a false choice.
|
|
11846
|
+
*/
|
|
11847
|
+
listSignals: method(_void(), array(StreamSignalSchema).readonly()) }
|
|
11848
|
+
};
|
|
11769
11849
|
/** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
|
|
11770
11850
|
var StreamFormatSchema = _enum([
|
|
11771
11851
|
"webrtc",
|
|
@@ -12162,6 +12242,22 @@ var EgressTranscodeSchema = object({
|
|
|
12162
12242
|
camStreamId: string().nullable()
|
|
12163
12243
|
});
|
|
12164
12244
|
method(object({
|
|
12245
|
+
deviceId: number().int().nonnegative(),
|
|
12246
|
+
/** The provider's signal code. */
|
|
12247
|
+
code: string().min(1),
|
|
12248
|
+
/** Ms epoch. Absent ⇒ now. */
|
|
12249
|
+
at: number().optional()
|
|
12250
|
+
}), object({
|
|
12251
|
+
/** Whether the broker acted on it, and if not, why. */
|
|
12252
|
+
accepted: boolean(),
|
|
12253
|
+
reason: _enum([
|
|
12254
|
+
"woke",
|
|
12255
|
+
"hold-extended",
|
|
12256
|
+
"not-enabled",
|
|
12257
|
+
"no-consumer",
|
|
12258
|
+
"unknown-code"
|
|
12259
|
+
])
|
|
12260
|
+
}), { kind: "mutation" }), method(object({
|
|
12165
12261
|
deviceId: number().int().nonnegative(),
|
|
12166
12262
|
camStreamId: string().min(1),
|
|
12167
12263
|
kind: CamStreamKindSchema,
|
|
@@ -12416,6 +12512,16 @@ var PickStreamRequirementsSchema = object({
|
|
|
12416
12512
|
acceptCodecs: array(StreamCodecSchema).readonly().optional(),
|
|
12417
12513
|
/** Minimum vertical resolution. Streams shorter than this are dropped. */
|
|
12418
12514
|
minHeight: number().int().positive().optional(),
|
|
12515
|
+
/**
|
|
12516
|
+
* Maximum vertical resolution. Streams TALLER than this are dropped.
|
|
12517
|
+
*
|
|
12518
|
+
* A consumer can have a ceiling as real as its floor: Alexa documents
|
|
12519
|
+
* 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
|
|
12520
|
+
* Without this the ceiling had to be re-implemented by every caller — and
|
|
12521
|
+
* one caller implementing it privately is how a second scoring authority
|
|
12522
|
+
* gets born.
|
|
12523
|
+
*/
|
|
12524
|
+
maxHeight: number().int().positive().optional(),
|
|
12419
12525
|
/** Minimum horizontal resolution. */
|
|
12420
12526
|
minWidth: number().int().positive().optional(),
|
|
12421
12527
|
/**
|
|
@@ -12432,7 +12538,22 @@ var PickStreamRequirementsSchema = object({
|
|
|
12432
12538
|
* transcoded" guard: if the device is already serving the consumer's
|
|
12433
12539
|
* codec end-to-end, there's nothing to optimise.
|
|
12434
12540
|
*/
|
|
12435
|
-
requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
|
|
12541
|
+
requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
|
|
12542
|
+
/**
|
|
12543
|
+
* Whether a stream the consumer CANNOT decode may still be picked, on the
|
|
12544
|
+
* understanding that it will be transcoded.
|
|
12545
|
+
*
|
|
12546
|
+
* Default `false` — today's behaviour, and the right one for a bypass
|
|
12547
|
+
* question ("is there a stream I can forward untouched?"). Set `true` to
|
|
12548
|
+
* ask the larger question: "what is the best stream for me, transcoding if
|
|
12549
|
+
* I must?" A stream that satisfies `acceptCodecs` always outranks one that
|
|
12550
|
+
* does not, so a passthrough is never lost to a transcode; the answer says
|
|
12551
|
+
* which it is in {@link PickedCamStreamSchema.transcodes}.
|
|
12552
|
+
*
|
|
12553
|
+
* This is what lets one picker serve both the bypass and the full source
|
|
12554
|
+
* choice, instead of a consumer scoring privately when the bypass misses.
|
|
12555
|
+
*/
|
|
12556
|
+
allowTranscode: boolean().optional()
|
|
12436
12557
|
}).readonly();
|
|
12437
12558
|
var PickStreamPreferencesSchema = object({
|
|
12438
12559
|
/**
|
|
@@ -12446,12 +12567,32 @@ var PickStreamPreferencesSchema = object({
|
|
|
12446
12567
|
* picks the tallest stream; `'lowest'` picks the shortest (used by
|
|
12447
12568
|
* memory-constrained consumers / Apple Home guest sessions).
|
|
12448
12569
|
*/
|
|
12449
|
-
resolutionPreference: _enum(["highest", "lowest"]).optional()
|
|
12570
|
+
resolutionPreference: _enum(["highest", "lowest"]).optional(),
|
|
12571
|
+
/**
|
|
12572
|
+
* The height the consumer actually wants to DELIVER.
|
|
12573
|
+
*
|
|
12574
|
+
* Not a constraint — an ordering. With it set, the SMALLEST stream at or
|
|
12575
|
+
* above the target wins, and only if nothing reaches it does the tallest
|
|
12576
|
+
* take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
|
|
12577
|
+
* a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
|
|
12578
|
+
* express that: it says "as big as possible", which is a different wish.
|
|
12579
|
+
*
|
|
12580
|
+
* Ignored when absent, so every existing caller keeps its ordering.
|
|
12581
|
+
*/
|
|
12582
|
+
targetHeight: number().int().positive().optional()
|
|
12450
12583
|
}).readonly();
|
|
12451
12584
|
var PickedCamStreamSchema = object({
|
|
12452
12585
|
camStreamId: string(),
|
|
12453
12586
|
codec: string().optional(),
|
|
12454
12587
|
resolution: CamStreamResolutionSchema.optional(),
|
|
12588
|
+
/**
|
|
12589
|
+
* Whether serving this stream requires a decode + re-encode.
|
|
12590
|
+
*
|
|
12591
|
+
* `false` is a stream the consumer can take as it stands. Only ever `true`
|
|
12592
|
+
* when the caller asked for it with `allowTranscode`, so a caller that did
|
|
12593
|
+
* not ask cannot be handed a cost it never agreed to pay.
|
|
12594
|
+
*/
|
|
12595
|
+
transcodes: boolean(),
|
|
12455
12596
|
/** One-line explanation of why this stream won — for logs / debug UI. */
|
|
12456
12597
|
reason: string()
|
|
12457
12598
|
});
|
|
@@ -16999,6 +17140,8 @@ var NcSystemEventKindSchema = _enum([
|
|
|
16999
17140
|
"device-enabled",
|
|
17000
17141
|
"device-battery-low",
|
|
17001
17142
|
"device-battery-normal",
|
|
17143
|
+
"device-consumable-low",
|
|
17144
|
+
"device-consumable-normal",
|
|
17002
17145
|
"stream-online",
|
|
17003
17146
|
"stream-offline",
|
|
17004
17147
|
"node-online",
|
|
@@ -17017,6 +17160,7 @@ var NcSystemEventKindSchema = _enum([
|
|
|
17017
17160
|
"addon-updated",
|
|
17018
17161
|
"server-updated",
|
|
17019
17162
|
"export-completed",
|
|
17163
|
+
"backup-completed",
|
|
17020
17164
|
"camera-online",
|
|
17021
17165
|
"camera-offline",
|
|
17022
17166
|
"camera-disabled",
|
|
@@ -24402,10 +24546,28 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
|
|
|
24402
24546
|
}), boolean()), method(object({
|
|
24403
24547
|
deviceId: number().int().nonnegative(),
|
|
24404
24548
|
sessionId: string()
|
|
24405
|
-
}), object({
|
|
24406
|
-
|
|
24407
|
-
|
|
24408
|
-
|
|
24549
|
+
}), object({
|
|
24550
|
+
pendingRenegotiation: object({
|
|
24551
|
+
target: WebrtcStreamTargetSchema,
|
|
24552
|
+
epoch: number()
|
|
24553
|
+
}).nullable(),
|
|
24554
|
+
/**
|
|
24555
|
+
* Whether the session still EXISTS.
|
|
24556
|
+
*
|
|
24557
|
+
* A consumer that holds a resource for the life of a session needs to
|
|
24558
|
+
* be able to ask, because a session does not always end the way it
|
|
24559
|
+
* began. Measured on this hub 2026-09-13: an Echo that got stuck never
|
|
24560
|
+
* sent `SessionDisconnected`, so the Alexa exporter's
|
|
24561
|
+
* `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
|
|
24562
|
+
* H.264 transcode kept running for NOBODY for more than twenty
|
|
24563
|
+
* minutes. The WebRTC session had logged `WebRTC session closed`
|
|
24564
|
+
* minutes earlier — the broker knew; the holder had no way to ask.
|
|
24565
|
+
*
|
|
24566
|
+
* `false` for a session id the provider has never heard of, which is
|
|
24567
|
+
* the same answer as "it ended": either way nothing is holding it up.
|
|
24568
|
+
*/
|
|
24569
|
+
alive: boolean()
|
|
24570
|
+
}));
|
|
24409
24571
|
object({
|
|
24410
24572
|
/** All accessory children of the parent. */
|
|
24411
24573
|
childDeviceIds: array(number()).readonly(),
|
|
@@ -34695,6 +34857,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
34695
34857
|
smoke: smokeCapability,
|
|
34696
34858
|
streamCatalog: streamCatalogCapability,
|
|
34697
34859
|
streamParams: streamParamsCapability,
|
|
34860
|
+
streamSignals: streamSignalsCapability,
|
|
34698
34861
|
switch: switchCapability,
|
|
34699
34862
|
tamper: tamperCapability,
|
|
34700
34863
|
temperatureSensor: temperatureSensorCapability,
|
|
@@ -41486,6 +41649,12 @@ Object.freeze({
|
|
|
41486
41649
|
addonId: null,
|
|
41487
41650
|
access: "create"
|
|
41488
41651
|
},
|
|
41652
|
+
"streamBroker.reportStreamSignal": {
|
|
41653
|
+
capName: "stream-broker",
|
|
41654
|
+
capScope: "system",
|
|
41655
|
+
addonId: null,
|
|
41656
|
+
access: "create"
|
|
41657
|
+
},
|
|
41489
41658
|
"streamBroker.restartProfile": {
|
|
41490
41659
|
capName: "stream-broker",
|
|
41491
41660
|
capScope: "system",
|
|
@@ -41570,6 +41739,12 @@ Object.freeze({
|
|
|
41570
41739
|
addonId: null,
|
|
41571
41740
|
access: "create"
|
|
41572
41741
|
},
|
|
41742
|
+
"streamSignals.listSignals": {
|
|
41743
|
+
capName: "stream-signals",
|
|
41744
|
+
capScope: "device",
|
|
41745
|
+
addonId: null,
|
|
41746
|
+
access: "view"
|
|
41747
|
+
},
|
|
41573
41748
|
"switch.setState": {
|
|
41574
41749
|
capName: "switch",
|
|
41575
41750
|
capScope: "device",
|
|
@@ -43942,6 +44117,11 @@ Object.freeze({
|
|
|
43942
44117
|
form: "single",
|
|
43943
44118
|
optional: false
|
|
43944
44119
|
}],
|
|
44120
|
+
"streamBroker.reportStreamSignal": [{
|
|
44121
|
+
name: "deviceId",
|
|
44122
|
+
form: "single",
|
|
44123
|
+
optional: false
|
|
44124
|
+
}],
|
|
43945
44125
|
"streamBroker.restartProfile": [{
|
|
43946
44126
|
name: "deviceId",
|
|
43947
44127
|
form: "single",
|
package/dist/addon.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import { networkInterfaces } from "node:os";
|
|
|
7
7
|
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
8
8
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
9
9
|
//#endregion
|
|
10
|
-
//#region ../types/dist/event-category-
|
|
10
|
+
//#region ../types/dist/event-category-BVDXG4tB.mjs
|
|
11
11
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
12
12
|
EventCategory["SystemBoot"] = "system.boot";
|
|
13
13
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -624,6 +624,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
624
624
|
* pull-reconcile from the provider's `getStatus` on reconnect. */
|
|
625
625
|
EventCategory["MeshNetworkChanged"] = "network.mesh.changed";
|
|
626
626
|
EventCategory["BackupCompleted"] = "backup.completed";
|
|
627
|
+
/**
|
|
628
|
+
* A whole backup RUN finished — every destination attempted, win or lose.
|
|
629
|
+
*
|
|
630
|
+
* `backup.completed` fires once per DESTINATION, which is the right grain for
|
|
631
|
+
* a progress UI and the wrong one for a notification: an operator with three
|
|
632
|
+
* destinations would be told three times. And a run where two of three
|
|
633
|
+
* destinations succeeded is not a clean success — a single "backup
|
|
634
|
+
* completed" that hid the failed one would be a lie, so the count of each is
|
|
635
|
+
* carried here and the message says both.
|
|
636
|
+
*
|
|
637
|
+
* Emitted by the backup orchestrator only after the destination loop, so a
|
|
638
|
+
* run that dies during the BUILD phase produces no completion at all.
|
|
639
|
+
*/
|
|
640
|
+
EventCategory["BackupRunCompleted"] = "backup.run-completed";
|
|
627
641
|
EventCategory["BackupRestored"] = "backup.restored";
|
|
628
642
|
EventCategory["NotificationDispatched"] = "notification.dispatched";
|
|
629
643
|
EventCategory["NotificationFailed"] = "notification.failed";
|
|
@@ -5354,7 +5368,7 @@ var ZodIssueCode = {
|
|
|
5354
5368
|
var ZodFirstPartyTypeKind;
|
|
5355
5369
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5356
5370
|
//#endregion
|
|
5357
|
-
//#region ../types/dist/sleep-
|
|
5371
|
+
//#region ../types/dist/sleep-DEuj7E3j.mjs
|
|
5358
5372
|
/**
|
|
5359
5373
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5360
5374
|
* window to float samples (D455).
|
|
@@ -11767,6 +11781,72 @@ method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, Broke
|
|
|
11767
11781
|
auth: "admin"
|
|
11768
11782
|
}), method(GetStateInputSchema, unknown().nullable()), method(_void(), RegistryStatusSchema);
|
|
11769
11783
|
DeviceType.Camera;
|
|
11784
|
+
/**
|
|
11785
|
+
* The signals a device can emit to WAKE its own stream.
|
|
11786
|
+
*
|
|
11787
|
+
* A camera whose stream is built on demand sleeps until something asks for it,
|
|
11788
|
+
* and "something" cannot be a consumer that is merely attached — a Frigate-style
|
|
11789
|
+
* puller holds a session open for ever, and treating that as demand would keep
|
|
11790
|
+
* a battery camera awake for ever, which is the whole thing the battery is for
|
|
11791
|
+
* (D173). So the wake has to come from the CAMERA: an event it noticed by
|
|
11792
|
+
* itself, with no stream running.
|
|
11793
|
+
*
|
|
11794
|
+
* ## The vocabulary is the PROVIDER'S, not ours
|
|
11795
|
+
*
|
|
11796
|
+
* Like `consumables`, this cap declares no vocabulary of its own. A provider
|
|
11797
|
+
* names each signal with a `code` it chooses and a `label` an operator reads.
|
|
11798
|
+
* Reolink offers motion and camera-native detection; another provider may offer
|
|
11799
|
+
* a tamper, a doorbell press, a PIR, or something no camera in this fleet has
|
|
11800
|
+
* yet. A fixed enum here would mean every new signal is a framework release.
|
|
11801
|
+
*
|
|
11802
|
+
* It is deliberately NOT derived from the caps a device already binds. Whether
|
|
11803
|
+
* a camera CAN push firmware motion is expressed by `motionSources` containing
|
|
11804
|
+
* `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
|
|
11805
|
+
* binding — but both answer "what drives the detection pipeline", which is a
|
|
11806
|
+
* different question from "what may wake a sleeping stream". A camera can do
|
|
11807
|
+
* the first and not be trusted with the second, and the operator picks per
|
|
11808
|
+
* camera. Two questions, two authorities.
|
|
11809
|
+
*
|
|
11810
|
+
* ## Availability is not permission
|
|
11811
|
+
*
|
|
11812
|
+
* `listSignals` says what the device CAN emit. Whether a given signal actually
|
|
11813
|
+
* wakes the stream is the operator's per-camera choice, held by the broker
|
|
11814
|
+
* alongside the cooldown — see the stream-broker cap's wake settings. A
|
|
11815
|
+
* provider declaring a signal is not a provider enabling it.
|
|
11816
|
+
*/
|
|
11817
|
+
/** One signal a device can emit. */
|
|
11818
|
+
var StreamSignalSchema = object({
|
|
11819
|
+
/** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
|
|
11820
|
+
code: string().min(1),
|
|
11821
|
+
/** What an operator reads in the picker. The provider's own wording. */
|
|
11822
|
+
label: string().min(1),
|
|
11823
|
+
/**
|
|
11824
|
+
* Whether the provider recommends this signal ON when a camera is first set
|
|
11825
|
+
* up. A provider knows which of its signals are cheap and reliable; an
|
|
11826
|
+
* operator should not have to discover that by trial. Reolink recommends
|
|
11827
|
+
* both of its own.
|
|
11828
|
+
*/
|
|
11829
|
+
recommended: boolean()
|
|
11830
|
+
});
|
|
11831
|
+
var StreamSignalsStatusSchema = object({
|
|
11832
|
+
signals: array(StreamSignalSchema),
|
|
11833
|
+
lastFetchedAt: number()
|
|
11834
|
+
});
|
|
11835
|
+
var streamSignalsCapability = {
|
|
11836
|
+
name: "stream-signals",
|
|
11837
|
+
scope: "device",
|
|
11838
|
+
deviceNative: true,
|
|
11839
|
+
mode: "singleton",
|
|
11840
|
+
deviceTypes: Object.values(DeviceType),
|
|
11841
|
+
runtimeState: StreamSignalsStatusSchema,
|
|
11842
|
+
methods: {
|
|
11843
|
+
/**
|
|
11844
|
+
* What this device can emit. Empty is a valid and common answer — most
|
|
11845
|
+
* cameras have nothing to offer here, and an empty list is what makes the
|
|
11846
|
+
* broker's picker show nothing rather than a false choice.
|
|
11847
|
+
*/
|
|
11848
|
+
listSignals: method(_void(), array(StreamSignalSchema).readonly()) }
|
|
11849
|
+
};
|
|
11770
11850
|
/** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
|
|
11771
11851
|
var StreamFormatSchema = _enum([
|
|
11772
11852
|
"webrtc",
|
|
@@ -12163,6 +12243,22 @@ var EgressTranscodeSchema = object({
|
|
|
12163
12243
|
camStreamId: string().nullable()
|
|
12164
12244
|
});
|
|
12165
12245
|
method(object({
|
|
12246
|
+
deviceId: number().int().nonnegative(),
|
|
12247
|
+
/** The provider's signal code. */
|
|
12248
|
+
code: string().min(1),
|
|
12249
|
+
/** Ms epoch. Absent ⇒ now. */
|
|
12250
|
+
at: number().optional()
|
|
12251
|
+
}), object({
|
|
12252
|
+
/** Whether the broker acted on it, and if not, why. */
|
|
12253
|
+
accepted: boolean(),
|
|
12254
|
+
reason: _enum([
|
|
12255
|
+
"woke",
|
|
12256
|
+
"hold-extended",
|
|
12257
|
+
"not-enabled",
|
|
12258
|
+
"no-consumer",
|
|
12259
|
+
"unknown-code"
|
|
12260
|
+
])
|
|
12261
|
+
}), { kind: "mutation" }), method(object({
|
|
12166
12262
|
deviceId: number().int().nonnegative(),
|
|
12167
12263
|
camStreamId: string().min(1),
|
|
12168
12264
|
kind: CamStreamKindSchema,
|
|
@@ -12417,6 +12513,16 @@ var PickStreamRequirementsSchema = object({
|
|
|
12417
12513
|
acceptCodecs: array(StreamCodecSchema).readonly().optional(),
|
|
12418
12514
|
/** Minimum vertical resolution. Streams shorter than this are dropped. */
|
|
12419
12515
|
minHeight: number().int().positive().optional(),
|
|
12516
|
+
/**
|
|
12517
|
+
* Maximum vertical resolution. Streams TALLER than this are dropped.
|
|
12518
|
+
*
|
|
12519
|
+
* A consumer can have a ceiling as real as its floor: Alexa documents
|
|
12520
|
+
* 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
|
|
12521
|
+
* Without this the ceiling had to be re-implemented by every caller — and
|
|
12522
|
+
* one caller implementing it privately is how a second scoring authority
|
|
12523
|
+
* gets born.
|
|
12524
|
+
*/
|
|
12525
|
+
maxHeight: number().int().positive().optional(),
|
|
12420
12526
|
/** Minimum horizontal resolution. */
|
|
12421
12527
|
minWidth: number().int().positive().optional(),
|
|
12422
12528
|
/**
|
|
@@ -12433,7 +12539,22 @@ var PickStreamRequirementsSchema = object({
|
|
|
12433
12539
|
* transcoded" guard: if the device is already serving the consumer's
|
|
12434
12540
|
* codec end-to-end, there's nothing to optimise.
|
|
12435
12541
|
*/
|
|
12436
|
-
requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
|
|
12542
|
+
requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
|
|
12543
|
+
/**
|
|
12544
|
+
* Whether a stream the consumer CANNOT decode may still be picked, on the
|
|
12545
|
+
* understanding that it will be transcoded.
|
|
12546
|
+
*
|
|
12547
|
+
* Default `false` — today's behaviour, and the right one for a bypass
|
|
12548
|
+
* question ("is there a stream I can forward untouched?"). Set `true` to
|
|
12549
|
+
* ask the larger question: "what is the best stream for me, transcoding if
|
|
12550
|
+
* I must?" A stream that satisfies `acceptCodecs` always outranks one that
|
|
12551
|
+
* does not, so a passthrough is never lost to a transcode; the answer says
|
|
12552
|
+
* which it is in {@link PickedCamStreamSchema.transcodes}.
|
|
12553
|
+
*
|
|
12554
|
+
* This is what lets one picker serve both the bypass and the full source
|
|
12555
|
+
* choice, instead of a consumer scoring privately when the bypass misses.
|
|
12556
|
+
*/
|
|
12557
|
+
allowTranscode: boolean().optional()
|
|
12437
12558
|
}).readonly();
|
|
12438
12559
|
var PickStreamPreferencesSchema = object({
|
|
12439
12560
|
/**
|
|
@@ -12447,12 +12568,32 @@ var PickStreamPreferencesSchema = object({
|
|
|
12447
12568
|
* picks the tallest stream; `'lowest'` picks the shortest (used by
|
|
12448
12569
|
* memory-constrained consumers / Apple Home guest sessions).
|
|
12449
12570
|
*/
|
|
12450
|
-
resolutionPreference: _enum(["highest", "lowest"]).optional()
|
|
12571
|
+
resolutionPreference: _enum(["highest", "lowest"]).optional(),
|
|
12572
|
+
/**
|
|
12573
|
+
* The height the consumer actually wants to DELIVER.
|
|
12574
|
+
*
|
|
12575
|
+
* Not a constraint — an ordering. With it set, the SMALLEST stream at or
|
|
12576
|
+
* above the target wins, and only if nothing reaches it does the tallest
|
|
12577
|
+
* take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
|
|
12578
|
+
* a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
|
|
12579
|
+
* express that: it says "as big as possible", which is a different wish.
|
|
12580
|
+
*
|
|
12581
|
+
* Ignored when absent, so every existing caller keeps its ordering.
|
|
12582
|
+
*/
|
|
12583
|
+
targetHeight: number().int().positive().optional()
|
|
12451
12584
|
}).readonly();
|
|
12452
12585
|
var PickedCamStreamSchema = object({
|
|
12453
12586
|
camStreamId: string(),
|
|
12454
12587
|
codec: string().optional(),
|
|
12455
12588
|
resolution: CamStreamResolutionSchema.optional(),
|
|
12589
|
+
/**
|
|
12590
|
+
* Whether serving this stream requires a decode + re-encode.
|
|
12591
|
+
*
|
|
12592
|
+
* `false` is a stream the consumer can take as it stands. Only ever `true`
|
|
12593
|
+
* when the caller asked for it with `allowTranscode`, so a caller that did
|
|
12594
|
+
* not ask cannot be handed a cost it never agreed to pay.
|
|
12595
|
+
*/
|
|
12596
|
+
transcodes: boolean(),
|
|
12456
12597
|
/** One-line explanation of why this stream won — for logs / debug UI. */
|
|
12457
12598
|
reason: string()
|
|
12458
12599
|
});
|
|
@@ -17000,6 +17141,8 @@ var NcSystemEventKindSchema = _enum([
|
|
|
17000
17141
|
"device-enabled",
|
|
17001
17142
|
"device-battery-low",
|
|
17002
17143
|
"device-battery-normal",
|
|
17144
|
+
"device-consumable-low",
|
|
17145
|
+
"device-consumable-normal",
|
|
17003
17146
|
"stream-online",
|
|
17004
17147
|
"stream-offline",
|
|
17005
17148
|
"node-online",
|
|
@@ -17018,6 +17161,7 @@ var NcSystemEventKindSchema = _enum([
|
|
|
17018
17161
|
"addon-updated",
|
|
17019
17162
|
"server-updated",
|
|
17020
17163
|
"export-completed",
|
|
17164
|
+
"backup-completed",
|
|
17021
17165
|
"camera-online",
|
|
17022
17166
|
"camera-offline",
|
|
17023
17167
|
"camera-disabled",
|
|
@@ -24403,10 +24547,28 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
|
|
|
24403
24547
|
}), boolean()), method(object({
|
|
24404
24548
|
deviceId: number().int().nonnegative(),
|
|
24405
24549
|
sessionId: string()
|
|
24406
|
-
}), object({
|
|
24407
|
-
|
|
24408
|
-
|
|
24409
|
-
|
|
24550
|
+
}), object({
|
|
24551
|
+
pendingRenegotiation: object({
|
|
24552
|
+
target: WebrtcStreamTargetSchema,
|
|
24553
|
+
epoch: number()
|
|
24554
|
+
}).nullable(),
|
|
24555
|
+
/**
|
|
24556
|
+
* Whether the session still EXISTS.
|
|
24557
|
+
*
|
|
24558
|
+
* A consumer that holds a resource for the life of a session needs to
|
|
24559
|
+
* be able to ask, because a session does not always end the way it
|
|
24560
|
+
* began. Measured on this hub 2026-09-13: an Echo that got stuck never
|
|
24561
|
+
* sent `SessionDisconnected`, so the Alexa exporter's
|
|
24562
|
+
* `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
|
|
24563
|
+
* H.264 transcode kept running for NOBODY for more than twenty
|
|
24564
|
+
* minutes. The WebRTC session had logged `WebRTC session closed`
|
|
24565
|
+
* minutes earlier — the broker knew; the holder had no way to ask.
|
|
24566
|
+
*
|
|
24567
|
+
* `false` for a session id the provider has never heard of, which is
|
|
24568
|
+
* the same answer as "it ended": either way nothing is holding it up.
|
|
24569
|
+
*/
|
|
24570
|
+
alive: boolean()
|
|
24571
|
+
}));
|
|
24410
24572
|
object({
|
|
24411
24573
|
/** All accessory children of the parent. */
|
|
24412
24574
|
childDeviceIds: array(number()).readonly(),
|
|
@@ -34696,6 +34858,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
34696
34858
|
smoke: smokeCapability,
|
|
34697
34859
|
streamCatalog: streamCatalogCapability,
|
|
34698
34860
|
streamParams: streamParamsCapability,
|
|
34861
|
+
streamSignals: streamSignalsCapability,
|
|
34699
34862
|
switch: switchCapability,
|
|
34700
34863
|
tamper: tamperCapability,
|
|
34701
34864
|
temperatureSensor: temperatureSensorCapability,
|
|
@@ -41487,6 +41650,12 @@ Object.freeze({
|
|
|
41487
41650
|
addonId: null,
|
|
41488
41651
|
access: "create"
|
|
41489
41652
|
},
|
|
41653
|
+
"streamBroker.reportStreamSignal": {
|
|
41654
|
+
capName: "stream-broker",
|
|
41655
|
+
capScope: "system",
|
|
41656
|
+
addonId: null,
|
|
41657
|
+
access: "create"
|
|
41658
|
+
},
|
|
41490
41659
|
"streamBroker.restartProfile": {
|
|
41491
41660
|
capName: "stream-broker",
|
|
41492
41661
|
capScope: "system",
|
|
@@ -41571,6 +41740,12 @@ Object.freeze({
|
|
|
41571
41740
|
addonId: null,
|
|
41572
41741
|
access: "create"
|
|
41573
41742
|
},
|
|
41743
|
+
"streamSignals.listSignals": {
|
|
41744
|
+
capName: "stream-signals",
|
|
41745
|
+
capScope: "device",
|
|
41746
|
+
addonId: null,
|
|
41747
|
+
access: "view"
|
|
41748
|
+
},
|
|
41574
41749
|
"switch.setState": {
|
|
41575
41750
|
capName: "switch",
|
|
41576
41751
|
capScope: "device",
|
|
@@ -43943,6 +44118,11 @@ Object.freeze({
|
|
|
43943
44118
|
form: "single",
|
|
43944
44119
|
optional: false
|
|
43945
44120
|
}],
|
|
44121
|
+
"streamBroker.reportStreamSignal": [{
|
|
44122
|
+
name: "deviceId",
|
|
44123
|
+
form: "single",
|
|
44124
|
+
optional: false
|
|
44125
|
+
}],
|
|
43946
44126
|
"streamBroker.restartProfile": [{
|
|
43947
44127
|
name: "deviceId",
|
|
43948
44128
|
form: "single",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-hikvision",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.110",
|
|
4
4
|
"description": "Hikvision camera device provider addon for CamStack — ISAPI over HTTP(S) with digest auth (snapshot, alarm stream, RTSP discovery)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|