Skip to content

@mega-yfue/eufy-sdk / DetectionSpec

Interface: DetectionSpec ​

How a capability is discovered on a device. All fields are additive OR-ed evidence — a device has the capability if ANY field matches. Mechanisms, most-to-least dynamic:

  • evidenceParams — a reported param_type whose PRESENCE proves the capability (the device self-reports it when its info is pulled over P2P). Namespace-agnostic: security param ids and vacuum Tuya-DP ids are declared the same way.
  • deviceTypes — vendor DeviceType numbers that guarantee the capability (static vendor table, e.g. Indoor-PT = 31/35/111). Used when there is no honest self-reported signal.
  • modelHints — regexes over the model / category / name strings.
  • codecs — the codec baseline already implies it (e.g. any camera has video).
  • detect — escape hatch for logic that doesn't fit the declarative fields. Must never throw.

Properties ​

codecs? ​

ts
codecs?: Codec[];

deviceTypes? ​

ts
deviceTypes?: number[];

evidenceParams? ​

ts
evidenceParams?: number[];

modelHints? ​

ts
modelHints?: RegExp[];

Methods ​

detect()? ​

ts
detect?(rec, codec): boolean;

Parameters ​

rec ​

CloudRecord

codec ​

Codec

Returns ​

boolean

Independent and unofficial. Not affiliated with, endorsed by, or sponsored by Anker Innovations, Anker eufy, or eufy. "Anker eufy", "eufy" and "Anker" are trademarks of their respective owners. Use responsibly — rapid or failed logins can trigger captcha or temporary cooldowns.