@camstack/addon-provider-reolink 1.2.168 → 1.2.169
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 +94 -94
- package/dist/addon.mjs +94 -94
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -7503,7 +7503,7 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
7503
7503
|
return DeviceRole;
|
|
7504
7504
|
}({});
|
|
7505
7505
|
//#endregion
|
|
7506
|
-
//#region ../types/dist/composition-
|
|
7506
|
+
//#region ../types/dist/composition-D7ULvLdD.mjs
|
|
7507
7507
|
/**
|
|
7508
7508
|
* The ffmpeg build every CamStack node downloads, per platform and arch.
|
|
7509
7509
|
*
|
|
@@ -7557,20 +7557,20 @@ function portable(target) {
|
|
|
7557
7557
|
}
|
|
7558
7558
|
portable("linux64"), portable("linuxarm64"), portable("macarm64"), portable("mac64");
|
|
7559
7559
|
/**
|
|
7560
|
-
*
|
|
7561
|
-
*
|
|
7560
|
+
* THE table "which boolean of this device type counts as HIGH", and the
|
|
7561
|
+
* pure evaluator of its EDGE.
|
|
7562
7562
|
*
|
|
7563
|
-
*
|
|
7564
|
-
*
|
|
7565
|
-
*
|
|
7566
|
-
*
|
|
7567
|
-
*
|
|
7568
|
-
*
|
|
7563
|
+
* ONE table for everyone who asks "is this device HIGH?": the
|
|
7564
|
+
* recorder's `RecordingTriggers.sensorDeviceIds` trigger, the post-analysis
|
|
7565
|
+
* sensor markers, the orchestrator's camera-sensors bridge and
|
|
7566
|
+
* the sources of a composite doorbell (`doorbellFeatureSources`, D671).
|
|
7567
|
+
* A second copy would diverge at the first cap added, and the symptom — "the
|
|
7568
|
+
* sensor rings the doorbell but does not record" — is exactly D62.
|
|
7569
7569
|
*
|
|
7570
|
-
* ⚠
|
|
7571
|
-
*
|
|
7572
|
-
*
|
|
7573
|
-
*
|
|
7570
|
+
* ⚠ NOT `DEVICE_STATE_READERS` (`catalogs/device-state-vocabulary.ts`), and the
|
|
7571
|
+
* two must not be unified: that one answers "what is the state WORD for a
|
|
7572
|
+
* rule" (and includes `presence`, `cover`, `alarm-panel`), this one "which
|
|
7573
|
+
* boolean's EDGE counts". Deliberately different vocabularies.
|
|
7574
7574
|
*/
|
|
7575
7575
|
/**
|
|
7576
7576
|
* Known binary / switch source caps → the boolean slice field whose
|
|
@@ -9197,22 +9197,22 @@ var CLASS_MAP_MACRO_TARGETS = [
|
|
|
9197
9197
|
"package"
|
|
9198
9198
|
];
|
|
9199
9199
|
/**
|
|
9200
|
-
*
|
|
9201
|
-
*
|
|
9200
|
+
* The FIRST-LEVEL macro classes: those an object detector emits and that
|
|
9201
|
+
* an operator can select.
|
|
9202
9202
|
*
|
|
9203
|
-
*
|
|
9203
|
+
* They are the three offered by the `object-detection` step
|
|
9204
9204
|
* (`addon-pipeline/src/detection-pipeline/registry/step-definitions.ts`,
|
|
9205
|
-
* `enabledMacroClasses`). `package`
|
|
9206
|
-
* `MACRO_LABELS` —
|
|
9207
|
-
* `package-detection`,
|
|
9208
|
-
*
|
|
9205
|
+
* `enabledMacroClasses`). `package` is in {@link CLASS_MAP_MACRO_TARGETS} and in
|
|
9206
|
+
* `MACRO_LABELS` — it is a true macro — but NOT here: it belongs to the step
|
|
9207
|
+
* `package-detection`, whose enablement is driven by zones, and offering the
|
|
9208
|
+
* same word twice has already made an operator turn on the COCO proxy
|
|
9209
9209
|
* (suitcase/backpack/handbag) lasciando spento il detector dedicato.
|
|
9210
9210
|
*
|
|
9211
|
-
*
|
|
9212
|
-
*
|
|
9213
|
-
* (`types/detection.ts`);
|
|
9214
|
-
* (`RecordingTriggers.objectClasses`)
|
|
9215
|
-
*
|
|
9211
|
+
* ONE list. Before today the same three were hand-written in the step's offer
|
|
9212
|
+
* and a second time as the union `FirstLevelMacro`
|
|
9213
|
+
* (`types/detection.ts`); a third copy for the recording trigger
|
|
9214
|
+
* (`RecordingTriggers.objectClasses`) would have made the later divergence
|
|
9215
|
+
* invisible.
|
|
9216
9216
|
*/
|
|
9217
9217
|
var FIRST_LEVEL_MACRO_CLASSES = [
|
|
9218
9218
|
"person",
|
|
@@ -9277,17 +9277,17 @@ var RecordingStorageModeSchema = _enum([
|
|
|
9277
9277
|
"on-device-decision"
|
|
9278
9278
|
]);
|
|
9279
9279
|
/**
|
|
9280
|
-
*
|
|
9281
|
-
*
|
|
9280
|
+
* The macro classes that can open a recording window — the same
|
|
9281
|
+
* three offered by the `object-detection` step, from ONE list
|
|
9282
9282
|
* ({@link FIRST_LEVEL_MACRO_CLASSES}).
|
|
9283
9283
|
*/
|
|
9284
9284
|
var RecordingObjectTriggerClassSchema = _enum(FIRST_LEVEL_MACRO_CLASSES);
|
|
9285
9285
|
/**
|
|
9286
|
-
* True
|
|
9286
|
+
* True when `values` does not repeat an element.
|
|
9287
9287
|
*
|
|
9288
|
-
*
|
|
9289
|
-
*
|
|
9290
|
-
*
|
|
9288
|
+
* A duplicate is not harmless: every entry of `objectClasses` / `sensorDeviceIds`
|
|
9289
|
+
* becomes a SOURCE in `bandTriggerSources`, and the same source twice
|
|
9290
|
+
* would count its windows twice in `segmentMissedByMs`.
|
|
9291
9291
|
*/
|
|
9292
9292
|
var noDuplicates = (values) => new Set(values).size === values.length;
|
|
9293
9293
|
/** Which detectors trigger an `events`-mode band. */
|
|
@@ -9295,34 +9295,34 @@ var RecordingTriggersSchema = object({
|
|
|
9295
9295
|
motion: boolean().optional(),
|
|
9296
9296
|
audioThresholdDbfs: number().optional(),
|
|
9297
9297
|
/**
|
|
9298
|
-
*
|
|
9299
|
-
*
|
|
9300
|
-
*
|
|
9301
|
-
*
|
|
9298
|
+
* The macro classes whose detection opens a window. ABSENT = the source
|
|
9299
|
+
* is not listened to; an EMPTY array is rejected, because "events band, object
|
|
9300
|
+
* trigger on, no class" is the same shape "enabled and records
|
|
9301
|
+
* nothing, forever" that `eventsBandCanEverDemand` is written against.
|
|
9302
9302
|
*
|
|
9303
|
-
*
|
|
9304
|
-
*
|
|
9305
|
-
* `minConfidence<Macro>`
|
|
9306
|
-
* (`source: 'onboard'`)
|
|
9307
|
-
*
|
|
9303
|
+
* The signal read is ALREADY FILTERED: only `source: 'pipeline'` detections, i.e.
|
|
9304
|
+
* those that went through `enabledMacroClasses`, the
|
|
9305
|
+
* `minConfidence<Macro>` and the full-frame guard. The camera's onboard AI
|
|
9306
|
+
* (`source: 'onboard'`) goes through none of those gates and does NOT open
|
|
9307
|
+
* windows — see `recorder/object-trigger.ts`.
|
|
9308
9308
|
*/
|
|
9309
9309
|
objectClasses: array(RecordingObjectTriggerClassSchema).min(1).refine(noDuplicates, { message: "objectClasses must not repeat a class" }).optional(),
|
|
9310
9310
|
/**
|
|
9311
|
-
*
|
|
9312
|
-
*
|
|
9311
|
+
* The LINKED devices whose RISING EDGE opens a window. Absent = the source
|
|
9312
|
+
* is not listened to; an empty array is rejected for the same reason as
|
|
9313
9313
|
* `objectClasses`.
|
|
9314
9314
|
*
|
|
9315
|
-
*
|
|
9316
|
-
*
|
|
9317
|
-
*
|
|
9318
|
-
*
|
|
9319
|
-
* device (D12) —
|
|
9315
|
+
* These are SOURCE device ids, not cameras: the band names them, so the
|
|
9316
|
+
* hot path (`DeviceStateChanged`, at bus rate across the whole fleet)
|
|
9317
|
+
* does no RPC. The OFFER from which the operator picks them is another question, and
|
|
9318
|
+
* is resolved with `deviceManager.getLinkedDevices` + `getBindingsBatch` per
|
|
9319
|
+
* device (D12) — never a global list of caps.
|
|
9320
9320
|
*
|
|
9321
|
-
*
|
|
9322
|
-
* `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`)
|
|
9323
|
-
*
|
|
9324
|
-
*
|
|
9325
|
-
*
|
|
9321
|
+
* What "high" means depends on the device TYPE and is not decided here:
|
|
9322
|
+
* `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`) is THE table,
|
|
9323
|
+
* the same one as the composite doorbell (D671). And it is the EDGE, not
|
|
9324
|
+
* the level: a contact found already open at runner restart does not
|
|
9325
|
+
* record.
|
|
9326
9326
|
*/
|
|
9327
9327
|
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
9328
9328
|
});
|
|
@@ -10574,7 +10574,7 @@ function findTimezone(id) {
|
|
|
10574
10574
|
* - **VALUE** — at which level, for which scope, until when. That stays ONE
|
|
10575
10575
|
* thing: the logging settings document on the `system` cap. Two authorities
|
|
10576
10576
|
* over the values is the exact defect
|
|
10577
|
-
* `docs/design/plans/2026-08-26-
|
|
10577
|
+
* `docs/design/plans/2026-08-26-per-component-logging.md` was written to
|
|
10578
10578
|
* remove; re-introducing it from the cure side would be grotesque.
|
|
10579
10579
|
*
|
|
10580
10580
|
* Nothing in this file reads a clock, an env var or a store. The registry is
|
|
@@ -14486,7 +14486,7 @@ method(_void(), EngineInfoSchema, { auth: "admin" }), method(object({
|
|
|
14486
14486
|
*
|
|
14487
14487
|
* ⚠ An earlier version of this comment blamed Zod stripping, and that
|
|
14488
14488
|
* was wrong — corrected 2026-08-26 after the hop map
|
|
14489
|
-
* (`docs/design/2026-08-26-
|
|
14489
|
+
* (`docs/design/2026-08-26-topic-hop-map.md`) traced the path.
|
|
14490
14490
|
* There is **no Zod parse at all** between the door and the engine: the
|
|
14491
14491
|
* dispatcher forwards the payload verbatim and UDS carries it whole. A
|
|
14492
14492
|
* field declared here reaches `SqliteSettingsBackend` either way.
|
|
@@ -16689,7 +16689,7 @@ method(object({
|
|
|
16689
16689
|
* per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
|
|
16690
16690
|
* ends in a log line, and a log line is the thing the operator asked to stop
|
|
16691
16691
|
* needing: *"possiamo armare questi errori intanto? Così al prossimo giro
|
|
16692
|
-
* ricontrolliamo tutti questi punti"
|
|
16692
|
+
* ricontrolliamo tutti questi punti"* [can we instrument these errors in the meantime? That way next round we recheck all these points]. Reading them meant grepping Loki and
|
|
16693
16693
|
* hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
|
|
16694
16694
|
* media blackout were both diagnosed. The counters stay; this is where they can
|
|
16695
16695
|
* be READ.
|
|
@@ -22436,14 +22436,14 @@ var TrackSchema = object({
|
|
|
22436
22436
|
* `derive-returned-null tile=standin`,
|
|
22437
22437
|
* `native-tile tile=native no-key-frame-at-close`, …) written at close and
|
|
22438
22438
|
* CLEARED by the late-keyFrame upgrade when a native tile lands after all.
|
|
22439
|
-
* The operator-facing answer to "perché manca l'immagine?" on a track whose
|
|
22439
|
+
* The operator-facing answer to "perché manca l'immagine?" [why is the image missing?] on a track whose
|
|
22440
22440
|
* tile is a face/plate stand-in, a raster crop, or an icon.
|
|
22441
22441
|
*
|
|
22442
22442
|
* **`no-key-frame-at-close` (D400).** The line used to be written ONLY when
|
|
22443
22443
|
* the TILE ranked below native, so a track whose thumbnail landed natively
|
|
22444
22444
|
* while its key frame missed carried no reason at all — three of the four
|
|
22445
22445
|
* `MISSING_KEYFRAME` tracks in the 2026-09-07 operator audit were exactly
|
|
22446
|
-
* that shape, and their "niente ultimo" had no cause anywhere on the row.
|
|
22446
|
+
* that shape, and their "niente ultimo" [no last frame] had no cause anywhere on the row.
|
|
22447
22447
|
* The key frame is the head of a cascade (`keyFrame ⇒ keyFrameSmall ⇒ the
|
|
22448
22448
|
* lastFrame copy source`), so its absence is now on this line whatever the
|
|
22449
22449
|
* tile ended up being.
|
|
@@ -22530,7 +22530,7 @@ var MotionEventSchema = object({
|
|
|
22530
22530
|
/**
|
|
22531
22531
|
* Ms offsets from `timestamp` (the episode's own first rising edge, so the
|
|
22532
22532
|
* first entry is always `0`) of every genuine off→on transition the
|
|
22533
|
-
* episode saw — "ogni evento on si deve salvare" (D475). NOT one entry per
|
|
22533
|
+
* episode saw — "ogni evento on si deve salvare" [every ON event must be saved] (D475). NOT one entry per
|
|
22534
22534
|
* push: a firmware source that keepalives at ~1 Hz for the whole burst
|
|
22535
22535
|
* (Reolink, Hikvision) produces exactly one edge; a source that reports an
|
|
22536
22536
|
* explicit `false` mid-episode and then resumes before the quiet window
|
|
@@ -27987,7 +27987,7 @@ var ClipPlaybackSchema = object({
|
|
|
27987
27987
|
* **One authorised yes is one wake.** `next-natural` — take the clip the next
|
|
27988
27988
|
* time the camera is awake for its own reasons — is deliberately not a member:
|
|
27989
27989
|
* it was proposed, it is free on the battery, and the operator declined it on
|
|
27990
|
-
* 2026-09-20 (*"Quando un export viene richiesto si sveglia la camera."
|
|
27990
|
+
* 2026-09-20 (*"Quando un export viene richiesto si sveglia la camera."* [When an export is requested the camera wakes up],
|
|
27991
27991
|
* D558 "Considered and not taken").
|
|
27992
27992
|
*/
|
|
27993
27993
|
var ClipWakeSchema = _enum(["authorised"]);
|
|
@@ -28383,7 +28383,7 @@ var videoclipsCapability = {
|
|
|
28383
28383
|
* **It is a SECTION of the Recording tab, at the end of it — not a tab of
|
|
28384
28384
|
* its own.** It shipped as a `clips` top-tab and the operator rejected the
|
|
28385
28385
|
* placement: *"utilizzerei la stessa tab recordings, lì abbiamo già tutto il
|
|
28386
|
-
* necessario, una nuova sezione alla fine per le clips"
|
|
28386
|
+
* necessario, una nuova sezione alla fine per le clips"* [I would use the same recordings tab, there we already have everything necessary, a new section at the end for the clips]. The Recording tab
|
|
28387
28387
|
* already holds the recorder's panel, the schedule bands and the unified
|
|
28388
28388
|
* retention policy; footage the camera itself holds is the same question,
|
|
28389
28389
|
* asked of a different store. `order: 100` puts it after all of them with
|
|
@@ -28444,7 +28444,7 @@ var videoclipsCapability = {
|
|
|
28444
28444
|
* It replaced `sources?: string[]`, a VIEW filter over source ids that
|
|
28445
28445
|
* assumed the answer was a fan-out over everything a camera has. The
|
|
28446
28446
|
* operator settled otherwise on 2026-09-20 — *"l'utilizzatore è uno
|
|
28447
|
-
* solo"* — so the list is asked of one provider at a time and there is
|
|
28447
|
+
* solo"* [there is only one user] — so the list is asked of one provider at a time and there is
|
|
28448
28448
|
* nothing to filter out of it.
|
|
28449
28449
|
*/
|
|
28450
28450
|
provider: string().min(1)
|
|
@@ -36765,7 +36765,7 @@ var ReadGopBytesResultSchema = object({
|
|
|
36765
36765
|
/**
|
|
36766
36766
|
* A time WINDOW of one finalized segment, cut by byte range — the multi-GOP
|
|
36767
36767
|
* twin of {@link ReadGopBytesResultSchema}'s single instant. Built for the
|
|
36768
|
-
* replay clip's `recording` source (`docs/design/plans/2026-08-26-replay-
|
|
36768
|
+
* replay clip's `recording` source (`docs/design/plans/2026-08-26-clip-replay-on-pipeline.md`):
|
|
36769
36769
|
* a replay needs several seconds of native pixels, not one frame.
|
|
36770
36770
|
*
|
|
36771
36771
|
* `ok.data` is standalone-demuxable, same as a GOP read. `ok.reachesRequestedEnd`
|
|
@@ -53467,7 +53467,7 @@ var PreviewTextField = string().max(200);
|
|
|
53467
53467
|
* Whether the notification's preview is a STILL or a short animation.
|
|
53468
53468
|
*
|
|
53469
53469
|
* The operator's ask, verbatim: *"inviato come gif o video (come per le altre
|
|
53470
|
-
* rule)"* — the other rules already offer an animated preview, and a ten-hour
|
|
53470
|
+
* rule)"* [sent as a gif or video (as for the other rules)] — the other rules already offer an animated preview, and a ten-hour
|
|
53471
53471
|
* night reads better as three seconds of motion than as one frame of it. Both
|
|
53472
53472
|
* modes get the SAME treatment (blurred frame, large centred title); `'gif'`
|
|
53473
53473
|
* simply applies it to a dozen frames sampled across the render and assembles
|
|
@@ -161136,37 +161136,37 @@ function buildOnboardWrites(patch, schedule) {
|
|
|
161136
161136
|
//#endregion
|
|
161137
161137
|
//#region src/battery-charging.ts
|
|
161138
161138
|
/**
|
|
161139
|
-
*
|
|
161140
|
-
*
|
|
161141
|
-
*
|
|
161142
|
-
*
|
|
161143
|
-
*
|
|
161144
|
-
* - `adapterStatus` —
|
|
161145
|
-
* (
|
|
161146
|
-
*
|
|
161147
|
-
* `mapHubAdapterStatus` in `reolink-hub.ts`),
|
|
161148
|
-
*
|
|
161149
|
-
* - `chargeStatus` —
|
|
161150
|
-
* 2
|
|
161151
|
-
*
|
|
161152
|
-
*
|
|
161153
|
-
*
|
|
161154
|
-
*
|
|
161155
|
-
*
|
|
161156
|
-
* 1, firmware 2026)
|
|
161157
|
-
*
|
|
161158
|
-
*
|
|
161159
|
-
*
|
|
161160
|
-
* 2026-09-05
|
|
161161
|
-
*
|
|
161162
|
-
*
|
|
161163
|
-
*
|
|
161164
|
-
*
|
|
161165
|
-
*
|
|
161166
|
-
* `'unknown'` —
|
|
161167
|
-
* `nullable` (D315).
|
|
161168
|
-
* push
|
|
161169
|
-
*
|
|
161139
|
+
* From `adapterStatus` + `chargeStatus` to the power source.
|
|
161140
|
+
*
|
|
161141
|
+
* The two fields answer TWO different questions, and confusing them is the bug that
|
|
161142
|
+
* this module exists to close:
|
|
161143
|
+
*
|
|
161144
|
+
* - `adapterStatus` — is the power CONNECTED? The firmware sends 0/1/2
|
|
161145
|
+
* (none · DC adapter · solar panel) and the hub boundary
|
|
161146
|
+
* translates it into `'none' | 'dc' | 'solarPanel'` (`mapHubChargeStatus` and
|
|
161147
|
+
* `mapHubAdapterStatus` in `reolink-hub.ts`), because the vocabulary of the
|
|
161148
|
+
* standalone path is already strings.
|
|
161149
|
+
* - `chargeStatus` — what is the CELL doing? 0 stopped · 1 charging ·
|
|
161150
|
+
* 2 fully charged.
|
|
161151
|
+
*
|
|
161152
|
+
* The old derivation consulted the adapter ONLY to look for 'solar' in it, and
|
|
161153
|
+
* a connected DC fell into the fallback `'none'`. Two Argus 3E units hid it by
|
|
161154
|
+
* chance: full and connected they answer `chargeStatus: 2`, which the `isCharging`
|
|
161155
|
+
* branch mapped to `'dc'` for the wrong reason. The Argus MagiCam (batteryVersion
|
|
161156
|
+
* 1, firmware 2026) permanently connected answers `chargeStatus: 0`, and for
|
|
161157
|
+
* its whole life it was reported as NOT charging.
|
|
161158
|
+
*
|
|
161159
|
+
* That `adapterStatus` is a real signal and not a constant is MEASURED: on
|
|
161160
|
+
* 2026-09-05 the operator unplugged device 3628 and the raw payload
|
|
161161
|
+
* went from `adapterStatus: 1` to `0`, with `chargeStatus: 0` on both
|
|
161162
|
+
* sides — i.e. `chargeStatus` alone does NOT distinguish the two states.
|
|
161163
|
+
*
|
|
161164
|
+
* Two absent fields are NOT `'none'`: `'none'` is a negative the firmware
|
|
161165
|
+
* has stated ("no adapter, cell stopped"), the absence of both is
|
|
161166
|
+
* `'unknown'` — the same boundary `percentage` closed by becoming
|
|
161167
|
+
* `nullable` (D315). The caller (`mapBatteryInfo`) does not arrive here with a
|
|
161168
|
+
* push that says nothing about power: `reportsPowerSource` filters it out first and
|
|
161169
|
+
* keeps the previous belief.
|
|
161170
161170
|
*/
|
|
161171
161171
|
function deriveChargingSource(adapterStatus, chargeStatus) {
|
|
161172
161172
|
if (adapterStatus === void 0 && chargeStatus === void 0) return "unknown";
|
package/dist/addon.mjs
CHANGED
|
@@ -7496,7 +7496,7 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
7496
7496
|
return DeviceRole;
|
|
7497
7497
|
}({});
|
|
7498
7498
|
//#endregion
|
|
7499
|
-
//#region ../types/dist/composition-
|
|
7499
|
+
//#region ../types/dist/composition-D7ULvLdD.mjs
|
|
7500
7500
|
/**
|
|
7501
7501
|
* The ffmpeg build every CamStack node downloads, per platform and arch.
|
|
7502
7502
|
*
|
|
@@ -7550,20 +7550,20 @@ function portable(target) {
|
|
|
7550
7550
|
}
|
|
7551
7551
|
portable("linux64"), portable("linuxarm64"), portable("macarm64"), portable("mac64");
|
|
7552
7552
|
/**
|
|
7553
|
-
*
|
|
7554
|
-
*
|
|
7553
|
+
* THE table "which boolean of this device type counts as HIGH", and the
|
|
7554
|
+
* pure evaluator of its EDGE.
|
|
7555
7555
|
*
|
|
7556
|
-
*
|
|
7557
|
-
*
|
|
7558
|
-
*
|
|
7559
|
-
*
|
|
7560
|
-
*
|
|
7561
|
-
*
|
|
7556
|
+
* ONE table for everyone who asks "is this device HIGH?": the
|
|
7557
|
+
* recorder's `RecordingTriggers.sensorDeviceIds` trigger, the post-analysis
|
|
7558
|
+
* sensor markers, the orchestrator's camera-sensors bridge and
|
|
7559
|
+
* the sources of a composite doorbell (`doorbellFeatureSources`, D671).
|
|
7560
|
+
* A second copy would diverge at the first cap added, and the symptom — "the
|
|
7561
|
+
* sensor rings the doorbell but does not record" — is exactly D62.
|
|
7562
7562
|
*
|
|
7563
|
-
* ⚠
|
|
7564
|
-
*
|
|
7565
|
-
*
|
|
7566
|
-
*
|
|
7563
|
+
* ⚠ NOT `DEVICE_STATE_READERS` (`catalogs/device-state-vocabulary.ts`), and the
|
|
7564
|
+
* two must not be unified: that one answers "what is the state WORD for a
|
|
7565
|
+
* rule" (and includes `presence`, `cover`, `alarm-panel`), this one "which
|
|
7566
|
+
* boolean's EDGE counts". Deliberately different vocabularies.
|
|
7567
7567
|
*/
|
|
7568
7568
|
/**
|
|
7569
7569
|
* Known binary / switch source caps → the boolean slice field whose
|
|
@@ -9190,22 +9190,22 @@ var CLASS_MAP_MACRO_TARGETS = [
|
|
|
9190
9190
|
"package"
|
|
9191
9191
|
];
|
|
9192
9192
|
/**
|
|
9193
|
-
*
|
|
9194
|
-
*
|
|
9193
|
+
* The FIRST-LEVEL macro classes: those an object detector emits and that
|
|
9194
|
+
* an operator can select.
|
|
9195
9195
|
*
|
|
9196
|
-
*
|
|
9196
|
+
* They are the three offered by the `object-detection` step
|
|
9197
9197
|
* (`addon-pipeline/src/detection-pipeline/registry/step-definitions.ts`,
|
|
9198
|
-
* `enabledMacroClasses`). `package`
|
|
9199
|
-
* `MACRO_LABELS` —
|
|
9200
|
-
* `package-detection`,
|
|
9201
|
-
*
|
|
9198
|
+
* `enabledMacroClasses`). `package` is in {@link CLASS_MAP_MACRO_TARGETS} and in
|
|
9199
|
+
* `MACRO_LABELS` — it is a true macro — but NOT here: it belongs to the step
|
|
9200
|
+
* `package-detection`, whose enablement is driven by zones, and offering the
|
|
9201
|
+
* same word twice has already made an operator turn on the COCO proxy
|
|
9202
9202
|
* (suitcase/backpack/handbag) lasciando spento il detector dedicato.
|
|
9203
9203
|
*
|
|
9204
|
-
*
|
|
9205
|
-
*
|
|
9206
|
-
* (`types/detection.ts`);
|
|
9207
|
-
* (`RecordingTriggers.objectClasses`)
|
|
9208
|
-
*
|
|
9204
|
+
* ONE list. Before today the same three were hand-written in the step's offer
|
|
9205
|
+
* and a second time as the union `FirstLevelMacro`
|
|
9206
|
+
* (`types/detection.ts`); a third copy for the recording trigger
|
|
9207
|
+
* (`RecordingTriggers.objectClasses`) would have made the later divergence
|
|
9208
|
+
* invisible.
|
|
9209
9209
|
*/
|
|
9210
9210
|
var FIRST_LEVEL_MACRO_CLASSES = [
|
|
9211
9211
|
"person",
|
|
@@ -9270,17 +9270,17 @@ var RecordingStorageModeSchema = _enum([
|
|
|
9270
9270
|
"on-device-decision"
|
|
9271
9271
|
]);
|
|
9272
9272
|
/**
|
|
9273
|
-
*
|
|
9274
|
-
*
|
|
9273
|
+
* The macro classes that can open a recording window — the same
|
|
9274
|
+
* three offered by the `object-detection` step, from ONE list
|
|
9275
9275
|
* ({@link FIRST_LEVEL_MACRO_CLASSES}).
|
|
9276
9276
|
*/
|
|
9277
9277
|
var RecordingObjectTriggerClassSchema = _enum(FIRST_LEVEL_MACRO_CLASSES);
|
|
9278
9278
|
/**
|
|
9279
|
-
* True
|
|
9279
|
+
* True when `values` does not repeat an element.
|
|
9280
9280
|
*
|
|
9281
|
-
*
|
|
9282
|
-
*
|
|
9283
|
-
*
|
|
9281
|
+
* A duplicate is not harmless: every entry of `objectClasses` / `sensorDeviceIds`
|
|
9282
|
+
* becomes a SOURCE in `bandTriggerSources`, and the same source twice
|
|
9283
|
+
* would count its windows twice in `segmentMissedByMs`.
|
|
9284
9284
|
*/
|
|
9285
9285
|
var noDuplicates = (values) => new Set(values).size === values.length;
|
|
9286
9286
|
/** Which detectors trigger an `events`-mode band. */
|
|
@@ -9288,34 +9288,34 @@ var RecordingTriggersSchema = object({
|
|
|
9288
9288
|
motion: boolean().optional(),
|
|
9289
9289
|
audioThresholdDbfs: number().optional(),
|
|
9290
9290
|
/**
|
|
9291
|
-
*
|
|
9292
|
-
*
|
|
9293
|
-
*
|
|
9294
|
-
*
|
|
9291
|
+
* The macro classes whose detection opens a window. ABSENT = the source
|
|
9292
|
+
* is not listened to; an EMPTY array is rejected, because "events band, object
|
|
9293
|
+
* trigger on, no class" is the same shape "enabled and records
|
|
9294
|
+
* nothing, forever" that `eventsBandCanEverDemand` is written against.
|
|
9295
9295
|
*
|
|
9296
|
-
*
|
|
9297
|
-
*
|
|
9298
|
-
* `minConfidence<Macro>`
|
|
9299
|
-
* (`source: 'onboard'`)
|
|
9300
|
-
*
|
|
9296
|
+
* The signal read is ALREADY FILTERED: only `source: 'pipeline'` detections, i.e.
|
|
9297
|
+
* those that went through `enabledMacroClasses`, the
|
|
9298
|
+
* `minConfidence<Macro>` and the full-frame guard. The camera's onboard AI
|
|
9299
|
+
* (`source: 'onboard'`) goes through none of those gates and does NOT open
|
|
9300
|
+
* windows — see `recorder/object-trigger.ts`.
|
|
9301
9301
|
*/
|
|
9302
9302
|
objectClasses: array(RecordingObjectTriggerClassSchema).min(1).refine(noDuplicates, { message: "objectClasses must not repeat a class" }).optional(),
|
|
9303
9303
|
/**
|
|
9304
|
-
*
|
|
9305
|
-
*
|
|
9304
|
+
* The LINKED devices whose RISING EDGE opens a window. Absent = the source
|
|
9305
|
+
* is not listened to; an empty array is rejected for the same reason as
|
|
9306
9306
|
* `objectClasses`.
|
|
9307
9307
|
*
|
|
9308
|
-
*
|
|
9309
|
-
*
|
|
9310
|
-
*
|
|
9311
|
-
*
|
|
9312
|
-
* device (D12) —
|
|
9308
|
+
* These are SOURCE device ids, not cameras: the band names them, so the
|
|
9309
|
+
* hot path (`DeviceStateChanged`, at bus rate across the whole fleet)
|
|
9310
|
+
* does no RPC. The OFFER from which the operator picks them is another question, and
|
|
9311
|
+
* is resolved with `deviceManager.getLinkedDevices` + `getBindingsBatch` per
|
|
9312
|
+
* device (D12) — never a global list of caps.
|
|
9313
9313
|
*
|
|
9314
|
-
*
|
|
9315
|
-
* `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`)
|
|
9316
|
-
*
|
|
9317
|
-
*
|
|
9318
|
-
*
|
|
9314
|
+
* What "high" means depends on the device TYPE and is not decided here:
|
|
9315
|
+
* `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`) is THE table,
|
|
9316
|
+
* the same one as the composite doorbell (D671). And it is the EDGE, not
|
|
9317
|
+
* the level: a contact found already open at runner restart does not
|
|
9318
|
+
* record.
|
|
9319
9319
|
*/
|
|
9320
9320
|
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
9321
9321
|
});
|
|
@@ -10567,7 +10567,7 @@ function findTimezone(id) {
|
|
|
10567
10567
|
* - **VALUE** — at which level, for which scope, until when. That stays ONE
|
|
10568
10568
|
* thing: the logging settings document on the `system` cap. Two authorities
|
|
10569
10569
|
* over the values is the exact defect
|
|
10570
|
-
* `docs/design/plans/2026-08-26-
|
|
10570
|
+
* `docs/design/plans/2026-08-26-per-component-logging.md` was written to
|
|
10571
10571
|
* remove; re-introducing it from the cure side would be grotesque.
|
|
10572
10572
|
*
|
|
10573
10573
|
* Nothing in this file reads a clock, an env var or a store. The registry is
|
|
@@ -14479,7 +14479,7 @@ method(_void(), EngineInfoSchema, { auth: "admin" }), method(object({
|
|
|
14479
14479
|
*
|
|
14480
14480
|
* ⚠ An earlier version of this comment blamed Zod stripping, and that
|
|
14481
14481
|
* was wrong — corrected 2026-08-26 after the hop map
|
|
14482
|
-
* (`docs/design/2026-08-26-
|
|
14482
|
+
* (`docs/design/2026-08-26-topic-hop-map.md`) traced the path.
|
|
14483
14483
|
* There is **no Zod parse at all** between the door and the engine: the
|
|
14484
14484
|
* dispatcher forwards the payload verbatim and UDS carries it whole. A
|
|
14485
14485
|
* field declared here reaches `SqliteSettingsBackend` either way.
|
|
@@ -16682,7 +16682,7 @@ method(object({
|
|
|
16682
16682
|
* per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
|
|
16683
16683
|
* ends in a log line, and a log line is the thing the operator asked to stop
|
|
16684
16684
|
* needing: *"possiamo armare questi errori intanto? Così al prossimo giro
|
|
16685
|
-
* ricontrolliamo tutti questi punti"
|
|
16685
|
+
* ricontrolliamo tutti questi punti"* [can we instrument these errors in the meantime? That way next round we recheck all these points]. Reading them meant grepping Loki and
|
|
16686
16686
|
* hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
|
|
16687
16687
|
* media blackout were both diagnosed. The counters stay; this is where they can
|
|
16688
16688
|
* be READ.
|
|
@@ -22429,14 +22429,14 @@ var TrackSchema = object({
|
|
|
22429
22429
|
* `derive-returned-null tile=standin`,
|
|
22430
22430
|
* `native-tile tile=native no-key-frame-at-close`, …) written at close and
|
|
22431
22431
|
* CLEARED by the late-keyFrame upgrade when a native tile lands after all.
|
|
22432
|
-
* The operator-facing answer to "perché manca l'immagine?" on a track whose
|
|
22432
|
+
* The operator-facing answer to "perché manca l'immagine?" [why is the image missing?] on a track whose
|
|
22433
22433
|
* tile is a face/plate stand-in, a raster crop, or an icon.
|
|
22434
22434
|
*
|
|
22435
22435
|
* **`no-key-frame-at-close` (D400).** The line used to be written ONLY when
|
|
22436
22436
|
* the TILE ranked below native, so a track whose thumbnail landed natively
|
|
22437
22437
|
* while its key frame missed carried no reason at all — three of the four
|
|
22438
22438
|
* `MISSING_KEYFRAME` tracks in the 2026-09-07 operator audit were exactly
|
|
22439
|
-
* that shape, and their "niente ultimo" had no cause anywhere on the row.
|
|
22439
|
+
* that shape, and their "niente ultimo" [no last frame] had no cause anywhere on the row.
|
|
22440
22440
|
* The key frame is the head of a cascade (`keyFrame ⇒ keyFrameSmall ⇒ the
|
|
22441
22441
|
* lastFrame copy source`), so its absence is now on this line whatever the
|
|
22442
22442
|
* tile ended up being.
|
|
@@ -22523,7 +22523,7 @@ var MotionEventSchema = object({
|
|
|
22523
22523
|
/**
|
|
22524
22524
|
* Ms offsets from `timestamp` (the episode's own first rising edge, so the
|
|
22525
22525
|
* first entry is always `0`) of every genuine off→on transition the
|
|
22526
|
-
* episode saw — "ogni evento on si deve salvare" (D475). NOT one entry per
|
|
22526
|
+
* episode saw — "ogni evento on si deve salvare" [every ON event must be saved] (D475). NOT one entry per
|
|
22527
22527
|
* push: a firmware source that keepalives at ~1 Hz for the whole burst
|
|
22528
22528
|
* (Reolink, Hikvision) produces exactly one edge; a source that reports an
|
|
22529
22529
|
* explicit `false` mid-episode and then resumes before the quiet window
|
|
@@ -27980,7 +27980,7 @@ var ClipPlaybackSchema = object({
|
|
|
27980
27980
|
* **One authorised yes is one wake.** `next-natural` — take the clip the next
|
|
27981
27981
|
* time the camera is awake for its own reasons — is deliberately not a member:
|
|
27982
27982
|
* it was proposed, it is free on the battery, and the operator declined it on
|
|
27983
|
-
* 2026-09-20 (*"Quando un export viene richiesto si sveglia la camera."
|
|
27983
|
+
* 2026-09-20 (*"Quando un export viene richiesto si sveglia la camera."* [When an export is requested the camera wakes up],
|
|
27984
27984
|
* D558 "Considered and not taken").
|
|
27985
27985
|
*/
|
|
27986
27986
|
var ClipWakeSchema = _enum(["authorised"]);
|
|
@@ -28376,7 +28376,7 @@ var videoclipsCapability = {
|
|
|
28376
28376
|
* **It is a SECTION of the Recording tab, at the end of it — not a tab of
|
|
28377
28377
|
* its own.** It shipped as a `clips` top-tab and the operator rejected the
|
|
28378
28378
|
* placement: *"utilizzerei la stessa tab recordings, lì abbiamo già tutto il
|
|
28379
|
-
* necessario, una nuova sezione alla fine per le clips"
|
|
28379
|
+
* necessario, una nuova sezione alla fine per le clips"* [I would use the same recordings tab, there we already have everything necessary, a new section at the end for the clips]. The Recording tab
|
|
28380
28380
|
* already holds the recorder's panel, the schedule bands and the unified
|
|
28381
28381
|
* retention policy; footage the camera itself holds is the same question,
|
|
28382
28382
|
* asked of a different store. `order: 100` puts it after all of them with
|
|
@@ -28437,7 +28437,7 @@ var videoclipsCapability = {
|
|
|
28437
28437
|
* It replaced `sources?: string[]`, a VIEW filter over source ids that
|
|
28438
28438
|
* assumed the answer was a fan-out over everything a camera has. The
|
|
28439
28439
|
* operator settled otherwise on 2026-09-20 — *"l'utilizzatore è uno
|
|
28440
|
-
* solo"* — so the list is asked of one provider at a time and there is
|
|
28440
|
+
* solo"* [there is only one user] — so the list is asked of one provider at a time and there is
|
|
28441
28441
|
* nothing to filter out of it.
|
|
28442
28442
|
*/
|
|
28443
28443
|
provider: string().min(1)
|
|
@@ -36758,7 +36758,7 @@ var ReadGopBytesResultSchema = object({
|
|
|
36758
36758
|
/**
|
|
36759
36759
|
* A time WINDOW of one finalized segment, cut by byte range — the multi-GOP
|
|
36760
36760
|
* twin of {@link ReadGopBytesResultSchema}'s single instant. Built for the
|
|
36761
|
-
* replay clip's `recording` source (`docs/design/plans/2026-08-26-replay-
|
|
36761
|
+
* replay clip's `recording` source (`docs/design/plans/2026-08-26-clip-replay-on-pipeline.md`):
|
|
36762
36762
|
* a replay needs several seconds of native pixels, not one frame.
|
|
36763
36763
|
*
|
|
36764
36764
|
* `ok.data` is standalone-demuxable, same as a GOP read. `ok.reachesRequestedEnd`
|
|
@@ -53460,7 +53460,7 @@ var PreviewTextField = string().max(200);
|
|
|
53460
53460
|
* Whether the notification's preview is a STILL or a short animation.
|
|
53461
53461
|
*
|
|
53462
53462
|
* The operator's ask, verbatim: *"inviato come gif o video (come per le altre
|
|
53463
|
-
* rule)"* — the other rules already offer an animated preview, and a ten-hour
|
|
53463
|
+
* rule)"* [sent as a gif or video (as for the other rules)] — the other rules already offer an animated preview, and a ten-hour
|
|
53464
53464
|
* night reads better as three seconds of motion than as one frame of it. Both
|
|
53465
53465
|
* modes get the SAME treatment (blurred frame, large centred title); `'gif'`
|
|
53466
53466
|
* simply applies it to a dozen frames sampled across the render and assembles
|
|
@@ -161129,37 +161129,37 @@ function buildOnboardWrites(patch, schedule) {
|
|
|
161129
161129
|
//#endregion
|
|
161130
161130
|
//#region src/battery-charging.ts
|
|
161131
161131
|
/**
|
|
161132
|
-
*
|
|
161133
|
-
*
|
|
161134
|
-
*
|
|
161135
|
-
*
|
|
161136
|
-
*
|
|
161137
|
-
* - `adapterStatus` —
|
|
161138
|
-
* (
|
|
161139
|
-
*
|
|
161140
|
-
* `mapHubAdapterStatus` in `reolink-hub.ts`),
|
|
161141
|
-
*
|
|
161142
|
-
* - `chargeStatus` —
|
|
161143
|
-
* 2
|
|
161144
|
-
*
|
|
161145
|
-
*
|
|
161146
|
-
*
|
|
161147
|
-
*
|
|
161148
|
-
*
|
|
161149
|
-
* 1, firmware 2026)
|
|
161150
|
-
*
|
|
161151
|
-
*
|
|
161152
|
-
*
|
|
161153
|
-
* 2026-09-05
|
|
161154
|
-
*
|
|
161155
|
-
*
|
|
161156
|
-
*
|
|
161157
|
-
*
|
|
161158
|
-
*
|
|
161159
|
-
* `'unknown'` —
|
|
161160
|
-
* `nullable` (D315).
|
|
161161
|
-
* push
|
|
161162
|
-
*
|
|
161132
|
+
* From `adapterStatus` + `chargeStatus` to the power source.
|
|
161133
|
+
*
|
|
161134
|
+
* The two fields answer TWO different questions, and confusing them is the bug that
|
|
161135
|
+
* this module exists to close:
|
|
161136
|
+
*
|
|
161137
|
+
* - `adapterStatus` — is the power CONNECTED? The firmware sends 0/1/2
|
|
161138
|
+
* (none · DC adapter · solar panel) and the hub boundary
|
|
161139
|
+
* translates it into `'none' | 'dc' | 'solarPanel'` (`mapHubChargeStatus` and
|
|
161140
|
+
* `mapHubAdapterStatus` in `reolink-hub.ts`), because the vocabulary of the
|
|
161141
|
+
* standalone path is already strings.
|
|
161142
|
+
* - `chargeStatus` — what is the CELL doing? 0 stopped · 1 charging ·
|
|
161143
|
+
* 2 fully charged.
|
|
161144
|
+
*
|
|
161145
|
+
* The old derivation consulted the adapter ONLY to look for 'solar' in it, and
|
|
161146
|
+
* a connected DC fell into the fallback `'none'`. Two Argus 3E units hid it by
|
|
161147
|
+
* chance: full and connected they answer `chargeStatus: 2`, which the `isCharging`
|
|
161148
|
+
* branch mapped to `'dc'` for the wrong reason. The Argus MagiCam (batteryVersion
|
|
161149
|
+
* 1, firmware 2026) permanently connected answers `chargeStatus: 0`, and for
|
|
161150
|
+
* its whole life it was reported as NOT charging.
|
|
161151
|
+
*
|
|
161152
|
+
* That `adapterStatus` is a real signal and not a constant is MEASURED: on
|
|
161153
|
+
* 2026-09-05 the operator unplugged device 3628 and the raw payload
|
|
161154
|
+
* went from `adapterStatus: 1` to `0`, with `chargeStatus: 0` on both
|
|
161155
|
+
* sides — i.e. `chargeStatus` alone does NOT distinguish the two states.
|
|
161156
|
+
*
|
|
161157
|
+
* Two absent fields are NOT `'none'`: `'none'` is a negative the firmware
|
|
161158
|
+
* has stated ("no adapter, cell stopped"), the absence of both is
|
|
161159
|
+
* `'unknown'` — the same boundary `percentage` closed by becoming
|
|
161160
|
+
* `nullable` (D315). The caller (`mapBatteryInfo`) does not arrive here with a
|
|
161161
|
+
* push that says nothing about power: `reportsPowerSource` filters it out first and
|
|
161162
|
+
* keeps the previous belief.
|
|
161163
161163
|
*/
|
|
161164
161164
|
function deriveChargingSource(adapterStatus, chargeStatus) {
|
|
161165
161165
|
if (adapterStatus === void 0 && chargeStatus === void 0) return "unknown";
|