logo elektroda
logo elektroda
X
logo elektroda
Dostępna jest polska wersja

Czy wolisz polską wersję strony elektroda?

Nie, dziękuję Przekieruj mnie tam

TuyaMCU analyzer - UART packet decoder for Tuya devices - dpID detector

p.kaczmarek2  35 17493 Cool? (+5)
📢 Listen (AI):

TL;DR

  • TuyaMCU Analyzer decodes eavesdropped TuyaMCU UART packets into dpID variables, showing each packet’s type, length, and values.
  • It accepts hex logs from RealTerm, colorizes packet bytes, auto-detects variable IDs, and includes sample files plus a compare tool.
  • The analyzer helps identify values such as dimmer levels that usually range from 0 to 1000, making it easier to map Tuya controls.
  • Examples cover switches, dimmers, thermometers, hygrometers, fan-speed controls, timers, and energy-monitor readings mapped into OpenBeken channels.
  • It cannot universally decode raw multi-measurement dpIDs from advanced Tuya electricity meters, because their byte format is device-dependent.
Summary generated by AI based on the discussion content.
Screenshot of TuyaMCU Explorer showing packet data in hex format and decoded.
Here is a small program that allows you to analyze the content of TuyaMCU eavesdropped packets. The program shows the type, length and content of the packet, broken down into dpID variables, their types and values. The program allows you to quickly find out what the dpID we overheard contain - whether it is, for example, a dimmer value or, for example, a relay state, or maybe it is a voltage or current value. The program shown here is useful in the process of releasing a given IoT product from the cloud, because this process requires us to determine the available dpIDs for a given product, because these dpIDs are different for different products.

Related Topics
TuyaMCU is a UART-based protocol through which the WiFi module communicates with an additional microcontroller on board the device. In the case of devices with TuyaMCU, the WiFi module usually only reports data to the network, and the MCU itself supports relays, buttons, LCD or sensors and measuring systems.
For more details, I invite you to the topic about TuyaMCU itself: TuyaMCU protocol - communication between the microcontroller and the WiFi module
In addition, it is worth seeing examples of devices using TuyaMCU:
- WF-DS01 SmartLife/Tuya WiFi switch/dimmer for box - diagram
- EDM-01AA-EU 300W dimmer for BK7231 and TuyaMCU - configuration
- HomeMate Wi-Fi + Bluetooth Smart 4 Gang Touch Switch
- Tuya ATORCH AT4P(WP/BW) Smartlife Energy monitor (BK7231N) (C3BS) (CH573F) (BL0924)
- QIACHIP Universal WIFI Ceiling Fan Light Remote Control Kit - BK7231N - CB2S
- Energy-saving (?) battery door/window sensor for WiFi DS06

TuyaMCU packet capture
Capturing TuyaMCU packets is really very simple. One USB to UART converter is enough:
USB to TTL UART converter CH340G.
Just power from USB ( not from the web! everything should be unplugged ) our device, connect 5V from USB before the 3.3V LDO regulator on board, which will also provide a stable 3.3V for the WiFi module, and then solder with ground and signal wires on RX and TX. For example, for WB3S:
Diagram of an electronic module with pins labeled TXD1 and RXD1.
In the case of Tuya modules, the same UART is used to program the module via the bootloader and to communicate with TuyaMCU, which can sometimes be problematic. When changing the firmware, I often have to desolder the WiFi module in this case or break the path (and then reconstruct it).
UART is a bi-directional bus, so first we capture from the TuyaMCU TX line -> WiFi RX module, and then from the WiFi line TX module -> TuyaMCU RX

Capturing is easy to do in RealTerm:
Screenshot of RealTerm: Serial Capture Program version 2.0.0.70 with open interface.
It is best to choose hex with spaces (not binary):
Screenshot of RealTerm program with ASCII display format selected.
Then you should enable writing to the file, so it's more convenient:
Screenshot of RealTerm program for capturing serial communication.
Capture Steps:
1. connect the USB to UART converter to the device, but do not connect the 5V from USB to its power yet (do not turn on the device)
2. start capturing, first e.g. from TuyaMCU TX line -> WiFi RX module
3. perform selected operations on the device
4. finish capturing
5. repeat points 1, 2, 3 and 4, but in point 2, connect to the WiFi line of the TX module -> TuyaMCU RX

