@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