@camstack/addon-provider-reolink 1.2.227 → 1.2.228
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 +6 -0
- package/dist/addon.js +13 -0
- package/dist/addon.mjs +13 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.2.228] - 2026-11-05
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- A deleted camera stops its timers at once instead of polling until the worker restarts
|
|
15
|
+
|
|
10
16
|
## [1.2.227] - 2026-11-05
|
|
11
17
|
|
|
12
18
|
### Changed
|
package/dist/addon.js
CHANGED
|
@@ -212785,6 +212785,8 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
|
|
|
212785
212785
|
* Mirrors the reference's `batteryUpdateTimer`: fires every hour,
|
|
212786
212786
|
* passively checks sleep state, and short-circuits if sleeping. */
|
|
212787
212787
|
batteryUpdateTimer = null;
|
|
212788
|
+
/** Set by `removeDevice`: nothing may re-arm a timer on a removed camera. */
|
|
212789
|
+
removed = false;
|
|
212788
212790
|
/** Single-flight gate so two interval fires can't overlap. */
|
|
212789
212791
|
/** Aux accessory references registered by spawned children
|
|
212790
212792
|
* (siren / floodlight / pir). The parent's centralised align
|
|
@@ -217584,6 +217586,11 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
|
|
|
217584
217586
|
});
|
|
217585
217587
|
}
|
|
217586
217588
|
async removeDevice() {
|
|
217589
|
+
this.removed = true;
|
|
217590
|
+
this.stopSleepPoll();
|
|
217591
|
+
this.stopBatteryUpdatePolling();
|
|
217592
|
+
this.stopAlignAuxPolling();
|
|
217593
|
+
this.stopWatchdogs();
|
|
217587
217594
|
this.detachFromHubSession();
|
|
217588
217595
|
if (this.reconnectTimer) {
|
|
217589
217596
|
clearTimeout(this.reconnectTimer);
|
|
@@ -217753,6 +217760,7 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
|
|
|
217753
217760
|
* `sleeping`/`awake` transition (firmware quirks, NAT timeouts).
|
|
217754
217761
|
*/
|
|
217755
217762
|
startSleepPoll() {
|
|
217763
|
+
if (this.removed) return;
|
|
217756
217764
|
if (this.sleepPollTimer) return;
|
|
217757
217765
|
if (!this.isBattery) return;
|
|
217758
217766
|
if (this.isHubChild()) return;
|
|
@@ -217892,6 +217900,7 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
|
|
|
217892
217900
|
/** Start periodic align for wired cams. No-op for battery cams (wake
|
|
217893
217901
|
* path handles it). Idempotent. */
|
|
217894
217902
|
startAlignAuxPolling() {
|
|
217903
|
+
if (this.removed) return;
|
|
217895
217904
|
if (this.alignAuxTimer) return;
|
|
217896
217905
|
if (this.isBattery) return;
|
|
217897
217906
|
const POLL_MS = 1e4;
|
|
@@ -217972,6 +217981,7 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
|
|
|
217972
217981
|
/** Arm the scheduled-refresh check. No-op for wired cams (their state is
|
|
217973
217982
|
* kept fresh by the 10 s aux-align poll and push events). Idempotent. */
|
|
217974
217983
|
startBatteryUpdatePolling() {
|
|
217984
|
+
if (this.removed) return;
|
|
217975
217985
|
if (this.batteryUpdateTimer) return;
|
|
217976
217986
|
if (!this.isBattery) return;
|
|
217977
217987
|
this.batteryUpdateTimer = setInterval(() => {
|
|
@@ -218101,6 +218111,7 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
|
|
|
218101
218111
|
* with parallel watchdogs after a reconnect cycle.
|
|
218102
218112
|
*/
|
|
218103
218113
|
startWatchdogs() {
|
|
218114
|
+
if (this.removed) return;
|
|
218104
218115
|
this.stopWatchdogs();
|
|
218105
218116
|
this.watchdogStartedAt = Date.now();
|
|
218106
218117
|
this.consecutivePingFailures = 0;
|
|
@@ -218365,6 +218376,7 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
|
|
|
218365
218376
|
* re-subscribes the moment the socket comes back up.
|
|
218366
218377
|
*/
|
|
218367
218378
|
startEventHealthCheck() {
|
|
218379
|
+
if (this.removed) return;
|
|
218368
218380
|
this.stopEventHealthCheck();
|
|
218369
218381
|
this.consecutiveStaleHealthChecks = 0;
|
|
218370
218382
|
this.nextEventHealthCheckAt = 0;
|
|
@@ -220500,6 +220512,7 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
|
|
|
220500
220512
|
}
|
|
220501
220513
|
});
|
|
220502
220514
|
this.api = null;
|
|
220515
|
+
if (this.removed) return;
|
|
220503
220516
|
this.reconnectTimer = setTimeout(() => {
|
|
220504
220517
|
this.reconnectTimer = null;
|
|
220505
220518
|
this.ctx.logger.debug("Baichuan reconnect window elapsed — ready for next demand", { tags: { deviceId: this.id } });
|
package/dist/addon.mjs
CHANGED
|
@@ -212777,6 +212777,8 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
|
|
|
212777
212777
|
* Mirrors the reference's `batteryUpdateTimer`: fires every hour,
|
|
212778
212778
|
* passively checks sleep state, and short-circuits if sleeping. */
|
|
212779
212779
|
batteryUpdateTimer = null;
|
|
212780
|
+
/** Set by `removeDevice`: nothing may re-arm a timer on a removed camera. */
|
|
212781
|
+
removed = false;
|
|
212780
212782
|
/** Single-flight gate so two interval fires can't overlap. */
|
|
212781
212783
|
/** Aux accessory references registered by spawned children
|
|
212782
212784
|
* (siren / floodlight / pir). The parent's centralised align
|
|
@@ -217576,6 +217578,11 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
|
|
|
217576
217578
|
});
|
|
217577
217579
|
}
|
|
217578
217580
|
async removeDevice() {
|
|
217581
|
+
this.removed = true;
|
|
217582
|
+
this.stopSleepPoll();
|
|
217583
|
+
this.stopBatteryUpdatePolling();
|
|
217584
|
+
this.stopAlignAuxPolling();
|
|
217585
|
+
this.stopWatchdogs();
|
|
217579
217586
|
this.detachFromHubSession();
|
|
217580
217587
|
if (this.reconnectTimer) {
|
|
217581
217588
|
clearTimeout(this.reconnectTimer);
|
|
@@ -217745,6 +217752,7 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
|
|
|
217745
217752
|
* `sleeping`/`awake` transition (firmware quirks, NAT timeouts).
|
|
217746
217753
|
*/
|
|
217747
217754
|
startSleepPoll() {
|
|
217755
|
+
if (this.removed) return;
|
|
217748
217756
|
if (this.sleepPollTimer) return;
|
|
217749
217757
|
if (!this.isBattery) return;
|
|
217750
217758
|
if (this.isHubChild()) return;
|
|
@@ -217884,6 +217892,7 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
|
|
|
217884
217892
|
/** Start periodic align for wired cams. No-op for battery cams (wake
|
|
217885
217893
|
* path handles it). Idempotent. */
|
|
217886
217894
|
startAlignAuxPolling() {
|
|
217895
|
+
if (this.removed) return;
|
|
217887
217896
|
if (this.alignAuxTimer) return;
|
|
217888
217897
|
if (this.isBattery) return;
|
|
217889
217898
|
const POLL_MS = 1e4;
|
|
@@ -217964,6 +217973,7 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
|
|
|
217964
217973
|
/** Arm the scheduled-refresh check. No-op for wired cams (their state is
|
|
217965
217974
|
* kept fresh by the 10 s aux-align poll and push events). Idempotent. */
|
|
217966
217975
|
startBatteryUpdatePolling() {
|
|
217976
|
+
if (this.removed) return;
|
|
217967
217977
|
if (this.batteryUpdateTimer) return;
|
|
217968
217978
|
if (!this.isBattery) return;
|
|
217969
217979
|
this.batteryUpdateTimer = setInterval(() => {
|
|
@@ -218093,6 +218103,7 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
|
|
|
218093
218103
|
* with parallel watchdogs after a reconnect cycle.
|
|
218094
218104
|
*/
|
|
218095
218105
|
startWatchdogs() {
|
|
218106
|
+
if (this.removed) return;
|
|
218096
218107
|
this.stopWatchdogs();
|
|
218097
218108
|
this.watchdogStartedAt = Date.now();
|
|
218098
218109
|
this.consecutivePingFailures = 0;
|
|
@@ -218357,6 +218368,7 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
|
|
|
218357
218368
|
* re-subscribes the moment the socket comes back up.
|
|
218358
218369
|
*/
|
|
218359
218370
|
startEventHealthCheck() {
|
|
218371
|
+
if (this.removed) return;
|
|
218360
218372
|
this.stopEventHealthCheck();
|
|
218361
218373
|
this.consecutiveStaleHealthChecks = 0;
|
|
218362
218374
|
this.nextEventHealthCheckAt = 0;
|
|
@@ -220492,6 +220504,7 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
|
|
|
220492
220504
|
}
|
|
220493
220505
|
});
|
|
220494
220506
|
this.api = null;
|
|
220507
|
+
if (this.removed) return;
|
|
220495
220508
|
this.reconnectTimer = setTimeout(() => {
|
|
220496
220509
|
this.reconnectTimer = null;
|
|
220497
220510
|
this.ctx.logger.debug("Baichuan reconnect window elapsed — ready for next demand", { tags: { deviceId: this.id } });
|
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.228",
|
|
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.776"
|
|
100
100
|
}
|
|
101
101
|
},
|
|
102
102
|
"files": [
|