I recommend doing separate packet captures for different operations, e.g.:
- separately for starting the device
- separately, e.g. for dimmer status changes (changes in brightness level)
- separately for on/off
- separately for other settings (if available), e.g. in the case of devices with energy measurement, it is worth doing a separate capture for different voltages and saving these voltages, then you can compare packets on this basis and look for where the voltage value is saved, etc. Same with power - do a capture when measuring the load 30W and then 100W, etc.

Using two USB to UART converters it could be improved, but it would also be nice to have some software that saves communication from two COM ports at once.

TuyaMCU analyzer
The program can be downloaded from Github, already in compiled form:
https://github.com/openshwprojects/TuyaMCUAnalyzer
After running the program, we already have a sample package entered:
Screenshot of the TuyaMCU Explorer tool for packet data analysis.
To the field Raw packet data we can paste the hex record of packets captured by, for example, Realterm. The system allows spaces and transitions to the next line between hex codes, this is used to increase readability.
Field Tuya packets display shows each packet twice - first it breaks its bytes into divisions according to their role and colors them, and below it gives their roles and interpretations.
Plus a section List of automatically detected variable IDs contains a summary of detected dpIDs along with their captured values. This can help, for example, in determining which value is, for example, the brightness level of the dimmer, i.e. it usually has values from 0 to 1000. On the other hand, the relay states can only be 0 or 1.

In addition, the program offers a set of sample packages loaded from the folder samples , they are available in this menu:
Screenshot of TuyaMCU Explorer with a dropdown menu.
The .bin extension means a binary file, with packets as bytes, while .txt means a text file, where packets are already saved as hex codes (already in ASCII, human readable).

Also, there is a bookmark Compare tool , which is a tiny tool useful for determining what has changed in the packages when, for example, we changed the color of the lamp (e.g. the Miboxer led strip controller uses TuyaMCU):
Screenshot of the TuyaMCU Explorer application showing a tool for comparing hexadecimal strings.
The program treats each line as a separate packet. If the given byte in each line is the same, it is highlighted in green, otherwise it is in red.


Some examples
Examples are included in the samples directory. Here is a short presentation of some of them.
Dimmer from TuyaMCU:
Screenshot of the TuyaMCU Explorer program with encoded packet data.
The above packets were intercepted on the line WiFi module TX -> TuyaMCU RX. Here in the summary you can see that dpID 1 of type bool has values 1 and 0, that is, the state of the switch, on or off. In turn, dpID 2, of the value type, has values from 0 to 570, which is probably a dimmer. 570 is the maximum value recorded during the tests, while you can guess from this that the full brightness of the light is 1000, as usual.
Thermometer/Hygrometer/Clock/Calendar TH06:
Screenshot of TuyaMCU Explorer tool showing data packets in hexadecimal format.
This set of packets shows how the WiFi module sends time to the main MCU from TH06. On the other hand, broadcast by the MCU we have:
Screenshot of TuyaMCU Explorer showing data packet decoding.
The MCU supports the thermometer and hygrometer, so it sends these measurements to the WiFi module. The temperature is multiplied by 10, because the values here must be integers, and the manufacturer wanted to support up to one digit after the decimal point.

What does the program not help with?
Basically, there is one situation where this program cannot help. Some of the more advanced Tuya electricity meters (higher-end, already DIN rail, in the price range of PLN 100 or more) use TuyaMCU to report measurements, but often report a group of measurements in one dpID. Then such a dpID is of the Raw type (no longer Value) and contains several bytes in which (depending on the device) data such as the current value of voltage, current, power, sometimes frequency are stored. Such a raw package has a device-dependent format and it is difficult to decode it more universally.
Cheaper products with energy measurement, in turn, do not use TuyaMCU, rather BL0937 or BL0942 are directly connected to the WiFI module there.

