@apocaliss92/nodelink-js 0.4.34 → 0.4.35

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.
@@ -3,7 +3,7 @@ import {
3
3
  BaichuanRtspServer,
4
4
  ReolinkBaichuanApi,
5
5
  autoDetectDeviceType
6
- } from "../chunk-OJ5RWPGY.js";
6
+ } from "../chunk-N6TCSER3.js";
7
7
  import "../chunk-AHY4L7JI.js";
8
8
  import {
9
9
  __require
package/dist/index.cjs CHANGED
@@ -16956,7 +16956,19 @@ function computeDeviceCapabilities(params) {
16956
16956
  // lightType >= 2 indicates controllable white LED / floodlight (1 = IR only).
16957
16957
  // ledCtrl > 1 is a secondary signal that rescues firmwares like the Duo 3
16958
16958
  // WiFi which under-report lightType (=1) despite having a real spotlight.
16959
- hasFloodlight: Number.isFinite(lightType) ? lightType >= 2 || hasFloodlightFromLedCtrl : hasFloodlightFromAbilities || hasFloodlightFromLedCtrl,
16959
+ //
16960
+ // Doorbell exception: the Reolink desktop app's native SDK exposes
16961
+ // three SEPARATE ability flags — `supportFloodLight`, `supportDoorbellLight`
16962
+ // (with KeepOff/KeepOn sub-flags) and `supportIndicatorLight`. Doorbell-class
16963
+ // devices route the ring / button-area LED through `supportDoorbellLight`,
16964
+ // which is NOT a controllable white-light floodlight. We don't have a
16965
+ // documented bit-level mapping for ledCtrl, so we use the narrowest
16966
+ // rule that matches Reolink's own taxonomy: when the firmware is
16967
+ // categorical with lightType=0 AND the device identifies itself as a
16968
+ // doorbell (doorbellVersion > 0), trust lightType=0 and ignore the
16969
+ // ledCtrl bitmask. Verified against UID 9527000ICL1T1MDS (lightType=0,
16970
+ // ledCtrl=3073, doorbellVersion=31, no spotlight hardware).
16971
+ hasFloodlight: Number.isFinite(lightType) ? lightType >= 2 || hasFloodlightFromLedCtrl && !(isDoorbellFromSupport && lightType === 0) : hasFloodlightFromAbilities || hasFloodlightFromLedCtrl,
16960
16972
  hasPir: hasPirFromAbilities || hasPirFromSupport,
16961
16973
  isDoorbell,
16962
16974
  hasAutotracking: ptzDisabledBySupport ? false : hasAutotrackingFromSupport || hasAutotrackingFromAbilities,