Skip to content

@mega-yfue/eufy-sdk / TuyaDpInbound

Interface: TuyaDpInbound ​

Inbound Tuya DP event contract — the transport parses the Tuya cloud DP read (string-keyed object → numeric-keyed record) and delivers it through this interface. The transport owns the parse; a capability owns the semantics (which DP id means what). Mirrors DpInboundFrame for the AIoT MQTT path; the capability layer never names the Tuya framing.

Routing note: outbound Tuya writes use the same aiot-dp Command kind as AIoT MQTT; the facade distinguishes them by dev.category === "eufy_home_tuya" and routes to TuyaCommandRouter accordingly — the capability layer stays transport-agnostic.

Methods ​

onDps() ​

ts
onDps(sn, dps): void;

Deliver a parsed DP event for sn. dps is numeric-keyed (converted from the wire's string-keyed map). The client receives this, converts to dpParams strings, and delivers via decodeState({ source: "mqtt", dpParams }) so capability modules read Tuya values through the same typed getters as AIoT reports.

Parameters ​

sn ​

string

dps ​

Record<number, boolean | number | string>

Returns ​

void

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.