Application for OpenBeken
This analyzer allows you to set up quickly OpenBeken to work on your device with TuyaMCU. Here it is autoexec.bat from the OBK. These scripts map values from TuyaMCU (those dpID) to OBK variables and allow further processing of these values, determine how values are displayed on the web panel, etc.:


- EDM-01AA-EU dimmer

setChannelType 1 toggle
setChannelType 2 dimmer
tuyaMcu_setBaudRate 115200
tuyaMcu_setDimmerRange 1 1000
// linkTuyaMCUOutputToChannel dpId verType tgChannel
linkTuyaMCUOutputToChannel 1 bool 1
linkTuyaMCUOutputToChannel 2 val 2

dpID 1 is a bool type, it is the on/off state of the light. dpID 2 is value, value from 1 to 1000 is dimmer level.


- QIACHIP Universal WIFI Ceiling Fan Light (fan and light)

startDriver TuyaMCU
// let's say that channel 1 is dpid1 - fan on/off
setChannelType 1 toggle
// map dpid1 to channel1, var type 1 (boolean)
linkTuyaMCUOutputToChannel 1 1 1
// let's say that channel 2 is dpid9 - light on/off
setChannelType 2 toggle
// map dpid9 to channel2, var type 1 (boolean)
linkTuyaMCUOutputToChannel 9 1 2
//channel 3 is dpid3 - fan speed
setChannelType 3 LowMidHigh
// map dpid3 to channel3, var type 4 (enum)
linkTuyaMCUOutputToChannel 3 4 3
//dpId 17 = beep on/off
setChannelType 4 toggle
linkTuyaMCUOutputToChannel 17 1 4
//
//
//dpId 6, dataType 4-DP_TYPE_ENUM = set timer
setChannelType 5 TextField
linkTuyaMCUOutputToChannel 6 4 5
//
//
//dpId 7, dataType 2-DP_TYPE_VALUE = timer remaining
setChannelType 6 ReadOnly
linkTuyaMCUOutputToChannel 7 2 6

Here dpID 1 is bool, it turns the fan on and off. dpID 9 is the state of the light - on or off, also boolean. dpID 3 is the fan speed - three possible values, 0, 1, 2, low, mid or high. Next, dpID 6 is the setting of the timer (countdown) after which the device will turn off, this timer already supports the MCU. Then dpID 7 is the read only variable, the current value of the countdown timer. There is also dpID 17, which controls the sound signal when configured, e.g. from the RF remote control (on or off)


- configuration TH06 hygrometer/LCD/calendar

startDriver TuyaMCU
startDriver NTP
// dpID 1 is tempererature div 10
setChannelType 1 temperature_div10
linkTuyaMCUOutputToChannel 1 val 1
// dpID 2 is % humidity
setChannelType 2 Humidity
linkTuyaMCUOutputToChannel 2 val 2

Here, dpID 2 is the humidity level, and dpID 1 is the temperature, where the temperature is multiplied by 10 because val is an integer type and the manufacturer wanted to transfer values of the type 20.5 degrees


- BlitzWolf BW-AF1 fryer:

startDriver TuyaMCU

// cook on/off 
setChannelType 1 Toggle
setChannelLabel 1 "Cook"
linkTuyaMCUOutputToChannel 111 bool 1 
// power on/off
setChannelLabel 2 "Power"
setChannelType 2 Toggle
linkTuyaMCUOutputToChannel 101 bool 2 

// set temperature
setChannelLabel 3 "New Temperature"
setChannelType 3 TextField
linkTuyaMCUOutputToChannel 103 val 3

// currenttemperature
setChannelLabel 4 "Current Temperature"
setChannelType 4 ReadOnly
linkTuyaMCUOutputToChannel 104 val 4

