@camstack/addon-provider-tuya 0.2.14 → 0.2.15
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 +67 -26
- package/dist/addon.mjs +67 -26
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -25986,13 +25986,24 @@ method(object({
|
|
|
25986
25986
|
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
25987
25987
|
var ExportSpeedSchema = number().min(.25).max(32);
|
|
25988
25988
|
/**
|
|
25989
|
-
* One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
|
|
25989
|
+
* One dense interval, in WALL-CLOCK SECONDS FROM THE EXPORT'S OWN `fromMs`.
|
|
25990
25990
|
*
|
|
25991
|
-
*
|
|
25992
|
-
*
|
|
25993
|
-
*
|
|
25994
|
-
*
|
|
25995
|
-
*
|
|
25991
|
+
* **Wall clock, not ffmpeg's `t`** — and the recorder translates. A caller
|
|
25992
|
+
* derives these bounds from things that happened at a TIME (a track's
|
|
25993
|
+
* `firstSeen`), while `t` runs over the source playlist: the concatenation of
|
|
25994
|
+
* every segment present for the range, with each recording GAP removed. The
|
|
25995
|
+
* two agree only on a window that recorded without one interruption, and only
|
|
25996
|
+
* the render side knows the segments, so the translation lives there
|
|
25997
|
+
* (`export-dense-map.ts`, addon-pipeline).
|
|
25998
|
+
*
|
|
25999
|
+
* It was not always so. These seconds were fed to `between(t,…)` verbatim, and
|
|
26000
|
+
* on a 10 h window holding 29,393 s of footage every range landed late by the
|
|
26001
|
+
* gap accumulated before it — up to 6,607 s, well past EOF. Nothing matched,
|
|
26002
|
+
* the video was a uniform timelapse, and the log line reported the five ranges
|
|
26003
|
+
* that had been ASKED for (2026-08-13, export `57d14363`, camera 615).
|
|
26004
|
+
*
|
|
26005
|
+
* Relative and not absolute epoch, because an absolute epoch would make every
|
|
26006
|
+
* call site responsible for the same subtraction.
|
|
25996
26007
|
*/
|
|
25997
26008
|
var ExportDenseRangeSchema = object({
|
|
25998
26009
|
fromSec: number().nonnegative(),
|
|
@@ -34606,25 +34617,32 @@ object({
|
|
|
34606
34617
|
var NativeLeaseAdmissionSchema = _enum(["all", "inferred"]);
|
|
34607
34618
|
object({
|
|
34608
34619
|
/**
|
|
34609
|
-
* How
|
|
34620
|
+
* How many delivered frames the worker HOLDS at once, waiting for each one's
|
|
34621
|
+
* detection result.
|
|
34610
34622
|
*
|
|
34611
|
-
*
|
|
34612
|
-
*
|
|
34613
|
-
*
|
|
34614
|
-
*
|
|
34615
|
-
*
|
|
34623
|
+
* This replaced a TTL on 2026-08-13, and the replacement is the whole point:
|
|
34624
|
+
* a time window was never related to the event the pixels were waiting for.
|
|
34625
|
+
* A held frame now lives from delivery until the runner has its `FrameResult`
|
|
34626
|
+
* — at which moment the runner cuts the subject tiles it actually wanted and
|
|
34627
|
+
* releases the frame. The bound exists only so a runner that stops answering
|
|
34628
|
+
* cannot pin RAM: above it the OLDEST held frame is dropped and counted.
|
|
34629
|
+
*
|
|
34630
|
+
* Sizing: the steady state is `inferenceLatency × deliveredFps`, measured at
|
|
34631
|
+
* 40-160 ms × ≤25 fps = 1-4 frames. The default leaves headroom for a hiccup
|
|
34632
|
+
* without ever approaching the old resident set (43 frames × 24.9 MB at 4K).
|
|
34633
|
+
* Raising it does not buy hit rate — it buys tolerance for a slow runner, and
|
|
34634
|
+
* `holdOverflow` on the metrics line is what says you need it.
|
|
34616
34635
|
*/
|
|
34617
|
-
|
|
34636
|
+
holdFrames: number().int().min(1).max(64),
|
|
34618
34637
|
/**
|
|
34619
34638
|
* Hard per-decode-worker RAM ceiling for retained native frames, in MB.
|
|
34620
34639
|
*
|
|
34621
|
-
*
|
|
34622
|
-
*
|
|
34623
|
-
*
|
|
34624
|
-
*
|
|
34625
|
-
*
|
|
34626
|
-
*
|
|
34627
|
-
* rather than giving RAM back — lower this knob if RAM is what you wanted.
|
|
34640
|
+
* Since 2026-08-13 this is a SAFETY ceiling and nothing else: `holdFrames`
|
|
34641
|
+
* is what decides how much is held, and the ceiling is the number above which
|
|
34642
|
+
* something is wrong. Before that it was the effective cap — at 1024 MB with
|
|
34643
|
+
* a 2 800 ms TTL a 4K camera sat pinned at `leaseMb:1020, leaseFrames:43`
|
|
34644
|
+
* with the TTL expiring nothing, which is exactly the confusion the hold
|
|
34645
|
+
* removes. `leaseMb` / `leaseFrames` still say what is resident.
|
|
34628
34646
|
* `0` DISABLES the lease entirely and falls the worker back to the tiny
|
|
34629
34647
|
* leak-prone GPU surface ring (~85% crop miss; that is what the lease exists
|
|
34630
34648
|
* to replace).
|
|
@@ -34650,22 +34668,45 @@ object({
|
|
|
34650
34668
|
* there is the signal that some caller names frames outside the inference set
|
|
34651
34669
|
* and that this must go back to `all`.
|
|
34652
34670
|
*/
|
|
34653
|
-
admission: NativeLeaseAdmissionSchema
|
|
34671
|
+
admission: NativeLeaseAdmissionSchema,
|
|
34672
|
+
/**
|
|
34673
|
+
* RAM ceiling per decode worker, in MB, for the SUBJECT TILES — the
|
|
34674
|
+
* compressed native crops the worker cuts at the moment a frame's detection
|
|
34675
|
+
* result arrives, and keeps long after the frame itself is freed.
|
|
34676
|
+
*
|
|
34677
|
+
* This is the knob that replaced the old retention window, and it buys about
|
|
34678
|
+
* three orders of magnitude more of it: a tile is one subject at native
|
|
34679
|
+
* resolution, JPEG-encoded (~60-120 KB on a 4K person), against ~24.9 MB for
|
|
34680
|
+
* the frame it was cut from. A frame on which nothing was detected costs
|
|
34681
|
+
* nothing at all, which is the real change — the old lease paid per FRAME and
|
|
34682
|
+
* was interrogated per SUBJECT.
|
|
34683
|
+
*
|
|
34684
|
+
* `0` DISABLES tiles, leaving only the hold window and the ≤640 RAM
|
|
34685
|
+
* fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
|
|
34686
|
+
* reproduce that.
|
|
34687
|
+
*/
|
|
34688
|
+
tileBudgetMb: number().int().min(0).max(1024)
|
|
34654
34689
|
});
|
|
34655
34690
|
/**
|
|
34656
|
-
* The values in force when the operator has set nothing
|
|
34657
|
-
*
|
|
34658
|
-
*
|
|
34691
|
+
* The values in force when the operator has set nothing.
|
|
34692
|
+
*
|
|
34693
|
+
* `budgetMb` stays at 1024 on the day the hold landed, deliberately: it stopped
|
|
34694
|
+
* being the retention window and became the OOM ceiling, and lowering a ceiling
|
|
34695
|
+
* in the same change that redefines it would make a regression and a retune
|
|
34696
|
+
* indistinguishable. Cut it once `tileHits` / `holdOverflow` have been read on
|
|
34697
|
+
* live traffic.
|
|
34659
34698
|
*/
|
|
34660
34699
|
var DEFAULT_NATIVE_LEASE_SETTINGS = {
|
|
34661
|
-
|
|
34700
|
+
holdFrames: 8,
|
|
34662
34701
|
budgetMb: 1024,
|
|
34663
34702
|
activityMs: 15e3,
|
|
34703
|
+
tileBudgetMb: 64,
|
|
34664
34704
|
admission: "inferred"
|
|
34665
34705
|
};
|
|
34666
|
-
DEFAULT_NATIVE_LEASE_SETTINGS.
|
|
34706
|
+
DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
|
|
34667
34707
|
DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
|
|
34668
34708
|
DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
|
|
34709
|
+
DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
|
|
34669
34710
|
DEFAULT_NATIVE_LEASE_SETTINGS.admission;
|
|
34670
34711
|
//#endregion
|
|
34671
34712
|
//#region src/config.ts
|
package/dist/addon.mjs
CHANGED
|
@@ -25985,13 +25985,24 @@ method(object({
|
|
|
25985
25985
|
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
25986
25986
|
var ExportSpeedSchema = number().min(.25).max(32);
|
|
25987
25987
|
/**
|
|
25988
|
-
* One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
|
|
25988
|
+
* One dense interval, in WALL-CLOCK SECONDS FROM THE EXPORT'S OWN `fromMs`.
|
|
25989
25989
|
*
|
|
25990
|
-
*
|
|
25991
|
-
*
|
|
25992
|
-
*
|
|
25993
|
-
*
|
|
25994
|
-
*
|
|
25990
|
+
* **Wall clock, not ffmpeg's `t`** — and the recorder translates. A caller
|
|
25991
|
+
* derives these bounds from things that happened at a TIME (a track's
|
|
25992
|
+
* `firstSeen`), while `t` runs over the source playlist: the concatenation of
|
|
25993
|
+
* every segment present for the range, with each recording GAP removed. The
|
|
25994
|
+
* two agree only on a window that recorded without one interruption, and only
|
|
25995
|
+
* the render side knows the segments, so the translation lives there
|
|
25996
|
+
* (`export-dense-map.ts`, addon-pipeline).
|
|
25997
|
+
*
|
|
25998
|
+
* It was not always so. These seconds were fed to `between(t,…)` verbatim, and
|
|
25999
|
+
* on a 10 h window holding 29,393 s of footage every range landed late by the
|
|
26000
|
+
* gap accumulated before it — up to 6,607 s, well past EOF. Nothing matched,
|
|
26001
|
+
* the video was a uniform timelapse, and the log line reported the five ranges
|
|
26002
|
+
* that had been ASKED for (2026-08-13, export `57d14363`, camera 615).
|
|
26003
|
+
*
|
|
26004
|
+
* Relative and not absolute epoch, because an absolute epoch would make every
|
|
26005
|
+
* call site responsible for the same subtraction.
|
|
25995
26006
|
*/
|
|
25996
26007
|
var ExportDenseRangeSchema = object({
|
|
25997
26008
|
fromSec: number().nonnegative(),
|
|
@@ -34605,25 +34616,32 @@ object({
|
|
|
34605
34616
|
var NativeLeaseAdmissionSchema = _enum(["all", "inferred"]);
|
|
34606
34617
|
object({
|
|
34607
34618
|
/**
|
|
34608
|
-
* How
|
|
34619
|
+
* How many delivered frames the worker HOLDS at once, waiting for each one's
|
|
34620
|
+
* detection result.
|
|
34609
34621
|
*
|
|
34610
|
-
*
|
|
34611
|
-
*
|
|
34612
|
-
*
|
|
34613
|
-
*
|
|
34614
|
-
*
|
|
34622
|
+
* This replaced a TTL on 2026-08-13, and the replacement is the whole point:
|
|
34623
|
+
* a time window was never related to the event the pixels were waiting for.
|
|
34624
|
+
* A held frame now lives from delivery until the runner has its `FrameResult`
|
|
34625
|
+
* — at which moment the runner cuts the subject tiles it actually wanted and
|
|
34626
|
+
* releases the frame. The bound exists only so a runner that stops answering
|
|
34627
|
+
* cannot pin RAM: above it the OLDEST held frame is dropped and counted.
|
|
34628
|
+
*
|
|
34629
|
+
* Sizing: the steady state is `inferenceLatency × deliveredFps`, measured at
|
|
34630
|
+
* 40-160 ms × ≤25 fps = 1-4 frames. The default leaves headroom for a hiccup
|
|
34631
|
+
* without ever approaching the old resident set (43 frames × 24.9 MB at 4K).
|
|
34632
|
+
* Raising it does not buy hit rate — it buys tolerance for a slow runner, and
|
|
34633
|
+
* `holdOverflow` on the metrics line is what says you need it.
|
|
34615
34634
|
*/
|
|
34616
|
-
|
|
34635
|
+
holdFrames: number().int().min(1).max(64),
|
|
34617
34636
|
/**
|
|
34618
34637
|
* Hard per-decode-worker RAM ceiling for retained native frames, in MB.
|
|
34619
34638
|
*
|
|
34620
|
-
*
|
|
34621
|
-
*
|
|
34622
|
-
*
|
|
34623
|
-
*
|
|
34624
|
-
*
|
|
34625
|
-
*
|
|
34626
|
-
* rather than giving RAM back — lower this knob if RAM is what you wanted.
|
|
34639
|
+
* Since 2026-08-13 this is a SAFETY ceiling and nothing else: `holdFrames`
|
|
34640
|
+
* is what decides how much is held, and the ceiling is the number above which
|
|
34641
|
+
* something is wrong. Before that it was the effective cap — at 1024 MB with
|
|
34642
|
+
* a 2 800 ms TTL a 4K camera sat pinned at `leaseMb:1020, leaseFrames:43`
|
|
34643
|
+
* with the TTL expiring nothing, which is exactly the confusion the hold
|
|
34644
|
+
* removes. `leaseMb` / `leaseFrames` still say what is resident.
|
|
34627
34645
|
* `0` DISABLES the lease entirely and falls the worker back to the tiny
|
|
34628
34646
|
* leak-prone GPU surface ring (~85% crop miss; that is what the lease exists
|
|
34629
34647
|
* to replace).
|
|
@@ -34649,22 +34667,45 @@ object({
|
|
|
34649
34667
|
* there is the signal that some caller names frames outside the inference set
|
|
34650
34668
|
* and that this must go back to `all`.
|
|
34651
34669
|
*/
|
|
34652
|
-
admission: NativeLeaseAdmissionSchema
|
|
34670
|
+
admission: NativeLeaseAdmissionSchema,
|
|
34671
|
+
/**
|
|
34672
|
+
* RAM ceiling per decode worker, in MB, for the SUBJECT TILES — the
|
|
34673
|
+
* compressed native crops the worker cuts at the moment a frame's detection
|
|
34674
|
+
* result arrives, and keeps long after the frame itself is freed.
|
|
34675
|
+
*
|
|
34676
|
+
* This is the knob that replaced the old retention window, and it buys about
|
|
34677
|
+
* three orders of magnitude more of it: a tile is one subject at native
|
|
34678
|
+
* resolution, JPEG-encoded (~60-120 KB on a 4K person), against ~24.9 MB for
|
|
34679
|
+
* the frame it was cut from. A frame on which nothing was detected costs
|
|
34680
|
+
* nothing at all, which is the real change — the old lease paid per FRAME and
|
|
34681
|
+
* was interrogated per SUBJECT.
|
|
34682
|
+
*
|
|
34683
|
+
* `0` DISABLES tiles, leaving only the hold window and the ≤640 RAM
|
|
34684
|
+
* fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
|
|
34685
|
+
* reproduce that.
|
|
34686
|
+
*/
|
|
34687
|
+
tileBudgetMb: number().int().min(0).max(1024)
|
|
34653
34688
|
});
|
|
34654
34689
|
/**
|
|
34655
|
-
* The values in force when the operator has set nothing
|
|
34656
|
-
*
|
|
34657
|
-
*
|
|
34690
|
+
* The values in force when the operator has set nothing.
|
|
34691
|
+
*
|
|
34692
|
+
* `budgetMb` stays at 1024 on the day the hold landed, deliberately: it stopped
|
|
34693
|
+
* being the retention window and became the OOM ceiling, and lowering a ceiling
|
|
34694
|
+
* in the same change that redefines it would make a regression and a retune
|
|
34695
|
+
* indistinguishable. Cut it once `tileHits` / `holdOverflow` have been read on
|
|
34696
|
+
* live traffic.
|
|
34658
34697
|
*/
|
|
34659
34698
|
var DEFAULT_NATIVE_LEASE_SETTINGS = {
|
|
34660
|
-
|
|
34699
|
+
holdFrames: 8,
|
|
34661
34700
|
budgetMb: 1024,
|
|
34662
34701
|
activityMs: 15e3,
|
|
34702
|
+
tileBudgetMb: 64,
|
|
34663
34703
|
admission: "inferred"
|
|
34664
34704
|
};
|
|
34665
|
-
DEFAULT_NATIVE_LEASE_SETTINGS.
|
|
34705
|
+
DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
|
|
34666
34706
|
DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
|
|
34667
34707
|
DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
|
|
34708
|
+
DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
|
|
34668
34709
|
DEFAULT_NATIVE_LEASE_SETTINGS.admission;
|
|
34669
34710
|
//#endregion
|
|
34670
34711
|
//#region src/config.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-tuya",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.15",
|
|
4
4
|
"description": "Tuya / Smart Life device-provider addon for CamStack — account-onboarded (Tuya IoT cloud fetch of device localKeys) + LOCAL DP control via the @apocaliss92/nodetuya encrypted-LAN client, exposing switch / water-heater-family kettle entities",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|