Skip to content

@mega-yfue/eufy-sdk / AvailabilityContext

Interface: AvailabilityContext

The device facts an availability / per-model gate reads. A truthful subset a CloudRecord can populate at resolve time — before a live session exists — without fabricating the transport fields (CommandContext.channel, CommandContext.paramIds) a real command carries. Every CommandContext is one structurally, so a gate written against this runs unchanged on the manifest path and the command path.

Extended by

Properties

capabilities?

ts
optional capabilities?: ReadonlySet<Capability>;

The device's resolved capability set, when known.


category?

ts
optional category?: string;

API category string, when known.


codec

ts
codec: Codec;

Resolved codec/family.


deviceType?

ts
optional deviceType?: number;

eufy DeviceType, when known.


hasP2p?

ts
optional hasP2p?: boolean;

Whether the device is reachable over P2P — a live-transport fact, so it is absent on the pure resolve-time (manifest) path and present only when a command context is built. Availability gates that read it (a lock's P2P-only writes) are all writeOnly, which the manifest never lists, so its absence there changes nothing.


model?

ts
optional model?: string;

Model / T-code, when known.


paramIds?

ts
optional paramIds?: ReadonlySet<number>;

The param_type / DP ids this device has actually reported. Present at bind time (a real CommandContext); absent on the manifest path. DP-based availability gates should treat undefined as an empty set — ctx.paramIds?.has(dp) ?? false.

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.