// set time
setChannelLabel 5 "New Time"
setChannelType 5 TextField
linkTuyaMCUOutputToChannel 105 val 5

// read time
setChannelLabel 6 "Current Time"
setChannelType 6 ReadOnly
linkTuyaMCUOutputToChannel 106 val 6


alias cook185c15min backlog setChannel 2 1; setChannel 3 185; setChannel 5 15; setChannel 1 1
alias cook170c30min backlog setChannel 2 1; setChannel 3 170; setChannel 5 30; setChannel 1 1



startDriver httpButtons
setButtonEnabled 0 1
setButtonLabel 0 "Set 185C 15minutes"
setButtonCommand 0 "cook185c15min "
setButtonColor 0 "orange"


setButtonEnabled 1 1
setButtonLabel 1 "Set 170C 30minutes"
setButtonCommand 1 "cook170c30min "
setButtonColor 1 "orange"


About the fryer topic is here:
https://www.elektroda.pl/rtvforum/topic3958909.html#20448156


- ATORCH AT4P(WP/BW) energy monitor meter:

startDriver TuyaMCU
startDriver NTP
tuyaMcu_setBaudRate 115200
setChannelType 1 toggle
setChannelType 2 Voltage_div10
setChannelType 3 Power
setChannelType 4 Current_div1000
setChannelType 5 Frequency_div100
setChannelType 6 ReadOnly
setChannelType 7 Temperature
setChannelType 8 ReadOnly
setChannelType 9 ReadOnly

//ch 1 (dpid 1) power relay control
linkTuyaMCUOutputToChannel 1 bool 1
//ch 2(dpid 20) voltage
linkTuyaMCUOutputToChannel  20 1 2
//ch 3(dpid 19) power watts
linkTuyaMCUOutputToChannel 19 1 3
//ch 4 (dpid 18)current Amps
linkTuyaMCUOutputToChannel 18 1 4
//ch 5 (dpid (133) frequency 
linkTuyaMCUOutputToChannel 133 1 5
//ch 6 (dpid  102) energy cost used
linkTuyaMCUOutputToChannel 102 1 6
// ch 7 (dpid 135) temp
linkTuyaMCUOutputToChannel 135 1 7
//ch 8 (dpid  134) power factor 
linkTuyaMCUOutputToChannel 134 raw 8
//ch 9 (dpid  123) energy consumed
linkTuyaMCUOutputToChannel 123 1 9

Without much comment, but here it is clear how many different variables can be available, usually in the form multiplied by 10 or 100 (or even 1000) to push numbers with a decimal point as integers.

Summary
The program was written quickly, even "on the knee" but turned out to be really very useful. Thanks to it, I can quickly analyze the captured data from Tuya products, see what dpIDs are used and what their values look like. Syntax coloring (specific bytes) from the package also speeds up the whole process, and for me it greatly increases their readability.

About Author
p.kaczmarek2
p.kaczmarek2 wrote 14693 posts with rating 12724 , helped 656 times. Been with us since 2014 year.

Comments

p.kaczmarek2 01 May 2023 09:00

TuyaMCU analyzer has been updated. The ability to do dual UART capture with two USB dongles has been added. It's not perfect, because sometimes order of request/reply packets is wrong due to the C# SerialPort... [Read more]

ferbulous 21 Jun 2023 04:00

hi, just to clarify the chip should be in the stock tuya firmware so I could compare if the details in the tuya app matches with the tuya mcu analyzer? (light sensor, presence etc) And I should power... [Read more]

p.kaczmarek2 21 Jun 2023 08:07

Chip must be in stock Tuya firmware and most likely paired and connected to cloud (0x04 wifi state) so you can get full tuya experience and record full transactions of TuyaMCU. You have to power your... [Read more]

ferbulous 25 Jun 2023 13:02

Hi, I'm not sure if I'm doing it right I connect the necessary pins, using arduino uno for 3.3v I can see the led lights blinking on the pcb, on the tuya app device is not online I can't be sure where... [Read more]

