@mega-yfue/eufy-sdk / p2pCodec / buildIntStringCommandPayload
Function: buildIntStringCommandPayload()
ts
function buildIntStringCommandPayload(
value,
valueSub,
strValue,
channel?,
key?,
encType?
): Buffer;Build an int+string command body: valueSub(u32 LE) ‖ value(u32 LE) ‖ strValue(len-prefixed), AES-128-ECB encrypted (level-1) like buildStringCommandPayload. This is the wire shape the eufy app uses for the floodlight/spotlight manual switch (CMD_SET_FLOODLIGHT_MANUAL_SWITCH 1400) on IndoorOutdoor / SoloCam-spotlight / Cam2C/3 families — where value = 0/1, valueSub = the device channel, and strValue = the admin account_id. The strValue uses the 128-byte-chunk length prefix (stringWithLength).
Parameters
value
number
valueSub
number
strValue
string
channel?
number = 0
key?
Buffer<ArrayBufferLike>
encType?
number = 1
Returns
Buffer