Module rust_tuyapi::mesparse[][src]

Message Parser

The message parser is the low level API which takes care of encoding and decoding of Payloads. The normal user should not need to interact with this directly to communicate with Tuya devices, but rather create an instance of the TuyaDevice struct.

Structs

Message

Representation of a message sent to and received from a Tuya device. The Payload is serialized to and deserialized from JSON. The sequence number, if sent in a command, will be included in the response to be able to connect command and response. The return code is only included if the Message is a response from a device.

MessageParser

The message parser takes care of encoding and parsing messages before send and after receive. It uses a TuyaCipher to encrypt and decrypt messages sent with the Tuya protocol version 3.3.

Enums

CommandType

Human readable definitions of command bytes.