@camstack/addon-provider-reolink 1.2.224 → 1.2.226
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/CHANGELOG.md +12 -0
- package/dist/addon.js +135 -65
- package/dist/addon.mjs +135 -65
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.2.226] - 2026-11-05
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- Cameras whose host reports an unknown time zone (Etc/Unknown) no longer fail the clip catalog refresh; it falls back to the camera's offset or UTC.
|
|
15
|
+
|
|
16
|
+
## [1.2.225] - 2026-11-05
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- Copying an integration into its record reads the leftover rows through the migration-only door and resolves their secrets in this addon
|
|
21
|
+
|
|
10
22
|
## [1.2.224] - 2026-11-04
|
|
11
23
|
|
|
12
24
|
### Changed
|
package/dist/addon.js
CHANGED
|
@@ -106677,7 +106677,7 @@ var ZodIssueCode = {
|
|
|
106677
106677
|
var ZodFirstPartyTypeKind;
|
|
106678
106678
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
106679
106679
|
//#endregion
|
|
106680
|
-
//#region ../types/dist/sleep-
|
|
106680
|
+
//#region ../types/dist/sleep-9TIHFj1w.mjs
|
|
106681
106681
|
/**
|
|
106682
106682
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
106683
106683
|
* window to float samples (D455).
|
|
@@ -108621,10 +108621,9 @@ var BaseAddon = class {
|
|
|
108621
108621
|
*
|
|
108622
108622
|
* Override it only when an `instanceMode: multiple` addon's instances differ: an NVR integration
|
|
108623
108623
|
* needs its connection fields, the default integration the addon's own sections. It is the
|
|
108624
|
-
* SHAPE of the form only — the values live
|
|
108625
|
-
* unchanged (`integrations.setSettings` for an account integration).
|
|
108624
|
+
* SHAPE of the form only — the values live on the instance record.
|
|
108626
108625
|
*/
|
|
108627
|
-
async
|
|
108626
|
+
async integrationFormSchema(_instance) {
|
|
108628
108627
|
return null;
|
|
108629
108628
|
}
|
|
108630
108629
|
/**
|
|
@@ -108670,7 +108669,7 @@ var BaseAddon = class {
|
|
|
108670
108669
|
* per-instance schema when it declares one, else its global schema (what they always showed).
|
|
108671
108670
|
*/
|
|
108672
108671
|
async getIntegrationFormSchema(instance, nodeId) {
|
|
108673
|
-
const scoped = await this.
|
|
108672
|
+
const scoped = await this.integrationFormSchema(instance);
|
|
108674
108673
|
if (scoped === null) return this.getGlobalSettings(void 0, void 0, nodeId);
|
|
108675
108674
|
return hydrateSchema(scoped, {}, { inlineSecretsAsViews: true });
|
|
108676
108675
|
}
|
|
@@ -112777,7 +112776,7 @@ function sleep(ms) {
|
|
|
112777
112776
|
return new Promise((resolve) => setTimeout(resolve, Math.max(0, ms)));
|
|
112778
112777
|
}
|
|
112779
112778
|
//#endregion
|
|
112780
|
-
//#region ../types/dist/composition-
|
|
112779
|
+
//#region ../types/dist/composition-pOHbTzRB.mjs
|
|
112781
112780
|
/**
|
|
112782
112781
|
* The ffmpeg build every CamStack node downloads, per platform and arch.
|
|
112783
112782
|
*
|
|
@@ -115536,20 +115535,28 @@ async function moveIntegrationRowsToRecords(ports, spec) {
|
|
|
115536
115535
|
};
|
|
115537
115536
|
}
|
|
115538
115537
|
/**
|
|
115539
|
-
* The addon-side ports of `moveIntegrationRowsToRecords` (planning#416)
|
|
115540
|
-
* from its own process, so the
|
|
115541
|
-
* `
|
|
115542
|
-
*
|
|
115543
|
-
*
|
|
115538
|
+
* The addon-side ports of `moveIntegrationRowsToRecords` (planning#416). An addon runs the move
|
|
115539
|
+
* from its own process, so the leftover rows are reached through the migration-only door
|
|
115540
|
+
* (`migrations.readLegacyIntegrationRows` / `clearLegacyIntegrationRows`) on the hub's connection.
|
|
115541
|
+
* The door returns markers. This process is the owner, so it resolves and releases them with
|
|
115542
|
+
* `resolveSecretMarkers` — the same call the old settings door used — and only then asks the
|
|
115543
|
+
* door to delete the rows. The addon's own record kind is its records handle.
|
|
115544
115544
|
*/
|
|
115545
|
+
async function resolvedRows(stored, secrets) {
|
|
115546
|
+
if (secrets === null) return stored;
|
|
115547
|
+
const { value, unresolved } = await resolveSecretMarkers(stored, secrets);
|
|
115548
|
+
if (unresolved.length > 0) throw new Error(`${unresolved.length} secret(s) cannot be read from the keychain`);
|
|
115549
|
+
return value;
|
|
115550
|
+
}
|
|
115545
115551
|
function integrationRowsPortsOverApi(deps) {
|
|
115552
|
+
const secrets = deps.secrets ?? null;
|
|
115546
115553
|
return {
|
|
115547
115554
|
warn: (message) => deps.log.warn(message),
|
|
115548
115555
|
listIntegrations: async (addonId) => (await deps.api.list()).filter((i) => i.addonId === addonId).map((i) => ({
|
|
115549
115556
|
id: i.id,
|
|
115550
115557
|
name: i.name
|
|
115551
115558
|
})),
|
|
115552
|
-
readRows: (integrationId) => deps.api.
|
|
115559
|
+
readRows: async (integrationId) => resolvedRows(await deps.api.readLegacyIntegrationRows({ integrationId }), secrets),
|
|
115553
115560
|
putRecord: async (id, body) => {
|
|
115554
115561
|
if (await deps.records.get(id) !== null) return "exists";
|
|
115555
115562
|
try {
|
|
@@ -115568,7 +115575,9 @@ function integrationRowsPortsOverApi(deps) {
|
|
|
115568
115575
|
await deps.records.delete(id);
|
|
115569
115576
|
},
|
|
115570
115577
|
clearRows: async (integrationId) => {
|
|
115571
|
-
await deps.api.
|
|
115578
|
+
const refs = collectSecretMarkerRefs(await deps.api.readLegacyIntegrationRows({ integrationId }));
|
|
115579
|
+
if (refs.length > 0 && secrets !== null) await secrets.delete(refs);
|
|
115580
|
+
await deps.api.clearLegacyIntegrationRows({ integrationId });
|
|
115572
115581
|
}
|
|
115573
115582
|
};
|
|
115574
115583
|
}
|
|
@@ -115658,14 +115667,14 @@ async function claimDevicesToDefaultIntegration(ports, spec) {
|
|
|
115658
115667
|
* 2. `claim-devices` (tolerate): `claimDevicesToDefaultIntegration`; with no integration to claim
|
|
115659
115668
|
* to it fails and is retried on the next boot.
|
|
115660
115669
|
*
|
|
115661
|
-
* Both run in the addon process through the hub API (`ctx.api`)
|
|
115662
|
-
*
|
|
115663
|
-
* from the record, not from the rows.
|
|
115670
|
+
* Both run in the addon process through the hub API (`ctx.api`). The leftover rows are read
|
|
115671
|
+
* through the migration-only door, which answers empty once the store is gone.
|
|
115664
115672
|
*/
|
|
115665
115673
|
function defaultIntegrationPortsOver(deps) {
|
|
115666
115674
|
return {
|
|
115667
115675
|
...integrationRowsPortsOverApi({
|
|
115668
115676
|
api: deps.api,
|
|
115677
|
+
...deps.secrets !== void 0 ? { secrets: deps.secrets } : {},
|
|
115669
115678
|
records: deps.records.kind({
|
|
115670
115679
|
name: deps.kind.name,
|
|
115671
115680
|
declaration: deps.kind.declaration,
|
|
@@ -115730,8 +115739,8 @@ function claimDevicesMigration(spec) {
|
|
|
115730
115739
|
function defaultIntegrationApiOver(api) {
|
|
115731
115740
|
return {
|
|
115732
115741
|
list: () => api.integrations.list.query(),
|
|
115733
|
-
|
|
115734
|
-
|
|
115742
|
+
readLegacyIntegrationRows: (input) => api.migrations.readLegacyIntegrationRows.query(input),
|
|
115743
|
+
clearLegacyIntegrationRows: (input) => api.migrations.clearLegacyIntegrationRows.mutate(input),
|
|
115735
115744
|
listDevices: (addonId) => api.deviceManager.listAll.query({
|
|
115736
115745
|
addonId,
|
|
115737
115746
|
projection: "slim"
|
|
@@ -151882,6 +151891,9 @@ var RunningProposalEvidenceSchema = object({
|
|
|
151882
151891
|
runsFound: number().int().nonnegative(),
|
|
151883
151892
|
pausesFound: number().int().nonnegative(),
|
|
151884
151893
|
longestPauseMs: number().nonnegative(),
|
|
151894
|
+
/** Episodes shorter than ~90 s (an anti-crease pulse, a display waking): never a run, never a pause. */
|
|
151895
|
+
pulsesFound: number().int().nonnegative(),
|
|
151896
|
+
longestPulseMs: number().nonnegative(),
|
|
151885
151897
|
idleFloorW: number(),
|
|
151886
151898
|
noiseCeilingW: number(),
|
|
151887
151899
|
plateauW: number(),
|
|
@@ -157780,11 +157792,7 @@ var CreateIntegrationInputSchema = object({
|
|
|
157780
157792
|
info: record(string(), unknown()).optional(),
|
|
157781
157793
|
/** `stableId` of the discovery candidate the form was seeded from (D984). */
|
|
157782
157794
|
originStableId: string().optional(),
|
|
157783
|
-
settings: record(string(), unknown()).optional()
|
|
157784
|
-
/** Keys of `settings` the form's schema declares secret (by type) — kept in
|
|
157785
|
-
* the keychain, not the table (D787). */
|
|
157786
|
-
secretKeys: array(string()).optional(),
|
|
157787
|
-
skipRestart: boolean().optional()
|
|
157795
|
+
settings: record(string(), unknown()).optional()
|
|
157788
157796
|
});
|
|
157789
157797
|
var UpdateIntegrationInputSchema = object({
|
|
157790
157798
|
id: string(),
|
|
@@ -157805,22 +157813,6 @@ method(_void(), array(IntegrationWithStateSchema)), method(object({ id: string()
|
|
|
157805
157813
|
}), method(object({ id: string() }), DeleteIntegrationResultSchema, {
|
|
157806
157814
|
kind: "mutation",
|
|
157807
157815
|
auth: "admin"
|
|
157808
|
-
}), method(object({ id: string() }), record(string(), unknown()), { auth: "admin" }), method(object({
|
|
157809
|
-
id: string(),
|
|
157810
|
-
settings: record(string(), unknown()),
|
|
157811
|
-
/** Keys the form's schema declares secret (by type) — keychain-stored (D787). */
|
|
157812
|
-
secretKeys: array(string()).optional(),
|
|
157813
|
-
/** The integration's own addon applies the change in-process and asks the hub not to respawn it. */
|
|
157814
|
-
skipRestart: boolean().optional()
|
|
157815
|
-
}), object({ success: boolean() }), {
|
|
157816
|
-
kind: "mutation",
|
|
157817
|
-
auth: "admin"
|
|
157818
|
-
}), method(object({ id: string() }), object({
|
|
157819
|
-
rows: number().int().nonnegative(),
|
|
157820
|
-
secrets: number().int().nonnegative()
|
|
157821
|
-
}), {
|
|
157822
|
-
kind: "mutation",
|
|
157823
|
-
auth: "admin"
|
|
157824
157816
|
}), method(_void(), array(AvailableIntegrationTypeSchema), { auth: "admin" }), method(object({
|
|
157825
157817
|
addonId: string(),
|
|
157826
157818
|
settings: record(string(), unknown())
|
|
@@ -160818,6 +160810,27 @@ method(object({}), object({ entries: array(MigrationLedgerEntrySchema) }), { aut
|
|
|
160818
160810
|
}), {
|
|
160819
160811
|
kind: "mutation",
|
|
160820
160812
|
auth: "admin"
|
|
160813
|
+
}), method(object({ integrationId: string().min(1) }), record(string(), unknown()), { auth: "admin" }), method(object({ integrationId: string().min(1) }), object({
|
|
160814
|
+
rows: number().int().nonnegative(),
|
|
160815
|
+
secrets: number().int().nonnegative()
|
|
160816
|
+
}), {
|
|
160817
|
+
kind: "mutation",
|
|
160818
|
+
auth: "admin"
|
|
160819
|
+
}), method(object({
|
|
160820
|
+
integrationId: string().min(1),
|
|
160821
|
+
patch: record(string(), unknown())
|
|
160822
|
+
}), object({ written: boolean() }), {
|
|
160823
|
+
kind: "mutation",
|
|
160824
|
+
auth: "admin"
|
|
160825
|
+
}), method(object({
|
|
160826
|
+
integrationId: string().min(1),
|
|
160827
|
+
keys: array(string().min(1))
|
|
160828
|
+
}), object({
|
|
160829
|
+
present: boolean(),
|
|
160830
|
+
removed: record(string(), unknown())
|
|
160831
|
+
}), {
|
|
160832
|
+
kind: "mutation",
|
|
160833
|
+
auth: "admin"
|
|
160821
160834
|
});
|
|
160822
160835
|
method(object({
|
|
160823
160836
|
sourceUrl: string(),
|
|
@@ -183329,11 +183342,15 @@ discriminatedUnion("kind", [object({
|
|
|
183329
183342
|
* 1. idle floor F = time-weighted median; noise ceiling N = highest value seen
|
|
183330
183343
|
* near F. A device that is not near one level most of the time has no floor.
|
|
183331
183344
|
* 2. coarse activity = above max(2N, N + 5 W); consecutive stretches are episodes.
|
|
183332
|
-
* 3.
|
|
183333
|
-
*
|
|
183345
|
+
* 3. an episode shorter than `PULSE_MAX_MS` is a PULSE (an anti-crease tumble, a
|
|
183346
|
+
* display waking): it is neither a run nor a pause. Among the remaining
|
|
183347
|
+
* episodes, gaps over `PAUSE_MAX_MS` always separate runs; the rest split in
|
|
183348
|
+
* two by the largest log-scale jump (>= 3x): the short ones are pauses INSIDE
|
|
183349
|
+
* a run (a soak), the long ones separate runs. A stretch under `MIN_RUN_MS`
|
|
183350
|
+
* is no run.
|
|
183334
183351
|
* 4. T = geometric mean of N and the plateau's 10th percentile, snapped to a
|
|
183335
|
-
* grid a person would type; stop dwell covers the longest pause
|
|
183336
|
-
* covers the longest standby blip above T.
|
|
183352
|
+
* grid a person would type; stop dwell covers the longest pause and the
|
|
183353
|
+
* kind's floor; start dwell covers the longest pulse and standby blip above T.
|
|
183337
183354
|
* 5. the numbers are proved by REPLAY through the real `dwell` evaluation: each
|
|
183338
183355
|
* run must hold exactly one true interval and nothing may flap outside.
|
|
183339
183356
|
*/
|
|
@@ -183344,6 +183361,10 @@ var MINUTE_MS$1 = 60 * SECOND_MS;
|
|
|
183344
183361
|
30 * SECOND_MS;
|
|
183345
183362
|
60 * SECOND_MS;
|
|
183346
183363
|
20 * MINUTE_MS$1;
|
|
183364
|
+
90 * SECOND_MS;
|
|
183365
|
+
30 * MINUTE_MS$1;
|
|
183366
|
+
10 * MINUTE_MS$1;
|
|
183367
|
+
DeviceType.Dryer, 3 * MINUTE_MS$1, DeviceType.Dishwasher, 3 * MINUTE_MS$1, DeviceType.Washer, 10 * MINUTE_MS$1;
|
|
183347
183368
|
10 * SECOND_MS;
|
|
183348
183369
|
10 * SECOND_MS;
|
|
183349
183370
|
/**
|
|
@@ -188776,13 +188797,6 @@ Object.freeze({
|
|
|
188776
188797
|
access: "create",
|
|
188777
188798
|
role: "admin"
|
|
188778
188799
|
},
|
|
188779
|
-
"integrations.clearSettings": {
|
|
188780
|
-
capName: "integrations",
|
|
188781
|
-
capScope: "system",
|
|
188782
|
-
addonId: null,
|
|
188783
|
-
access: "delete",
|
|
188784
|
-
role: "admin"
|
|
188785
|
-
},
|
|
188786
188800
|
"integrations.create": {
|
|
188787
188801
|
capName: "integrations",
|
|
188788
188802
|
capScope: "system",
|
|
@@ -188818,13 +188832,6 @@ Object.freeze({
|
|
|
188818
188832
|
access: "view",
|
|
188819
188833
|
role: "admin"
|
|
188820
188834
|
},
|
|
188821
|
-
"integrations.getSettings": {
|
|
188822
|
-
capName: "integrations",
|
|
188823
|
-
capScope: "system",
|
|
188824
|
-
addonId: null,
|
|
188825
|
-
access: "view",
|
|
188826
|
-
role: "admin"
|
|
188827
|
-
},
|
|
188828
188835
|
"integrations.list": {
|
|
188829
188836
|
capName: "integrations",
|
|
188830
188837
|
capScope: "system",
|
|
@@ -188832,13 +188839,6 @@ Object.freeze({
|
|
|
188832
188839
|
access: "view",
|
|
188833
188840
|
role: "admin"
|
|
188834
188841
|
},
|
|
188835
|
-
"integrations.setSettings": {
|
|
188836
|
-
capName: "integrations",
|
|
188837
|
-
capScope: "system",
|
|
188838
|
-
addonId: null,
|
|
188839
|
-
access: "create",
|
|
188840
|
-
role: "admin"
|
|
188841
|
-
},
|
|
188842
188842
|
"integrations.testConnection": {
|
|
188843
188843
|
capName: "integrations",
|
|
188844
188844
|
capScope: "system",
|
|
@@ -189833,6 +189833,13 @@ Object.freeze({
|
|
|
189833
189833
|
access: "view",
|
|
189834
189834
|
role: "admin"
|
|
189835
189835
|
},
|
|
189836
|
+
"migrations.clearLegacyIntegrationRows": {
|
|
189837
|
+
capName: "migrations",
|
|
189838
|
+
capScope: "system",
|
|
189839
|
+
addonId: null,
|
|
189840
|
+
access: "delete",
|
|
189841
|
+
role: "admin"
|
|
189842
|
+
},
|
|
189836
189843
|
"migrations.declareOwner": {
|
|
189837
189844
|
capName: "migrations",
|
|
189838
189845
|
capScope: "system",
|
|
@@ -189840,6 +189847,13 @@ Object.freeze({
|
|
|
189840
189847
|
access: "create",
|
|
189841
189848
|
role: "admin"
|
|
189842
189849
|
},
|
|
189850
|
+
"migrations.deleteLegacyIntegrationRowKeys": {
|
|
189851
|
+
capName: "migrations",
|
|
189852
|
+
capScope: "system",
|
|
189853
|
+
addonId: null,
|
|
189854
|
+
access: "delete",
|
|
189855
|
+
role: "admin"
|
|
189856
|
+
},
|
|
189843
189857
|
"migrations.dryRun": {
|
|
189844
189858
|
capName: "migrations",
|
|
189845
189859
|
capScope: "system",
|
|
@@ -189875,6 +189889,20 @@ Object.freeze({
|
|
|
189875
189889
|
access: "create",
|
|
189876
189890
|
role: "admin"
|
|
189877
189891
|
},
|
|
189892
|
+
"migrations.patchLegacyIntegrationRows": {
|
|
189893
|
+
capName: "migrations",
|
|
189894
|
+
capScope: "system",
|
|
189895
|
+
addonId: null,
|
|
189896
|
+
access: "create",
|
|
189897
|
+
role: "admin"
|
|
189898
|
+
},
|
|
189899
|
+
"migrations.readLegacyIntegrationRows": {
|
|
189900
|
+
capName: "migrations",
|
|
189901
|
+
capScope: "system",
|
|
189902
|
+
addonId: null,
|
|
189903
|
+
access: "view",
|
|
189904
|
+
role: "admin"
|
|
189905
|
+
},
|
|
189878
189906
|
"migrations.restorePreMigration": {
|
|
189879
189907
|
capName: "migrations",
|
|
189880
189908
|
capScope: "system",
|
|
@@ -206781,6 +206809,46 @@ var IntercomFailureReport = class {
|
|
|
206781
206809
|
/** The process-wide instance every camera in this addon notes into. */
|
|
206782
206810
|
var intercomFailureReport = new IntercomFailureReport();
|
|
206783
206811
|
//#endregion
|
|
206812
|
+
//#region src/clips/clip-time-zone.ts
|
|
206813
|
+
function isUsableTimeZone(timeZone) {
|
|
206814
|
+
try {
|
|
206815
|
+
new Intl.DateTimeFormat("en-US", { timeZone });
|
|
206816
|
+
return true;
|
|
206817
|
+
} catch {
|
|
206818
|
+
return false;
|
|
206819
|
+
}
|
|
206820
|
+
}
|
|
206821
|
+
/**
|
|
206822
|
+
* @param candidate the zone the process reports
|
|
206823
|
+
* @param cameraZone a zone derived from the camera's reported UTC offset, if any
|
|
206824
|
+
*/
|
|
206825
|
+
function resolveClipTimeZone(candidate, cameraZone) {
|
|
206826
|
+
if (isUsableTimeZone(candidate)) return { timeZone: candidate };
|
|
206827
|
+
if (cameraZone !== void 0 && isUsableTimeZone(cameraZone)) return {
|
|
206828
|
+
timeZone: cameraZone,
|
|
206829
|
+
rejected: candidate
|
|
206830
|
+
};
|
|
206831
|
+
return {
|
|
206832
|
+
timeZone: "UTC",
|
|
206833
|
+
rejected: candidate
|
|
206834
|
+
};
|
|
206835
|
+
}
|
|
206836
|
+
/** Resolve and, when the candidate was refused, warn ONCE per `warned` holder. */
|
|
206837
|
+
function resolveClipTimeZoneOnce(candidate, cameraZone, logger, deviceId, warned) {
|
|
206838
|
+
const res = resolveClipTimeZone(candidate, cameraZone);
|
|
206839
|
+
if (res.rejected !== void 0 && !warned.done) {
|
|
206840
|
+
warned.done = true;
|
|
206841
|
+
logger.warn("clip catalog: the process time zone is not usable, using a fallback", {
|
|
206842
|
+
tags: { deviceId },
|
|
206843
|
+
meta: {
|
|
206844
|
+
rejectedTimeZone: res.rejected,
|
|
206845
|
+
fallbackTimeZone: res.timeZone
|
|
206846
|
+
}
|
|
206847
|
+
});
|
|
206848
|
+
}
|
|
206849
|
+
return res.timeZone;
|
|
206850
|
+
}
|
|
206851
|
+
//#endregion
|
|
206784
206852
|
//#region src/baichuan-webhook-shared.ts
|
|
206785
206853
|
/** The data-plane prefix this addon serves the camera push on: `/addon/<addonId>/webhook/<stableId>`. */
|
|
206786
206854
|
var BAICHUAN_WEBHOOK_PREFIX = "webhook";
|
|
@@ -213240,6 +213308,7 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
|
|
|
213240
213308
|
async wakeForClipCatalogRefresh() {
|
|
213241
213309
|
if (!await this.wakeIfSleeping()) throw new Error(`ReolinkCamera ${this.id}: the authorised clip-refresh wake did not bring the camera up`);
|
|
213242
213310
|
}
|
|
213311
|
+
clipTimeZoneWarned = { done: false };
|
|
213243
213312
|
getClipDeviceRef() {
|
|
213244
213313
|
const configUid = this.config.get("uid");
|
|
213245
213314
|
return {
|
|
@@ -213252,7 +213321,7 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
|
|
|
213252
213321
|
isHubChild: this.isHubChild(),
|
|
213253
213322
|
isBattery: this.isBattery,
|
|
213254
213323
|
sleeping: this.sleeping,
|
|
213255
|
-
timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
213324
|
+
timeZone: resolveClipTimeZoneOnce(Intl.DateTimeFormat().resolvedOptions().timeZone, reolinkTimeZoneToIana(this.config.get("deviceCache")?.systemGeneralSnapshot?.timeZone), this.ctx.logger, this.id, this.clipTimeZoneWarned),
|
|
213256
213325
|
hostKey: String(this.config.get("host") ?? `device-${this.id}`),
|
|
213257
213326
|
getApi: () => this.ensureApi()
|
|
213258
213327
|
};
|
|
@@ -222621,6 +222690,7 @@ var ReolinkProviderAddon = class extends BaseDeviceProvider {
|
|
|
222621
222690
|
await records.declare(reolinkRecordKinds);
|
|
222622
222691
|
const integrationPorts = defaultIntegrationPortsOver({
|
|
222623
222692
|
api: defaultIntegrationApiOver(this.ctx.api),
|
|
222693
|
+
secrets: this.ctx.secrets ?? null,
|
|
222624
222694
|
records,
|
|
222625
222695
|
kind: reolinkConnectionsEntryKind,
|
|
222626
222696
|
info: (message) => this.ctx.logger.info(message),
|
package/dist/addon.mjs
CHANGED
|
@@ -106669,7 +106669,7 @@ var ZodIssueCode = {
|
|
|
106669
106669
|
var ZodFirstPartyTypeKind;
|
|
106670
106670
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
106671
106671
|
//#endregion
|
|
106672
|
-
//#region ../types/dist/sleep-
|
|
106672
|
+
//#region ../types/dist/sleep-9TIHFj1w.mjs
|
|
106673
106673
|
/**
|
|
106674
106674
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
106675
106675
|
* window to float samples (D455).
|
|
@@ -108613,10 +108613,9 @@ var BaseAddon = class {
|
|
|
108613
108613
|
*
|
|
108614
108614
|
* Override it only when an `instanceMode: multiple` addon's instances differ: an NVR integration
|
|
108615
108615
|
* needs its connection fields, the default integration the addon's own sections. It is the
|
|
108616
|
-
* SHAPE of the form only — the values live
|
|
108617
|
-
* unchanged (`integrations.setSettings` for an account integration).
|
|
108616
|
+
* SHAPE of the form only — the values live on the instance record.
|
|
108618
108617
|
*/
|
|
108619
|
-
async
|
|
108618
|
+
async integrationFormSchema(_instance) {
|
|
108620
108619
|
return null;
|
|
108621
108620
|
}
|
|
108622
108621
|
/**
|
|
@@ -108662,7 +108661,7 @@ var BaseAddon = class {
|
|
|
108662
108661
|
* per-instance schema when it declares one, else its global schema (what they always showed).
|
|
108663
108662
|
*/
|
|
108664
108663
|
async getIntegrationFormSchema(instance, nodeId) {
|
|
108665
|
-
const scoped = await this.
|
|
108664
|
+
const scoped = await this.integrationFormSchema(instance);
|
|
108666
108665
|
if (scoped === null) return this.getGlobalSettings(void 0, void 0, nodeId);
|
|
108667
108666
|
return hydrateSchema(scoped, {}, { inlineSecretsAsViews: true });
|
|
108668
108667
|
}
|
|
@@ -112769,7 +112768,7 @@ function sleep(ms) {
|
|
|
112769
112768
|
return new Promise((resolve) => setTimeout(resolve, Math.max(0, ms)));
|
|
112770
112769
|
}
|
|
112771
112770
|
//#endregion
|
|
112772
|
-
//#region ../types/dist/composition-
|
|
112771
|
+
//#region ../types/dist/composition-pOHbTzRB.mjs
|
|
112773
112772
|
/**
|
|
112774
112773
|
* The ffmpeg build every CamStack node downloads, per platform and arch.
|
|
112775
112774
|
*
|
|
@@ -115528,20 +115527,28 @@ async function moveIntegrationRowsToRecords(ports, spec) {
|
|
|
115528
115527
|
};
|
|
115529
115528
|
}
|
|
115530
115529
|
/**
|
|
115531
|
-
* The addon-side ports of `moveIntegrationRowsToRecords` (planning#416)
|
|
115532
|
-
* from its own process, so the
|
|
115533
|
-
* `
|
|
115534
|
-
*
|
|
115535
|
-
*
|
|
115530
|
+
* The addon-side ports of `moveIntegrationRowsToRecords` (planning#416). An addon runs the move
|
|
115531
|
+
* from its own process, so the leftover rows are reached through the migration-only door
|
|
115532
|
+
* (`migrations.readLegacyIntegrationRows` / `clearLegacyIntegrationRows`) on the hub's connection.
|
|
115533
|
+
* The door returns markers. This process is the owner, so it resolves and releases them with
|
|
115534
|
+
* `resolveSecretMarkers` — the same call the old settings door used — and only then asks the
|
|
115535
|
+
* door to delete the rows. The addon's own record kind is its records handle.
|
|
115536
115536
|
*/
|
|
115537
|
+
async function resolvedRows(stored, secrets) {
|
|
115538
|
+
if (secrets === null) return stored;
|
|
115539
|
+
const { value, unresolved } = await resolveSecretMarkers(stored, secrets);
|
|
115540
|
+
if (unresolved.length > 0) throw new Error(`${unresolved.length} secret(s) cannot be read from the keychain`);
|
|
115541
|
+
return value;
|
|
115542
|
+
}
|
|
115537
115543
|
function integrationRowsPortsOverApi(deps) {
|
|
115544
|
+
const secrets = deps.secrets ?? null;
|
|
115538
115545
|
return {
|
|
115539
115546
|
warn: (message) => deps.log.warn(message),
|
|
115540
115547
|
listIntegrations: async (addonId) => (await deps.api.list()).filter((i) => i.addonId === addonId).map((i) => ({
|
|
115541
115548
|
id: i.id,
|
|
115542
115549
|
name: i.name
|
|
115543
115550
|
})),
|
|
115544
|
-
readRows: (integrationId) => deps.api.
|
|
115551
|
+
readRows: async (integrationId) => resolvedRows(await deps.api.readLegacyIntegrationRows({ integrationId }), secrets),
|
|
115545
115552
|
putRecord: async (id, body) => {
|
|
115546
115553
|
if (await deps.records.get(id) !== null) return "exists";
|
|
115547
115554
|
try {
|
|
@@ -115560,7 +115567,9 @@ function integrationRowsPortsOverApi(deps) {
|
|
|
115560
115567
|
await deps.records.delete(id);
|
|
115561
115568
|
},
|
|
115562
115569
|
clearRows: async (integrationId) => {
|
|
115563
|
-
await deps.api.
|
|
115570
|
+
const refs = collectSecretMarkerRefs(await deps.api.readLegacyIntegrationRows({ integrationId }));
|
|
115571
|
+
if (refs.length > 0 && secrets !== null) await secrets.delete(refs);
|
|
115572
|
+
await deps.api.clearLegacyIntegrationRows({ integrationId });
|
|
115564
115573
|
}
|
|
115565
115574
|
};
|
|
115566
115575
|
}
|
|
@@ -115650,14 +115659,14 @@ async function claimDevicesToDefaultIntegration(ports, spec) {
|
|
|
115650
115659
|
* 2. `claim-devices` (tolerate): `claimDevicesToDefaultIntegration`; with no integration to claim
|
|
115651
115660
|
* to it fails and is retried on the next boot.
|
|
115652
115661
|
*
|
|
115653
|
-
* Both run in the addon process through the hub API (`ctx.api`)
|
|
115654
|
-
*
|
|
115655
|
-
* from the record, not from the rows.
|
|
115662
|
+
* Both run in the addon process through the hub API (`ctx.api`). The leftover rows are read
|
|
115663
|
+
* through the migration-only door, which answers empty once the store is gone.
|
|
115656
115664
|
*/
|
|
115657
115665
|
function defaultIntegrationPortsOver(deps) {
|
|
115658
115666
|
return {
|
|
115659
115667
|
...integrationRowsPortsOverApi({
|
|
115660
115668
|
api: deps.api,
|
|
115669
|
+
...deps.secrets !== void 0 ? { secrets: deps.secrets } : {},
|
|
115661
115670
|
records: deps.records.kind({
|
|
115662
115671
|
name: deps.kind.name,
|
|
115663
115672
|
declaration: deps.kind.declaration,
|
|
@@ -115722,8 +115731,8 @@ function claimDevicesMigration(spec) {
|
|
|
115722
115731
|
function defaultIntegrationApiOver(api) {
|
|
115723
115732
|
return {
|
|
115724
115733
|
list: () => api.integrations.list.query(),
|
|
115725
|
-
|
|
115726
|
-
|
|
115734
|
+
readLegacyIntegrationRows: (input) => api.migrations.readLegacyIntegrationRows.query(input),
|
|
115735
|
+
clearLegacyIntegrationRows: (input) => api.migrations.clearLegacyIntegrationRows.mutate(input),
|
|
115727
115736
|
listDevices: (addonId) => api.deviceManager.listAll.query({
|
|
115728
115737
|
addonId,
|
|
115729
115738
|
projection: "slim"
|
|
@@ -151874,6 +151883,9 @@ var RunningProposalEvidenceSchema = object({
|
|
|
151874
151883
|
runsFound: number().int().nonnegative(),
|
|
151875
151884
|
pausesFound: number().int().nonnegative(),
|
|
151876
151885
|
longestPauseMs: number().nonnegative(),
|
|
151886
|
+
/** Episodes shorter than ~90 s (an anti-crease pulse, a display waking): never a run, never a pause. */
|
|
151887
|
+
pulsesFound: number().int().nonnegative(),
|
|
151888
|
+
longestPulseMs: number().nonnegative(),
|
|
151877
151889
|
idleFloorW: number(),
|
|
151878
151890
|
noiseCeilingW: number(),
|
|
151879
151891
|
plateauW: number(),
|
|
@@ -157772,11 +157784,7 @@ var CreateIntegrationInputSchema = object({
|
|
|
157772
157784
|
info: record(string(), unknown()).optional(),
|
|
157773
157785
|
/** `stableId` of the discovery candidate the form was seeded from (D984). */
|
|
157774
157786
|
originStableId: string().optional(),
|
|
157775
|
-
settings: record(string(), unknown()).optional()
|
|
157776
|
-
/** Keys of `settings` the form's schema declares secret (by type) — kept in
|
|
157777
|
-
* the keychain, not the table (D787). */
|
|
157778
|
-
secretKeys: array(string()).optional(),
|
|
157779
|
-
skipRestart: boolean().optional()
|
|
157787
|
+
settings: record(string(), unknown()).optional()
|
|
157780
157788
|
});
|
|
157781
157789
|
var UpdateIntegrationInputSchema = object({
|
|
157782
157790
|
id: string(),
|
|
@@ -157797,22 +157805,6 @@ method(_void(), array(IntegrationWithStateSchema)), method(object({ id: string()
|
|
|
157797
157805
|
}), method(object({ id: string() }), DeleteIntegrationResultSchema, {
|
|
157798
157806
|
kind: "mutation",
|
|
157799
157807
|
auth: "admin"
|
|
157800
|
-
}), method(object({ id: string() }), record(string(), unknown()), { auth: "admin" }), method(object({
|
|
157801
|
-
id: string(),
|
|
157802
|
-
settings: record(string(), unknown()),
|
|
157803
|
-
/** Keys the form's schema declares secret (by type) — keychain-stored (D787). */
|
|
157804
|
-
secretKeys: array(string()).optional(),
|
|
157805
|
-
/** The integration's own addon applies the change in-process and asks the hub not to respawn it. */
|
|
157806
|
-
skipRestart: boolean().optional()
|
|
157807
|
-
}), object({ success: boolean() }), {
|
|
157808
|
-
kind: "mutation",
|
|
157809
|
-
auth: "admin"
|
|
157810
|
-
}), method(object({ id: string() }), object({
|
|
157811
|
-
rows: number().int().nonnegative(),
|
|
157812
|
-
secrets: number().int().nonnegative()
|
|
157813
|
-
}), {
|
|
157814
|
-
kind: "mutation",
|
|
157815
|
-
auth: "admin"
|
|
157816
157808
|
}), method(_void(), array(AvailableIntegrationTypeSchema), { auth: "admin" }), method(object({
|
|
157817
157809
|
addonId: string(),
|
|
157818
157810
|
settings: record(string(), unknown())
|
|
@@ -160810,6 +160802,27 @@ method(object({}), object({ entries: array(MigrationLedgerEntrySchema) }), { aut
|
|
|
160810
160802
|
}), {
|
|
160811
160803
|
kind: "mutation",
|
|
160812
160804
|
auth: "admin"
|
|
160805
|
+
}), method(object({ integrationId: string().min(1) }), record(string(), unknown()), { auth: "admin" }), method(object({ integrationId: string().min(1) }), object({
|
|
160806
|
+
rows: number().int().nonnegative(),
|
|
160807
|
+
secrets: number().int().nonnegative()
|
|
160808
|
+
}), {
|
|
160809
|
+
kind: "mutation",
|
|
160810
|
+
auth: "admin"
|
|
160811
|
+
}), method(object({
|
|
160812
|
+
integrationId: string().min(1),
|
|
160813
|
+
patch: record(string(), unknown())
|
|
160814
|
+
}), object({ written: boolean() }), {
|
|
160815
|
+
kind: "mutation",
|
|
160816
|
+
auth: "admin"
|
|
160817
|
+
}), method(object({
|
|
160818
|
+
integrationId: string().min(1),
|
|
160819
|
+
keys: array(string().min(1))
|
|
160820
|
+
}), object({
|
|
160821
|
+
present: boolean(),
|
|
160822
|
+
removed: record(string(), unknown())
|
|
160823
|
+
}), {
|
|
160824
|
+
kind: "mutation",
|
|
160825
|
+
auth: "admin"
|
|
160813
160826
|
});
|
|
160814
160827
|
method(object({
|
|
160815
160828
|
sourceUrl: string(),
|
|
@@ -183321,11 +183334,15 @@ discriminatedUnion("kind", [object({
|
|
|
183321
183334
|
* 1. idle floor F = time-weighted median; noise ceiling N = highest value seen
|
|
183322
183335
|
* near F. A device that is not near one level most of the time has no floor.
|
|
183323
183336
|
* 2. coarse activity = above max(2N, N + 5 W); consecutive stretches are episodes.
|
|
183324
|
-
* 3.
|
|
183325
|
-
*
|
|
183337
|
+
* 3. an episode shorter than `PULSE_MAX_MS` is a PULSE (an anti-crease tumble, a
|
|
183338
|
+
* display waking): it is neither a run nor a pause. Among the remaining
|
|
183339
|
+
* episodes, gaps over `PAUSE_MAX_MS` always separate runs; the rest split in
|
|
183340
|
+
* two by the largest log-scale jump (>= 3x): the short ones are pauses INSIDE
|
|
183341
|
+
* a run (a soak), the long ones separate runs. A stretch under `MIN_RUN_MS`
|
|
183342
|
+
* is no run.
|
|
183326
183343
|
* 4. T = geometric mean of N and the plateau's 10th percentile, snapped to a
|
|
183327
|
-
* grid a person would type; stop dwell covers the longest pause
|
|
183328
|
-
* covers the longest standby blip above T.
|
|
183344
|
+
* grid a person would type; stop dwell covers the longest pause and the
|
|
183345
|
+
* kind's floor; start dwell covers the longest pulse and standby blip above T.
|
|
183329
183346
|
* 5. the numbers are proved by REPLAY through the real `dwell` evaluation: each
|
|
183330
183347
|
* run must hold exactly one true interval and nothing may flap outside.
|
|
183331
183348
|
*/
|
|
@@ -183336,6 +183353,10 @@ var MINUTE_MS$1 = 60 * SECOND_MS;
|
|
|
183336
183353
|
30 * SECOND_MS;
|
|
183337
183354
|
60 * SECOND_MS;
|
|
183338
183355
|
20 * MINUTE_MS$1;
|
|
183356
|
+
90 * SECOND_MS;
|
|
183357
|
+
30 * MINUTE_MS$1;
|
|
183358
|
+
10 * MINUTE_MS$1;
|
|
183359
|
+
DeviceType.Dryer, 3 * MINUTE_MS$1, DeviceType.Dishwasher, 3 * MINUTE_MS$1, DeviceType.Washer, 10 * MINUTE_MS$1;
|
|
183339
183360
|
10 * SECOND_MS;
|
|
183340
183361
|
10 * SECOND_MS;
|
|
183341
183362
|
/**
|
|
@@ -188768,13 +188789,6 @@ Object.freeze({
|
|
|
188768
188789
|
access: "create",
|
|
188769
188790
|
role: "admin"
|
|
188770
188791
|
},
|
|
188771
|
-
"integrations.clearSettings": {
|
|
188772
|
-
capName: "integrations",
|
|
188773
|
-
capScope: "system",
|
|
188774
|
-
addonId: null,
|
|
188775
|
-
access: "delete",
|
|
188776
|
-
role: "admin"
|
|
188777
|
-
},
|
|
188778
188792
|
"integrations.create": {
|
|
188779
188793
|
capName: "integrations",
|
|
188780
188794
|
capScope: "system",
|
|
@@ -188810,13 +188824,6 @@ Object.freeze({
|
|
|
188810
188824
|
access: "view",
|
|
188811
188825
|
role: "admin"
|
|
188812
188826
|
},
|
|
188813
|
-
"integrations.getSettings": {
|
|
188814
|
-
capName: "integrations",
|
|
188815
|
-
capScope: "system",
|
|
188816
|
-
addonId: null,
|
|
188817
|
-
access: "view",
|
|
188818
|
-
role: "admin"
|
|
188819
|
-
},
|
|
188820
188827
|
"integrations.list": {
|
|
188821
188828
|
capName: "integrations",
|
|
188822
188829
|
capScope: "system",
|
|
@@ -188824,13 +188831,6 @@ Object.freeze({
|
|
|
188824
188831
|
access: "view",
|
|
188825
188832
|
role: "admin"
|
|
188826
188833
|
},
|
|
188827
|
-
"integrations.setSettings": {
|
|
188828
|
-
capName: "integrations",
|
|
188829
|
-
capScope: "system",
|
|
188830
|
-
addonId: null,
|
|
188831
|
-
access: "create",
|
|
188832
|
-
role: "admin"
|
|
188833
|
-
},
|
|
188834
188834
|
"integrations.testConnection": {
|
|
188835
188835
|
capName: "integrations",
|
|
188836
188836
|
capScope: "system",
|
|
@@ -189825,6 +189825,13 @@ Object.freeze({
|
|
|
189825
189825
|
access: "view",
|
|
189826
189826
|
role: "admin"
|
|
189827
189827
|
},
|
|
189828
|
+
"migrations.clearLegacyIntegrationRows": {
|
|
189829
|
+
capName: "migrations",
|
|
189830
|
+
capScope: "system",
|
|
189831
|
+
addonId: null,
|
|
189832
|
+
access: "delete",
|
|
189833
|
+
role: "admin"
|
|
189834
|
+
},
|
|
189828
189835
|
"migrations.declareOwner": {
|
|
189829
189836
|
capName: "migrations",
|
|
189830
189837
|
capScope: "system",
|
|
@@ -189832,6 +189839,13 @@ Object.freeze({
|
|
|
189832
189839
|
access: "create",
|
|
189833
189840
|
role: "admin"
|
|
189834
189841
|
},
|
|
189842
|
+
"migrations.deleteLegacyIntegrationRowKeys": {
|
|
189843
|
+
capName: "migrations",
|
|
189844
|
+
capScope: "system",
|
|
189845
|
+
addonId: null,
|
|
189846
|
+
access: "delete",
|
|
189847
|
+
role: "admin"
|
|
189848
|
+
},
|
|
189835
189849
|
"migrations.dryRun": {
|
|
189836
189850
|
capName: "migrations",
|
|
189837
189851
|
capScope: "system",
|
|
@@ -189867,6 +189881,20 @@ Object.freeze({
|
|
|
189867
189881
|
access: "create",
|
|
189868
189882
|
role: "admin"
|
|
189869
189883
|
},
|
|
189884
|
+
"migrations.patchLegacyIntegrationRows": {
|
|
189885
|
+
capName: "migrations",
|
|
189886
|
+
capScope: "system",
|
|
189887
|
+
addonId: null,
|
|
189888
|
+
access: "create",
|
|
189889
|
+
role: "admin"
|
|
189890
|
+
},
|
|
189891
|
+
"migrations.readLegacyIntegrationRows": {
|
|
189892
|
+
capName: "migrations",
|
|
189893
|
+
capScope: "system",
|
|
189894
|
+
addonId: null,
|
|
189895
|
+
access: "view",
|
|
189896
|
+
role: "admin"
|
|
189897
|
+
},
|
|
189870
189898
|
"migrations.restorePreMigration": {
|
|
189871
189899
|
capName: "migrations",
|
|
189872
189900
|
capScope: "system",
|
|
@@ -206773,6 +206801,46 @@ var IntercomFailureReport = class {
|
|
|
206773
206801
|
/** The process-wide instance every camera in this addon notes into. */
|
|
206774
206802
|
var intercomFailureReport = new IntercomFailureReport();
|
|
206775
206803
|
//#endregion
|
|
206804
|
+
//#region src/clips/clip-time-zone.ts
|
|
206805
|
+
function isUsableTimeZone(timeZone) {
|
|
206806
|
+
try {
|
|
206807
|
+
new Intl.DateTimeFormat("en-US", { timeZone });
|
|
206808
|
+
return true;
|
|
206809
|
+
} catch {
|
|
206810
|
+
return false;
|
|
206811
|
+
}
|
|
206812
|
+
}
|
|
206813
|
+
/**
|
|
206814
|
+
* @param candidate the zone the process reports
|
|
206815
|
+
* @param cameraZone a zone derived from the camera's reported UTC offset, if any
|
|
206816
|
+
*/
|
|
206817
|
+
function resolveClipTimeZone(candidate, cameraZone) {
|
|
206818
|
+
if (isUsableTimeZone(candidate)) return { timeZone: candidate };
|
|
206819
|
+
if (cameraZone !== void 0 && isUsableTimeZone(cameraZone)) return {
|
|
206820
|
+
timeZone: cameraZone,
|
|
206821
|
+
rejected: candidate
|
|
206822
|
+
};
|
|
206823
|
+
return {
|
|
206824
|
+
timeZone: "UTC",
|
|
206825
|
+
rejected: candidate
|
|
206826
|
+
};
|
|
206827
|
+
}
|
|
206828
|
+
/** Resolve and, when the candidate was refused, warn ONCE per `warned` holder. */
|
|
206829
|
+
function resolveClipTimeZoneOnce(candidate, cameraZone, logger, deviceId, warned) {
|
|
206830
|
+
const res = resolveClipTimeZone(candidate, cameraZone);
|
|
206831
|
+
if (res.rejected !== void 0 && !warned.done) {
|
|
206832
|
+
warned.done = true;
|
|
206833
|
+
logger.warn("clip catalog: the process time zone is not usable, using a fallback", {
|
|
206834
|
+
tags: { deviceId },
|
|
206835
|
+
meta: {
|
|
206836
|
+
rejectedTimeZone: res.rejected,
|
|
206837
|
+
fallbackTimeZone: res.timeZone
|
|
206838
|
+
}
|
|
206839
|
+
});
|
|
206840
|
+
}
|
|
206841
|
+
return res.timeZone;
|
|
206842
|
+
}
|
|
206843
|
+
//#endregion
|
|
206776
206844
|
//#region src/baichuan-webhook-shared.ts
|
|
206777
206845
|
/** The data-plane prefix this addon serves the camera push on: `/addon/<addonId>/webhook/<stableId>`. */
|
|
206778
206846
|
var BAICHUAN_WEBHOOK_PREFIX = "webhook";
|
|
@@ -213232,6 +213300,7 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
|
|
|
213232
213300
|
async wakeForClipCatalogRefresh() {
|
|
213233
213301
|
if (!await this.wakeIfSleeping()) throw new Error(`ReolinkCamera ${this.id}: the authorised clip-refresh wake did not bring the camera up`);
|
|
213234
213302
|
}
|
|
213303
|
+
clipTimeZoneWarned = { done: false };
|
|
213235
213304
|
getClipDeviceRef() {
|
|
213236
213305
|
const configUid = this.config.get("uid");
|
|
213237
213306
|
return {
|
|
@@ -213244,7 +213313,7 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
|
|
|
213244
213313
|
isHubChild: this.isHubChild(),
|
|
213245
213314
|
isBattery: this.isBattery,
|
|
213246
213315
|
sleeping: this.sleeping,
|
|
213247
|
-
timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
213316
|
+
timeZone: resolveClipTimeZoneOnce(Intl.DateTimeFormat().resolvedOptions().timeZone, reolinkTimeZoneToIana(this.config.get("deviceCache")?.systemGeneralSnapshot?.timeZone), this.ctx.logger, this.id, this.clipTimeZoneWarned),
|
|
213248
213317
|
hostKey: String(this.config.get("host") ?? `device-${this.id}`),
|
|
213249
213318
|
getApi: () => this.ensureApi()
|
|
213250
213319
|
};
|
|
@@ -222613,6 +222682,7 @@ var ReolinkProviderAddon = class extends BaseDeviceProvider {
|
|
|
222613
222682
|
await records.declare(reolinkRecordKinds);
|
|
222614
222683
|
const integrationPorts = defaultIntegrationPortsOver({
|
|
222615
222684
|
api: defaultIntegrationApiOver(this.ctx.api),
|
|
222685
|
+
secrets: this.ctx.secrets ?? null,
|
|
222616
222686
|
records,
|
|
222617
222687
|
kind: reolinkConnectionsEntryKind,
|
|
222618
222688
|
info: (message) => this.ctx.logger.info(message),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-reolink",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.226",
|
|
4
4
|
"description": "Reolink camera device provider addon for CamStack — native Baichuan protocol",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
"werift"
|
|
97
97
|
],
|
|
98
98
|
"requires": {
|
|
99
|
-
"server": ">=1.2.
|
|
99
|
+
"server": ">=1.2.771"
|
|
100
100
|
}
|
|
101
101
|
},
|
|
102
102
|
"files": [
|