The UART interface is designed to send text or hex commands between an external device (e.g. Arduino) and a host.

The maximum command size is 127 bytes. Every command line may terminate with a special configurable byte: CR (0x0D), LF (0x0A) or 0x03 (ETX). The firmware also adds the ending signature to each of the commands that the device receives from a host and outputs to UART. If the end signature is not defined, the firmware waits 300 ms and outputs the whole buffer to a host.

UART uses P02 and P03 pins (3.3V). You should enable UART on P02 on an output pin in the configuration.

You can also select a baud rate for the UART interface in the firmware configuration.

UART configuration. P02 is required. P03 is optional.

Zigbee cluster: ZCL_CLUSTER_ID_GEN_MULTISTATE_VALUE_BASIC
Zigbee attributes: ATTRID_IOV_BASIC_STATE_TEXT – UART data. You should use the “ZCL_DATATYPE_OCTET_STR” (0x41) or “ZCL_DATATYPE_CHAR_STR” (0x42) data types for this attribute.

Zigbee2MQTT commands

write – sends data to a UART.
Topic: z2m/[friedly_name]/set/action
Payload: text command
The following command allows you to send any bytes. The first byte in the array (2) is the number to bytes following the length.
Topic: z2m/[friedly_name]/set
Payload: {“action”: [2, 0, 0]}


There are no comments.

Leave a Reply