eufy-mega / model/capabilities / 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 reportedparam_typewhose PRESENCE proves the capability (the device self-reports it when you pull its info over P2P). Namespace-agnostic: security param ids and vacuum Tuya-DP ids are declared the same way.deviceTypes— vendorDeviceTypenumbers 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. anycamerahas video).detect— escape hatch for logic that doesn't fit the declarative fields. Must never throw.
Properties
codecs?
ts
optional codecs?: Codec[];deviceTypes?
ts
optional deviceTypes?: number[];evidenceParams?
ts
optional evidenceParams?: number[];modelHints?
ts
optional modelHints?: RegExp[];Methods
detect()?
ts
optional detect(rec, codec): boolean;Parameters
rec
CloudRecord
codec
Codec
Returns
boolean