p.kaczmarek2 25 Jun 2023 13:10

First of all, you have to press "Change" to apply baud change. You change baud to 9600 in the combobox, but you don't apply change. Please see the marked area in the screenshot: https://obrazki.el... [Read more]

ferbulous 25 Jun 2023 13:52

ok, i've changed it this time [Read more]

p.kaczmarek2 25 Jun 2023 14:02

How do you know it's really a TuyaMCU device? You can also try alternate baud: 115200. [Read more]

ferbulous 25 Jun 2023 14:10

ok, tried it but still no changes I'm not quite sure if's tuya mcu because I can't seem to identify one on the pcb I just assume there's one based on blakadder's teardown of another mmwave device [Read more]

p.kaczmarek2 25 Jun 2023 14:36

Where did you connect USB to UART converter RX? [Read more]

ferbulous 25 Jun 2023 14:50

Like this UART TX -> CBU RX UART RX -> CBU TX [Read more]

p.kaczmarek2 25 Jun 2023 15:11

Where are RX and TX of CBU connected? Please check with multimeter. Are you sure that this second module/MCU also gets power? You can check that with multimeter as well. Which CBU pins are used on... [Read more]

ferbulous 25 Jun 2023 15:38

I'll do that once I have my multimeter How do I check on the second module using the multimeter? Not yet, probably due to the tx/rx connected another module on the pcb. i'll have to desolder... [Read more]

ferbulous 26 Jun 2023 15:26

@pkaczmarek2 hi, desoldered the chip and this is the backup firmware bin [Read more]

p.kaczmarek2 26 Jun 2023 15:42

It looks like there is a baud setting in this flash: https://obrazki.elektroda.pl/4677717200_1687786938_thumb.jpg So there is a fair chance it's a TuyaMCU. Maybe the second module is not powered... [Read more]

ferbulous 26 Jun 2023 16:38

@pkaczmarek2 if i power the device by connecting to the mains, is it safe to just connect cbu tx/rx-> uart tx/rx -> pc ? https://obrazki.elektroda.pl/1236556600_1687790177_thumb.jpg https:/... [Read more]

DeDaMrAz 26 Jun 2023 23:24

NO!!! DO NOT connect anything that is directly mains powered directly!!! Use some kind of isolator for communication sniffing!!! Don't ask me how I know. This is the device I am testing now for example... [Read more]

ferbulous 27 Jun 2023 03:41

I don't know how to use that, I'd appreciate some instruction @pkaczmarek2 from this smart breaker post , any idea how @tomanyusers connect tx/rx to sniff the packets with load connected? [Read more]

p.kaczmarek2 27 Jun 2023 07:46

Well, to be honest, if your power supply is an isolated one, then there should be no problems. The question is, is your power supply an isolated one. Also, maybe your device would work if you were to... [Read more]

ferbulous 27 Jun 2023 10:34

How to determine if it’s isolated? Also since there’s 2 pads on the pcb, the second pad for zigbee chip with cbu pinout. Could i just solder: 1st pad - cbu with tuya firmware 2nd pad - another cbu... [Read more]

FAQ

