Skip to content

@mega-yfue/eufy-sdk / P2P_ENVELOPE

Variable: P2P_ENVELOPE

ts
const P2P_ENVELOPE: object;

P2P envelope / routing command IDs the command-router itself issues on the wire — the transport-side counterpart to the capability layer's feature ids (declared inline per capability in model/capabilities/*.ts as CAMERA_CMD / LIGHT_CMD / …). These two subsets are disjoint: a capability never names an envelope, and the router never names a feature (it forwards cmd.param opaquely), so model/ and transport/ share no command vocabulary and neither imports the other.

The full id→name catalog (CommandType) + commandName() lookup live in ./commands.ts; only the handful the router drives directly are named here.

Type Declaration

CONTROL_PAYLOAD

ts
readonly CONTROL_PAYLOAD: 1700 = 1700;

Generic control wrapper — bare {commandType,data} (NOT doorbell-specific despite the name).

GET_CAMERA_INFO

ts
readonly GET_CAMERA_INFO: 1103 = 1103;

GET_CAMERA_INFO param-list query.

PRIVACY_MODE

ts
readonly PRIVACY_MODE: 6250 = 6250;

Privacy / camera-off; the router sends it as a signCode-8 multi-channel burst under SET_PAYLOAD (see sendPrivacyBurst).

RESTART_HUB

ts
readonly RESTART_HUB: 1034 = 1034;

Restart a HomeBase (app RESTART_HUB). ✅ Wire-confirmed byte-exact against the app's own Restart (2026-08-03) and HW-tested — it rebooted the hub. A station-scalar: level-2 signCode 8 on the broadcast channel 255, body [u32 value][account_id padded] (buildDirectBinaryBody with no channel), value 0. NOT a 1350/1700 envelope and NOT an empty frame.

☠️ Neighbours are destructive: 1036 = APP_CMD_HUB_TO_FACTORY, 1037 = APP_CMD_DEVS_TO_FACTORY. A slip of two here factory-resets the hub. Do not probe nearby ids.

SET_DEVICE_NAME

ts
readonly SET_DEVICE_NAME: 1217 = 1217;

Rename a device (app SET_DEVICE_NAME). ✅ Wire-confirmed on T8425 ( replay): outer-cmd 1217, signCode 8, on the STATION channel 255. Body is a 261-byte struct [u32=0][u8 device_channel][name→pad128][account_id→pad128]. P2P-only — the HomeBase propagates the name to the cloud; no HTTP update_device_info call is needed. See buildDeviceNameBody.

SET_HUB_NAME

ts
readonly SET_HUB_NAME: 1216 = 1216;

Rename a station/HomeBase (app SET_HUB_NAME), cmd 1216 — same struct/transport as SET_DEVICE_NAME. ✅ Wire-confirmed on a T8030 HomeBase (old name → new name, propagated to the cloud in ~3s).

SET_PAYLOAD

ts
readonly SET_PAYLOAD: 1350 = 1350;

SET_PAYLOAD wrapper — {account_id,cmd,mChannel,mValue3,payload} envelope.

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.