@mega-yfue/eufy-sdk / buildDeviceNameBody
Function: buildDeviceNameBody()
ts
function buildDeviceNameBody(
channel,
name,
accountId
): Buffer;Body for the device/hub rename command (SET_DEVICE_NAME 1217 / SET_HUB_NAME 1216). A 261-byte struct confirmed against the app: [u32 = 0][u8 device_channel][name → 128B, null-padded] [account_id → 128B, null-padded]. Sent signCode 8 on the station channel (255). The name is UTF-8 (matching the app), truncated to fit 127 bytes so the field stays null-terminated.
Parameters
channel
number
name
string
accountId
string
Returns
Buffer