@apocaliss92/nodelink-js 0.4.20 → 0.4.21

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/index.d.cts CHANGED
@@ -5519,6 +5519,25 @@ declare class ReolinkBaichuanApi {
5519
5519
  private simpleEventResubscribeTimer;
5520
5520
  private simpleEventResubscribeInFlight;
5521
5521
  private readonly simpleEventResubscribeIntervalMs;
5522
+ /**
5523
+ * Default `true` for non-UDP transports (TCP / `auto`), `false` for UDP.
5524
+ *
5525
+ * On TCP the periodic 5-min `subscribeEvents` renewal is cheap belt-and-
5526
+ * braces for firmwares that silently drop the push subscription.
5527
+ *
5528
+ * On UDP (battery cameras) every renewal sends cmd_id 31 which wakes
5529
+ * the device, driving an exact-5-minute sleep/awake cycle visible
5530
+ * downstream in MQTT / Home Assistant (continuation of issue #18). The
5531
+ * reactive `simpleEventWatchdog` (10s tick, 5 min silence threshold)
5532
+ * already recovers silent-drop cases without periodic wakes, so the
5533
+ * renewal is disabled by default for UDP.
5534
+ *
5535
+ * `startSimpleEventResubscribeTimer` also re-checks the live transport
5536
+ * before arming the timer, so callers that pick `transport: "auto"` and
5537
+ * end up on UDP at runtime get the safer behaviour even if the flag
5538
+ * was left default-on.
5539
+ */
5540
+ private eventResubscribeEnabled;
5522
5541
  private simpleEventWatchdogTimer;
5523
5542
  private simpleEventLastReceivedAt;
5524
5543
  private simpleEventWatchdogRecoveryAttempts;
@@ -5854,6 +5873,21 @@ declare class ReolinkBaichuanApi {
5854
5873
  * even then the lib skips the poll on UDP transport.
5855
5874
  */
5856
5875
  enableSessionGuard?: boolean;
5876
+ /**
5877
+ * Enable proactive simple-event subscription renewal: every 5 minutes
5878
+ * the lib re-sends `subscribeEvents` (cmd_id 31) so firmwares that
5879
+ * silently drop the push subscription keep delivering events.
5880
+ *
5881
+ * Default: `true` for non-UDP transports (TCP / `auto`), `false` for
5882
+ * UDP (battery cameras). The renewal is harmless on TCP and useful
5883
+ * as belt-and-braces for the rare firmwares that drop subscriptions
5884
+ * without producing event silence. On UDP every renewal wakes the
5885
+ * device, driving an exact 5-minute sleep/awake cycle (continuation
5886
+ * of issue #18); the reactive `simpleEventWatchdog` covers the same
5887
+ * failure mode without the wake-up. Pass `false` explicitly to opt
5888
+ * out on TCP, or `true` to opt in on UDP (not recommended).
5889
+ */
5890
+ enableEventResubscribe?: boolean;
5857
5891
  });
5858
5892
  /**
5859
5893
  * CGI forward: fetch RTSP URL for a channel via `GetRtspUrl`.
package/dist/index.d.ts CHANGED
@@ -6434,6 +6434,25 @@ export declare class ReolinkBaichuanApi {
6434
6434
  private simpleEventResubscribeTimer;
6435
6435
  private simpleEventResubscribeInFlight;
6436
6436
  private readonly simpleEventResubscribeIntervalMs;
6437
+ /**
6438
+ * Default `true` for non-UDP transports (TCP / `auto`), `false` for UDP.
6439
+ *
6440
+ * On TCP the periodic 5-min `subscribeEvents` renewal is cheap belt-and-
6441
+ * braces for firmwares that silently drop the push subscription.
6442
+ *
6443
+ * On UDP (battery cameras) every renewal sends cmd_id 31 which wakes
6444
+ * the device, driving an exact-5-minute sleep/awake cycle visible
6445
+ * downstream in MQTT / Home Assistant (continuation of issue #18). The
6446
+ * reactive `simpleEventWatchdog` (10s tick, 5 min silence threshold)
6447
+ * already recovers silent-drop cases without periodic wakes, so the
6448
+ * renewal is disabled by default for UDP.
6449
+ *
6450
+ * `startSimpleEventResubscribeTimer` also re-checks the live transport
6451
+ * before arming the timer, so callers that pick `transport: "auto"` and
6452
+ * end up on UDP at runtime get the safer behaviour even if the flag
6453
+ * was left default-on.
6454
+ */
6455
+ private eventResubscribeEnabled;
6437
6456
  private simpleEventWatchdogTimer;
6438
6457
  private simpleEventLastReceivedAt;
6439
6458
  private simpleEventWatchdogRecoveryAttempts;
@@ -6769,6 +6788,21 @@ export declare class ReolinkBaichuanApi {
6769
6788
  * even then the lib skips the poll on UDP transport.
6770
6789
  */
6771
6790
  enableSessionGuard?: boolean;
6791
+ /**
6792
+ * Enable proactive simple-event subscription renewal: every 5 minutes
6793
+ * the lib re-sends `subscribeEvents` (cmd_id 31) so firmwares that
6794
+ * silently drop the push subscription keep delivering events.
6795
+ *
6796
+ * Default: `true` for non-UDP transports (TCP / `auto`), `false` for
6797
+ * UDP (battery cameras). The renewal is harmless on TCP and useful
6798
+ * as belt-and-braces for the rare firmwares that drop subscriptions
6799
+ * without producing event silence. On UDP every renewal wakes the
6800
+ * device, driving an exact 5-minute sleep/awake cycle (continuation
6801
+ * of issue #18); the reactive `simpleEventWatchdog` covers the same
6802
+ * failure mode without the wake-up. Pass `false` explicitly to opt
6803
+ * out on TCP, or `true` to opt in on UDP (not recommended).
6804
+ */
6805
+ enableEventResubscribe?: boolean;
6772
6806
  });
6773
6807
  /**
6774
6808
  * CGI forward: fetch RTSP URL for a channel via `GetRtspUrl`.
package/dist/index.js CHANGED
@@ -45,7 +45,7 @@ import {
45
45
  parseSupportXml,
46
46
  setGlobalLogger,
47
47
  xmlIndicatesFloodlight
48
- } from "./chunk-XUL2Y2AL.js";
48
+ } from "./chunk-EZ7WNPLB.js";
49
49
  import {
50
50
  ReolinkCgiApi,
51
51
  ReolinkHttpClient,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apocaliss92/nodelink-js",
3
- "version": "0.4.20",
3
+ "version": "0.4.21",
4
4
  "description": "TypeScript library implementing Reolink Baichuan protocol (control + streaming) with CGI and RTSP helpers. Full TypeScript support with comprehensive type definitions.",
5
5
  "license": "MIT",
6
6
  "author": "",