TL;DR: TuyaMCUAnalyzer helps decode 15+ Tuya UART packet cases; the core rule is "Both MCU and WiFI modules has to be powered." This FAQ is for OpenBeken and Tuya hackers who need dpID detection, safe UART sniffing, and RX/TX capture guidance. [#20625222] Why it matters: Correct dpID decoding turns captured Tuya traffic into usable relay, dimmer, sensor, and energy-monitor channels.

Option Specific use Thread value
One USB-to-UART adapter Capture one direction at a time RX line only, repeat for the other line
Two CH340 adapters Capture both UART directions One RX on MCU RX, one RX on MCU TX
CH342 adapter Dual capture with one USB device 2 UARTs on one chip
RealTerm text capture File-based packet capture Hex with spaces

Key insight: Do not guess dpIDs from the product type. Capture stock TuyaMCU traffic, compare values, then map the confirmed dpIDs into OpenBeken channels.

Quick Facts

  • TuyaMCU uses UART between the WiFi module and a separate MCU; that MCU can handle relays, buttons, LCDs, sensors, and metering circuits. [#20528459]
  • The safe capture setup powers the board from USB, not mains, with 5 V fed before the onboard 3.3 V regulator when present. [#20528459]
  • Common TuyaMCU dpID clues include bool values 0/1 for relays and value ranges like 0–570 or 1–1000 for dimmers. [#20528459]
  • Version 0.2 added dual UART capture with two USB dongles, plus file-opening and miscellaneous UI options. [#20562010]
  • Version 0.5 added a datetime crash fix, realtime capture pause, and buttons such as “copy raw” and “copy decoded.” [#20729095]

What is TuyaMCU and how does it let a Tuya WiFi module communicate with a separate MCU over UART?

TuyaMCU is a UART protocol linking the Tuya WiFi module to a separate device MCU. "TuyaMCU is a UART-based protocol that lets a WiFi module exchange commands and datapoints with an onboard microcontroller, while the MCU handles local hardware such as relays, buttons, LCDs, sensors, and measurement systems." The WiFi module often reports data to the network, while the MCU drives the product hardware. [#20528459]

How do I capture TuyaMCU UART packets safely with a USB-to-UART adapter and RealTerm?

Capture TuyaMCU packets by powering the device from USB and logging UART as spaced hex in RealTerm. 1. Connect USB-to-UART ground and RX/TX, but keep 5 V disconnected first. 2. Start RealTerm capture in “hex with spaces” and write to a file. 3. Power the board from USB, perform one operation, stop capture, then repeat for the opposite UART direction. The thread explicitly says not to power from mains during this method. [#20528459]

What are Tuya dpIDs and how can TuyaMCUAnalyzer help identify relay states, dimmer levels, voltage, current, or sensor values?

dpIDs are Tuya datapoint identifiers that label each reported variable inside TuyaMCU packets. "dpID is a Tuya datapoint identifier that marks one device variable, such as a relay state, dimmer value, humidity reading, voltage, current, or raw measurement block, with a type and payload length." TuyaMCUAnalyzer lists detected dpIDs, types, lengths, and captured values. Bool dpID values 0/1 suggest relays. Dimmer values can appear from 0 to 570 during testing, with 1000 as a common full-scale target. [#20528459]

Why should a TuyaMCU device stay on stock Tuya firmware and be paired to the cloud before sniffing packets?

Keep stock Tuya firmware so the analyzer captures the original TuyaMCU transactions. The device should also be paired and connected to the cloud, showing WiFi state 0x04. That state gives the “full Tuya experience” and records complete TuyaMCU exchanges. If you replace firmware first, you can lose the original app-driven behavior needed to identify light sensors, presence values, or other dpIDs. [#20625222]

How do I power both the WiFi module and the TuyaMCU safely while capturing UART data without using mains power?

Power both chips from a safe low-voltage source, not directly from mains. Use 3.3 V on the WiFi module’s 3.3 V pin, or feed 5 V into the input of an onboard AMS1117-3.3 regulator. That regulator then supplies stable 3.3 V to the WiFi module. The separate MCU must also receive power, or no TuyaMCU communication will appear. [#20625222]

What baud rates should I try when TuyaMCUAnalyzer shows no packets, and why are 9600 and 115200 commonly tested?

Try 9600 first, apply the baud change, then test 115200 if no packets appear. One troubleshooting case failed because the baud combobox changed to 9600 without pressing “Change.” The author then suggested trying the alternate baud rate, 115200. A later firmware backup showed a baud setting, supporting the chance that the device used TuyaMCU. [#20630423]

How can I tell whether a Tuya device really uses TuyaMCU if I cannot identify a separate MCU on the PCB?

Check the PCB traces, power rails, and firmware evidence before assuming TuyaMCU. Use a multimeter to see where CBU RX and TX connect, and verify that a second module or MCU receives power. A 2 MB flash backup can reveal TuyaMCU baud settings. In the thread, a baud setting in flash gave “a fair chance” that the board used TuyaMCU. [#20631789]

How do I use two CH340 USB-serial adapters, or a CH342 dual UART adapter, to capture both TuyaMCU RX and TX lines at the same time?

Connect only the RX input of each adapter to one UART direction. Use one CH340 RX on MCU RX and another CH340 RX on MCU TX, with a shared ground when safe. This listens to both directions without driving the bus. A CH342 can replace two CH340 boards because it provides 2 UARTs on one chip and one USB connection. [#21835480]

CH340 vs CH342 — which is more convenient for dual UART TuyaMCU packet sniffing?

CH342 is more convenient for dual UART sniffing because it provides 2 UARTs through one USB device. Two CH340 adapters also work, but they occupy two USB connections and require matching two serial ports. The thread confirms the dual-CH340 wiring and recommends CH342 as a single-chip, single-USB alternative for convenience. [#21835480]

What does it mean if a CH340 adapter shows 3.4 V or 5.2 V on its RX line, and how should I handle 3.3 V versus 5 V UART levels?

A voltage on the CH340 RX line can be normal, but level mismatch is the real danger. One user measured 3.4 V on a newer CH340 RX line and 5.2 V on an older one. The warning was specific: problems arise when attaching a 3.3 V UART to a 5 V device, or the reverse. Match UART logic levels before connecting. [#21835641]

How can I determine whether a Tuya device power supply is isolated, and what is the difference between flyback and buck supplies for UART safety?

Identify the supply topology: flyback supplies have isolation, while buck supplies do not. This matters because a non-isolated buck design can reference the low-voltage UART section to mains. The thread gives the practical rule in one line: “Flybacks have isolation, and bucks do not.” If unsure, do not attach PC-grounded serial hardware. [#20723628]

Why is it dangerous to connect a PC USB-to-UART adapter directly to a mains-powered Tuya device, and what kind of isolator should be used for sniffing?

A direct PC USB-to-UART link can be dangerous when the Tuya device is mains powered and not isolated. One warning states: “NO!!! DO NOT connect anything that is directly mains powered directly!!!” Use a communication isolator for UART sniffing, or power the board from an isolated low-voltage supply instead. The key risk is tying PC ground to a live-referenced circuit. [#20632329]

How do I map detected TuyaMCU dpIDs to OpenBeken channels using commands like linkTuyaMCUOutputToChannel?

Map each confirmed dpID to an OpenBeken channel with its Tuya type and target channel number. Example: EDM-01AA-EU uses channel 1 as toggle and channel 2 as dimmer. The script links dpID 1 bool to channel 1, then dpID 2 val to channel 2. It also sets baud to 115200 and dimmer range to 1–1000. [#20528459]

What changed in TuyaMCUAnalyzer versions 0.4 and 0.5, including heartbeat hiding, light color decoding, ASCII/HEX strings, pause, and copy buttons?

Version 0.4 improved filtering and decoding, while version 0.5 improved capture workflow and stability. Version 0.4 added heartbeat hiding, TuyaMCU light color decoding, ASCII or HEX string display, and a maximizable window. Version 0.5 fixed a crash on datetime packets, added realtime capture pause, and added buttons such as “copy raw” and “copy decoded.” [#20729095]

How can I troubleshoot errors while retrieving data from a Tuya module in TuyaMCUAnalyzer?

Start with wiring, baud, power, and device-state checks before blaming the analyzer. Confirm 9600 and 115200 baud, press “Change” after selecting baud, and verify both WiFi module and MCU power. Keep stock Tuya firmware paired to cloud state 0x04 for complete traffic. If no packets appear, check RX/TX continuity with a multimeter and confirm the board really uses TuyaMCU. [#20625222]
Summary generated by AI based on the discussion content.
%}