@apocaliss92/nodelink-js 0.6.3 → 0.6.4

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
@@ -11719,7 +11719,28 @@ type AutoDetectResult = {
11719
11719
  api: ReolinkBaichuanApi;
11720
11720
  };
11721
11721
  /**
11722
- * Normalize UID string (trim and return undefined if empty).
11722
+ * Normalize UID string (trim, force uppercase, return undefined if empty).
11723
+ *
11724
+ * Uppercase is non-negotiable for two reasons:
11725
+ *
11726
+ * 1. Reolink's cloud API (`apis.reolink.com/v2/devices/{uid}/server-binding`)
11727
+ * is case-sensitive: a lowercase UID returns HTTP 400
11728
+ * `invalid_parameters` and we lose the per-UID zone hint, falling back
11729
+ * to the full 24-hostname sweep. Verified empirically against a known
11730
+ * good UID — uppercase returns 200 + zone allocation, lowercase
11731
+ * returns 400 + `invalid_parameters`.
11732
+ *
11733
+ * 2. The BCUDP discovery protocol embeds `<uid>...</uid>` in the C2D_C
11734
+ * packet. Cameras compare it against their own self-UID (which they
11735
+ * store uppercase). A lowercase mismatch is silently dropped — the
11736
+ * cam appears "asleep" from `sent=N replies=0` even though it's
11737
+ * awake and on the LAN. BaichuanClient already uppercases for the
11738
+ * XOR/AES nonce derivation; normalizing here makes the whole
11739
+ * pipeline consistent.
11740
+ *
11741
+ * Users in Scrypted / config files sometimes paste UIDs in lowercase
11742
+ * (it works visually with Reolink's own UI, which normalizes
11743
+ * internally) — we shouldn't punish them for that.
11723
11744
  */
11724
11745
  declare function normalizeUid(uid?: string): string | undefined;
11725
11746
  /**
package/dist/index.d.ts CHANGED
@@ -6723,7 +6723,28 @@ export declare function normalizeDayNightMode(input: string): string;
6723
6723
  export declare function normalizeOpenClose(input: string): string;
6724
6724
 
6725
6725
  /**
6726
- * Normalize UID string (trim and return undefined if empty).
6726
+ * Normalize UID string (trim, force uppercase, return undefined if empty).
6727
+ *
6728
+ * Uppercase is non-negotiable for two reasons:
6729
+ *
6730
+ * 1. Reolink's cloud API (`apis.reolink.com/v2/devices/{uid}/server-binding`)
6731
+ * is case-sensitive: a lowercase UID returns HTTP 400
6732
+ * `invalid_parameters` and we lose the per-UID zone hint, falling back
6733
+ * to the full 24-hostname sweep. Verified empirically against a known
6734
+ * good UID — uppercase returns 200 + zone allocation, lowercase
6735
+ * returns 400 + `invalid_parameters`.
6736
+ *
6737
+ * 2. The BCUDP discovery protocol embeds `<uid>...</uid>` in the C2D_C
6738
+ * packet. Cameras compare it against their own self-UID (which they
6739
+ * store uppercase). A lowercase mismatch is silently dropped — the
6740
+ * cam appears "asleep" from `sent=N replies=0` even though it's
6741
+ * awake and on the LAN. BaichuanClient already uppercases for the
6742
+ * XOR/AES nonce derivation; normalizing here makes the whole
6743
+ * pipeline consistent.
6744
+ *
6745
+ * Users in Scrypted / config files sometimes paste UIDs in lowercase
6746
+ * (it works visually with Reolink's own UI, which normalizes
6747
+ * internally) — we shouldn't punish them for that.
6727
6748
  */
6728
6749
  export declare function normalizeUid(uid?: string): string | undefined;
6729
6750
 
package/dist/index.js CHANGED
@@ -72,7 +72,7 @@ import {
72
72
  setGlobalLogger,
73
73
  tcpReachabilityProbe,
74
74
  xmlIndicatesFloodlight
75
- } from "./chunk-Q4AXRV2G.js";
75
+ } from "./chunk-UL34MR4L.js";
76
76
  import {
77
77
  ReolinkCgiApi,
78
78
  ReolinkHttpClient,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apocaliss92/nodelink-js",
3
- "version": "0.6.3",
3
+ "version": "0.6.4",
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": "",