@apocaliss92/nodelink-js 0.4.35 → 0.4.36

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.
@@ -19193,8 +19193,18 @@ ${xml}`
19193
19193
  * This is more reliable than autoPt in SupportInfo which can be a false positive
19194
19194
  * (e.g., NVR channels report autoPt=1 but don't actually support autotracking).
19195
19195
  *
19196
+ * Doorbell exception (mirrors the {@link computeDeviceCapabilities} floodlight
19197
+ * rule): video-doorbell firmwares (doorbellVersion > 0) ship AiCfg with
19198
+ * `smartTrackMode=1` (the current mode) yet `smartTrackModeAbility=0` (the
19199
+ * firmware's own "no, this device cannot autotrack" flag). Without a PT
19200
+ * motor a doorbell physically cannot autotrack, so when the caller flags the
19201
+ * device as a doorbell AND the firmware admits `smartTrackModeAbility=0`,
19202
+ * trust the firmware and return false. Verified against UID
19203
+ * 9527000ICL1T1MDS: smartTrackMode=1, smartTrackModeAbility=0,
19204
+ * ptzType=0, ptzMode="none", doorbellVersion=31.
19205
+ *
19196
19206
  * @param channel - Channel number (0-based)
19197
- * @param options - Optional timeout
19207
+ * @param options - Optional timeout and doorbell context hint
19198
19208
  * @returns true if autotracking is supported, false otherwise
19199
19209
  */
19200
19210
  async probeAutotrackingSupport(channel, options) {
@@ -19204,6 +19214,14 @@ ${xml}`
19204
19214
  const xml = await this.sendXml({ cmdId: 299, channel: ch, timeoutMs });
19205
19215
  const smartTrackModeRaw = getXmlText(xml, "smartTrackMode");
19206
19216
  const smartTrackMode = Number(smartTrackModeRaw ?? 0);
19217
+ const smartTrackModeAbilityRaw = getXmlText(
19218
+ xml,
19219
+ "smartTrackModeAbility"
19220
+ );
19221
+ const smartTrackModeAbility = smartTrackModeAbilityRaw === void 0 ? void 0 : Number(smartTrackModeAbilityRaw);
19222
+ if (options?.isDoorbell && Number.isFinite(smartTrackModeAbility) && smartTrackModeAbility === 0) {
19223
+ return false;
19224
+ }
19207
19225
  return smartTrackMode > 0;
19208
19226
  } catch {
19209
19227
  return false;
@@ -19296,7 +19314,8 @@ ${xml}`
19296
19314
  const features = this.parseFeaturesFromSupport(support);
19297
19315
  const objects = await this.getAiDetectTypes(ch, { timeoutMs: 1500 });
19298
19316
  const autotrackingProbed = await this.probeAutotrackingSupport(ch, {
19299
- timeoutMs: 1500
19317
+ timeoutMs: 1500,
19318
+ isDoorbell: capabilities.isDoorbell === true
19300
19319
  });
19301
19320
  capabilities.hasAutotracking = autotrackingProbed;
19302
19321
  let presets;
@@ -24806,4 +24825,4 @@ export {
24806
24825
  isTcpFailureThatShouldFallbackToUdp,
24807
24826
  autoDetectDeviceType
24808
24827
  };
24809
- //# sourceMappingURL=chunk-N6TCSER3.js.map
24828
+ //# sourceMappingURL=chunk-6ILAHQF5.js.map