@mega-yfue/eufy-sdk / TuyaDpInbound
Interface: TuyaDpInbound
Inbound Tuya DP event contract — the transport parses a ThingClips MQTT payload (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()
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