Skip to content

@mega-yfue/eufy-sdk / p2pCodec / buildStringPairCommandPayload

Function: buildStringPairCommandPayload() ​

ts
function buildStringPairCommandPayload(
   strValue, 
   strValueSub, 
   channel?, 
   key?, 
   encType?
): Buffer;

Build a string-pair command body: five zero bytes, then strValue and strValueSub, each in the 128-byte-chunk length form (stringWithLength), AES-128-ECB encrypted (level-1) like buildStringCommandPayload when key is given. CMD_DOWNLOAD_VIDEO (1024) takes this shape on a HomeBase 2: strValue = the recording's path on the station, strValueSub = the station admin account_id, on the camera's channel.

Parameters ​

strValue ​

string

strValueSub ​

string

channel? ​

number = 0

key? ​

Buffer<ArrayBufferLike>

encType? ​

number = 1

Returns ​

Buffer

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.