@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.