@apocaliss92/nodelink-js 0.4.18 → 0.4.19

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-EF6BCSCZ.js";
6
+ } from "../chunk-5M7BGMLV.js";
7
7
  import "../chunk-S2UTGNFN.js";
8
8
  import {
9
9
  __require
package/dist/index.cjs CHANGED
@@ -16858,6 +16858,9 @@ function computeDeviceCapabilities(params) {
16858
16858
  const isDoorbellFromModel = typeof params.model === "string" && /doorbell/i.test(params.model);
16859
16859
  const lightTypeRaw = supportItem ? supportItem.lightType : void 0;
16860
16860
  const lightType = typeof lightTypeRaw === "number" ? lightTypeRaw : typeof lightTypeRaw === "string" ? Number(lightTypeRaw) : void 0;
16861
+ const ledCtrlRaw = supportItem ? supportItem.ledCtrl : void 0;
16862
+ const ledCtrl = typeof ledCtrlRaw === "number" ? ledCtrlRaw : typeof ledCtrlRaw === "string" ? Number(ledCtrlRaw) : void 0;
16863
+ const hasFloodlightFromLedCtrl = typeof ledCtrl === "number" && Number.isFinite(ledCtrl) && ledCtrl > 1;
16861
16864
  const hasPtzFromSupport = hasPtzFromSupportItem || (ptzMode ? ptzMode !== "none" && ptzMode !== "0" : false);
16862
16865
  const hasPanTiltFromSupport = ptzMode ? ptzMode.includes("pt") || ptzMode === "pt" || ptzMode === "ptz" : false;
16863
16866
  const hasZoomFromSupport = ptzMode ? ptzMode.includes("z") : false;
@@ -16900,8 +16903,10 @@ function computeDeviceCapabilities(params) {
16900
16903
  hasBattery,
16901
16904
  hasIntercom: hasIntercomFromSupport,
16902
16905
  hasSiren: hasSirenFromSupport || hasSirenFromAbilities,
16903
- // lightType >= 2 indicates controllable white LED / floodlight (1 = IR only)
16904
- hasFloodlight: Number.isFinite(lightType) ? lightType >= 2 : hasFloodlightFromAbilities,
16906
+ // lightType >= 2 indicates controllable white LED / floodlight (1 = IR only).
16907
+ // ledCtrl > 1 is a secondary signal that rescues firmwares like the Duo 3
16908
+ // WiFi which under-report lightType (=1) despite having a real spotlight.
16909
+ hasFloodlight: Number.isFinite(lightType) ? lightType >= 2 || hasFloodlightFromLedCtrl : hasFloodlightFromAbilities || hasFloodlightFromLedCtrl,
16905
16910
  hasPir: hasPirFromAbilities || hasPirFromSupport,
16906
16911
  isDoorbell,
16907
16912
  hasAutotracking: ptzDisabledBySupport ? false : hasAutotrackingFromSupport || hasAutotrackingFromAbilities,
@@ -26946,7 +26951,7 @@ ${xml}`
26946
26951
  const probed = await this.probeFloodlightSupportByCmd289(ch, {
26947
26952
  timeoutMs: 2500
26948
26953
  });
26949
- capabilities.hasFloodlight = probed;
26954
+ capabilities.hasFloodlight = capabilities.hasFloodlight || probed;
26950
26955
  }
26951
26956
  let dingDongListIds;
26952
26957
  let dingDongCfgIds;