Skip to content

@mega-yfue/eufy-sdk / codecForType

Function: codecForType()

ts
function codecForType(deviceType): Codec | undefined;

Map eufy's numeric DeviceType to a command Codec.

Resolution order (first match wins): station → lock → sensor → keypad → camera. Anything that is a recognised security endpoint but not in the station/lock/sensor/keypad sets is treated as a camera (cameras, doorbells, floodlight/wall-light cams, garage cams, solocams, eufyCams, smart-drop, the LOCK_85V0 video-doorbell, etc.) — this is the large, fast-growing family, so it is the residual bucket rather than an explicit list.

Parameters

deviceType

number

eufy DeviceType integer (e.g. 9 = CAMERA2, 54 = LOCK_8503 / R10).

Returns

Codec | undefined

the codec, or undefined for a genuinely unknown / non-finite input.

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.