Well, since you have a 2MB backup, maybe we can skip the UART capture process which is risky and requires isolation for USB to UART converter, and just try to flash OBK? In worst case you can always restore the backup.
maybe we can skip the UART capture process which is risky and requires isolation for USB to UART converter, and just try to flash OBK?
Hello again after an "intense" long weekend... Yes, that's probably the better option and I will do it as soon as possible, but I wanted to explore all the Tuya-related capabilities before flashing OBK.
morgan_flint wrote:
The rest of the hardware seems to be the same (I will add photos later on)
Here are the photos:
And some screenshots of the App:
I've also done a little bit of "reverse engineering" of the schematic; just for the sake of doing it, as it doesn't add much to making it work with OBK, but once I clean it up a bit I'll post it here.
Curiously, I was looking at the device logs, where you can find a dropdown menu called "Select DP ID":
(the first Chinese text translates as "Refresh report" and the second one as "Active Power")
Of course, I would have never imagined a procedure like the one you found!! I followed the instructions you posted and got this:
This would be the correspondence with the list of my previous post (pdf file), with also 20 entries (two first columns), and the new info (the other two)
DP Instruction
Standard Instruction
DP ID
Description
total_forward_energy
total_forward_energy
1
Total forward energy
phase_a
phase_a
6
Phase A
fault
fault
9
Fault
switch_prepayment
switch_prepayment
11
Switch prepayment
clear_energy
energy_reset
12
Clear energy
balance_energy
balance_energy
13
Balance energy
charge_energy
charge_energy
14
charge energy
leakage_current
leakage_current
15
Leakage current
switch
switch
16
Switch
alarm_set_1
alarm_set_1
17
Alarm set1
alarm_set_2
alarm_set_2
18
Alarm set2
breaker_id
breaker_number
19
Breaker id
leakagecurr_test
leakagecurr_test
21
Leakage current test
clr_all_energy
-
101
Clear Energy
power_factor
-
104
Power Factor
supply_frequency
supply_frequency
105
Grid Frequency
refresh
-
106
刷新上报 (Refresh report)
output_voltage
-
116
Voltage
output_current
-
117
Current
output_power
-
118
有功功率 (Active Power)
Also, in case it's of some help, I'm attaching some of the device log contents (TOMPD-63LW_logs.pdf)
Attachments:
TOMPD-63LW_logs.pdf(227.52 KB)
You must be logged in to download this attachment.
I think we may also need to know the variable types
Maybe this can be (at least, partially) extracted from the information in the first attachment here.
It contains information for 14 of the 20 variables (all of those that have info in the second column (Standard instruction) of the table in my previous post, and the listing is in the same order, so easy to match.
I'm transcribing it here so it's easier to read. This first table is for "Standard Status Set":
I'm not very sure of the reliability of Tuya info; for example, there's one of the screenshots I posted from the App, acceded after clicking "Temperature" on the main screen for the device, that shows no info and makes no sense, as there aren't any temperature sensors in the hardware. I'm afraid product developers just customize some general kind of information without paying too much attention
Of course (and abusing your patience...), it would be ideal if we could support as many as possible, as the main appeal of this device is the amount of functions it performs...
Maybe we could leave to the local keyboard the adjustment of the different protection thresholds, as these are values rarely changed but, for example, it would be interesting to know remotely which of the protections has acted.
I'll flash OBK now to see what we can do with that, but I've just ordered the isolators to be able to capture traffic and, once they arrive, I could flash the original FW again if we need to see something there...
BTW, I've also ordered one of the devices similar to this one but with just one relay (I found it at a very good price and couldn't resist...). I see coincidences in some of the DP IDs in that device's thread, so maybe between both devices, we will be able to decipher all of them.
I've also compiled in the attached .pdf all the info on the previous tables, to make it easier to see all at a glance. I'm also attaching the "diagnostics" from the Tuya integration in Home Assistant, in case they can give new information. It seems to have contents relative to all the functions, although the device's page only shows a few of them:
Thank you for all your help; I'm sorry I'm so noob on this subject
Attachments:
TOMPD-63LW_HomeAssistantTuyaDiagnostics.json.txt(9.29 KB)
You must be logged in to download this attachment.
TOMPD-63LW_All.pdf(403.15 KB)
You must be logged in to download this attachment.
This looks somewhat complete, altough I am not sure why dpID 9 is marked as bitmap and not as raw bytes data.
Regarding this, and looking at the combined table, maybe "bitmap" just means the DP reports the number of the alarm in the list:
If this is true, "0" in the reports would be no alarm, and "8" would be "self_test_alarm", which is the 8th in the list (I made some self-tests of the leakage current with the device by pressing the button labeled "T")
If this is true, "0" in the reports would be no alarm, and "8" would be "self_test_alarm", which is the 8th in the list (I made some self-tests of the leakage current with the device by pressing the button labeled "T")
I'm afraid I was wrong; I provoked 3 different alarms (overcurrent, leakage, and low credit, individually, not simultaneously) and got these values for this DP ID: 4,8 and 32768 (2², 2⁴ and 2¹⁵)
So now "bitmap" makes sense: the activated alarms of the list of possible values are those that correspond with the "1" bits of the binary conversion of the decimal value of this DP ID:
I still have to figure out the meaning of the cryptic values of "Phase A", "Alarm set 1", and "Alarm set 2"
Ah, sorry, now I understand! I may have been working too much. By Bitmap, they do not mean Bitmap as in "an image", but they mean what I usually call flags, where each bit (1 or 0) is a flag describing a state. Silly me. Now everything is clear. Thanks for pointing that to me!
Finally flashed OBK and used the autoexec.bat from this post. These are the results:
I also copied all the "TUYAMCU received" strings from the attached file "TOMPD-63LW_OBK_LOG.txt" to the also attached "TUYAMCU received.txt", and analyzed them with TuyaMCUAnalyzer:
It shows up to 10 DP IDs in the brief time covered by the log, including those of Power Factor (104), Grid Frequency (105), Leakage Current (15), and the cryptic Alarm set 1 (17).
Also, DP ID 13 (Balance energy), that must correspond with the remaining prepaid energy in 1/10 kWh (It shows 8, I programmed this with the minimum, 1 kWh, and have expended 0.2, ):
55 AA 03 07 00 08 0D 02 00 04 00000008 2C
HEADER VER=03 State LEN dpId=13 Val V=8 CHK
BTW, there's a string in the logs (55 AA 03 07 00 10 12 00 00 0C 01 01 00 13 03 01 00 FA 04 01 00 D2 21) that gives an error in TuyaMCUAnalyzer:
morgan_flint wrote:
Following the ideas in this post (specifically, base64 to hex conversion), I think the meaning of "Phase A" is now clear:
😥 Supid of me... I see the contents of this DP were already known and are well-decoded
EDIT: Adding a screenshot from the device's page in Home Assitant:
EDIT 2: Analyzing the link posted by @fakuivanhere, in the last post there's a detailed description of "Alarm set 1":
Code: JSON
Log in, to see the code
Unfortunately, "abilityId" (must be the same as DP ID) 104 and 105 have different meaning there.
Attachments:
TUYAMCU received.txt(2.69 KB)
You must be logged in to download this attachment.
TOMPD-63LW_OBK_LOG.txt(29.29 KB)
You must be logged in to download this attachment.
// start TuyaMCU driver
startDriver TuyaMCU
// always force 0x04 WiFi state (paired to cloud), otherwise TuyaMCU might skip some data points
tuyaMcu_defWiFiState 4
startDriver NTP
// let's choose that channel 1 will be main relay state
setChannelType 1 toggle
// label it
setChannelLabel 1 "Relay"
setChannelType 2 Voltage_div10
setChannelType 3 Power
setChannelLabel 3 "Power"
setChannelType 4 Current_div1000
setChannelLabel 4 "Current"
setChannelType 5 EnergyTotal_kWh_div100
setChannelLabel 5 "Energy"
setChannelType 7 toggle
setChannelLabel 7 "Prepayment"
// MF "power factor"
setChannelType 10 PowerFactor_div1000
setChannelLabel 10 "Power Factor"
// MF "supply frequency"
setChannelType 11 Frequency_div100
setChannelLabel 11 "Grid Frequency"
// link id 16 "switch" to channel 1
linkTuyaMCUOutputToChannel 16 bool 1
// link id 1 "total forward energy" to channel 5
linkTuyaMCUOutputToChannel 1 val 5
// TAC2121C VoltageCurrentPower Packet
// This will automatically set voltage, power and current
linkTuyaMCUOutputToChannel 6 RAW_TAC2121C_VCP
// link id 11 "switch prepayment" to channel 7
linkTuyaMCUOutputToChannel 11 bool 7
// MF link id 104 "power factor" to channel 10
linkTuyaMCUOutputToChannel 104 val 10
// MF link id 105 "supply frequency" to channel 11
linkTuyaMCUOutputToChannel 105 val 11
// NOTE: addRepeatingEvent [RepeatTime] [RepeatCount]
// code below will forever toggle relay every 15 seconds
addRepeatingEvent 10 -1 tuyaMcu_sendQueryState
(BTW: ¿Why is NTP driver needed?)
I could add power factor (correct) and frequency (shows 5.00 Hz and channel value is 500.00, but there's only "Frequency_div100" option for this type). I'm afraid the real resolution for this variable is 1-2 decimal at most; it's very difficult that the real frequency is 50,000 Hz
Also, the Home Assistant screenshot:
Some of the labels seem to be different to those in autoexec.bat and RSSI says "Desconocido" (Unknown)
I will continue trying to add more things, but I'm afraid the Alarm Set 1 and 2 are beyond my possibilities 😢
EDIT: Deleting previous edit about leakage current; there must be some error, I'll add later
Added after 2 [hours] 17 [minutes]:
Regarding leakage current, ff I add to autoexec.bat the following:
setChannelLabel 12 "Leakage Current"
linkTuyaMCUOutputToChannel 15 val 12
But leave as "Default" or "Custom" the channel type, I get the following:
Channel shows the same value as on the device's screen but nothing in the listing above (I imagine this is normal behavior). Then, if I change channel type to "Current_div100" I get:
Correct value for the channel again and something coherent (apart from the rounding) shows in the listing. It should be 0,060 A or 60 mA, but I choose div100, so my fault...
BUT, if I choose change channel type to "Current_div1000" then I get:
An invalid value, both in the channel and in the listing, that are now cloning the values for Current on channel 4. I imagine this is because you can't use the same channel type for 2 different channels. Is this intended or is a bug?
I will add Frequency_div10 for you, but in general, we may consider something more flexible in the future, of course, with backwards-compatibility included.
NTP is just for current time, maybe previous config author used that.
I think you need a leakage current channel type for leakage current.
I will add Frequency_div10 for you, but in general, we may consider something more flexible in the future, of course, with backwards-compatibility included
Thank you! A possibility would be to separate the type and the scale (multiplier or divisor), but you'll know better what would be easier to implement
p.kaczmarek2 wrote:
I think you need a leakage current channel type for leakage current.
But it doesn't exist yet, does it?
On the other hand, if we had more than one current measurement (in a three-phase meter, for example), would it work well if you assigned the same type to more than one channel?
I did a deeper analysis of DPIDs 17 and 18. I started rewriting the JSON on EDIT2 here in a more legible way:
(I pasted it like an image because the tabulations get distorted if I publish it like code, but I'm also attaching the file, remove ".txt" after downloading)
So, for example, for DPID 17:
55 AA
03
07
00 08
11
00
00 04
0401001E
49
HEADER
VER=03
State
LEN
dpId=17
Raw
LEN=4
V=67174430
CHK
The "payload" 04010050 translates to:
1st byte (indicating the presence of the alarm): 04 2nd byte (when this alarm occurs, the circuit breaker control mode (0X01 trip, 0X00 no action, only alarm)): 01 (trips)
3rd and 4th bytes: setting alarm threshold: 001E (HEX translates to DEC 30; corresponding to the 30mA which coincides with my setting of the leakage current threshold).
For DPID 18 the analysis would be, for example:
55 AA
03
07
00 10
12
00
00 0C
01010013 030100FA 040100D2
21
HEADER
VER=03
State
LEN
dpId=17
Raw
LEN=12
Values
CHK
The "payload" 01010013 030100FA 040100D2 translates to:
01010013 1st byte (indicating the presence of the alarm): 01 Could be the code for overcurrent 1st byte (indicating the presence of the alarm): 03 Could be the code for overvoltage (see 3rd and 4th bytes)
2nd byte (when this alarm occurs, the circuit breaker control mode (0X01 trip, 0X00 no action, only alarm)): 01 (trips)
3rd and 4th bytes: setting alarm threshold: 00FA (HEX translates to DEC 250; corresponding to the 19A which coincides with my setting of the overvoltage threshold).(see 3rd and 4th bytes)
2nd byte (when this alarm occurs, the circuit breaker control mode (0X01 trip, 0X00 no action, only alarm)): 01 (trips)
3rd and 4th bytes: setting alarm threshold: 0013 (HEX translates to DEC 19; corresponding to the 19A which coincides with my setting of the overcurrent threshold).
030100FA 1st byte (indicating the presence of the alarm): 03 Could be the code for overvoltage 1st byte (indicating the presence of the alarm): 03 Could be the code for overvoltage (see 3rd and 4th bytes)
2nd byte (when this alarm occurs, the circuit breaker control mode (0X01 trip, 0X00 no action, only alarm)): 01 (trips)
3rd and 4th bytes: setting alarm threshold: 00FA (HEX translates to DEC 250; corresponding to the 19A which coincides with my setting of the overvoltage threshold).(see 3rd and 4th bytes)
2nd byte (when this alarm occurs, the circuit breaker control mode (0X01 trip, 0X00 no action, only alarm)): 01 (trips)
3rd and 4th bytes: setting alarm threshold: 00FA (HEX translates to DEC 250; corresponding to the 19A which coincides with my setting of the overvoltage threshold).
040100D2 1st byte (indicating the presence of the alarm): 04 Could be the code for undervoltage in this DP(see 3rd and 4th bytes)
2nd byte (when this alarm occurs, the circuit breaker control mode (0X01 trip, 0X00 no action, only alarm)): 01 (trips)
3rd and 4th bytes: setting alarm threshold: 00D2 (HEX translates to DEC 210; corresponding to the 19A which coincides with my setting of the undervoltage threshold).
So, more or less, everything is clear; the only thing that puzzles me is the different meaning of the alarm code in both DPs, but could be normal as can be deducted from the examples in the JSON
Anyway, these DP IDs seem to be useful only for reading and setting the thresholds for alarms which, like I said before, can be done from the local interface and doesn't change frequently, so could be skipped in OBK (apart from the sake of completion...). More interesting would be to include DP ID 9, which is the alarm status, that is very interesting to have reported remotelly.
morgan_flint wrote:
BTW, there's a string in the logs (55 AA 03 07 00 10 12 00 00 0C 01 01 00 13 03 01 00 FA 04 01 00 D2 21) that gives an error in TuyaMCUAnalyzer:
I opened an issue in Github related to this; I checked the string against Tuya specs for this command and the string seems correct, including checksum
Attachments:
TOMPD-63LW_TuyaCloudCutter.json.txt(9.67 KB)
You must be logged in to download this attachment.
Hello again!
I have changed/completed the autoexec.bat so now almost all DPIDs of interest are shown:
Code: Java
Log in, to see the code
In red/green I've added the channel numbers. Some comments:
All channels show correct values except for:
- Channel 6: shows 0.28 kWh and the value in the display is 2.8 kWh. I'm using channel type "EnergyTotal_kWh_div100", so could be corrected if "EnergyTotal_kWh_div10" existed (or an alternative for divisors)
- Channel 11: shows 5.00 Hz and the value in the display is 50 Hz. I'm using channel type "Frequency_div100", so could be corrected if "Frequency_div10" existed (or an alternative for divisors)
- Channel 9 (power factor) shows the correct value but doesn't seem to recognize the label set in autoexec.bat. Am I doing something wrong?
Other comments regarding channels:
- I've set Channels 8 and 14 ("Clear Prepayment" and "Test Leakage") as "Toggle", and they work as intended, i.e., when "pushed", channel 6 sets to 0 (first case) and leakage alarm appears and switch trips (second case). The "problem" is that they stay green (0) and don't go back to red (0) by themselves, as could be expected. In these cases, a "momentary" button type would be a possible solution (or maybe include something in the autoexec for these channels that made them return to 0 a few seconds after toggling to 1?)
- Channel 15 (Alarm set 1) shows in the textfield the correct decimal value for the expected hex value, according to the analysis in my previous post but, surprisingly, the value shown below for the same channels is different (67174490 vs 67174488.00). At that moment, I had the setting of the leakage current threshold in 90mA, which coincides with the last two digits in the textfield and, if I changed it to 30 in the device, the textfield would react accordingly. What doesn't work is the opposite: if I change the value in the textfield to 67174430 and hit "Set!", the value changes momentarily to this one but returns to 67174490 in a few seconds (and the value in the device's screen doesn't change). So, unfortunately, this isn't a way to set the thresholds from the web interface.
- I tried a similar approach with "Alarm set 2", but it doesn't show any values (stays at 0). I'm afraid it's due to its length (similar to the exception in TuyaMCUAnalyzer).
- Finally, channel 17 ("Fault") shows the correct decimal value for a given alarm, according to the analysis in this post. For example, 4 if I force an overcurrent or 8 during the leakage test. I don't know if there is a better way to treat these "bitmaps" in OBK
Here are some more screenshots in different situations:
And the screenshot from Home Assistant:
The textfields are ignored, and the label for power is not the same; curiously, the label for power factor is correct here
Apart from some details, all the interesting DPs are covered; the only thing I consider interesting that is missing is a better treatment for "Fault" signaling (knowing remotely what has been the protection that has acted: overload, overvoltage, undervoltage or leakage)
Good progress, keep it on! I will try to add required channel types tomorrow.
Thank you!
Another curious fact about this device: It can detect negative (export) power:
To check this I simply inverted input and output. The problem is, as the device feeds itself from the input and the relay is open, it doesn't start, but if you temporarily bridge the input and the output (N to N and L to L, of course...) then the device starts and, once it closes the relay, you can remove the bridges and do the test.
Unfortunately, it doesn't report the negative sign to the module, so it doesn't reflect on the web page. Also, despite power being negative, the energy counters continue to increase...
>>20719315 I'm also interested in this subject, as the third listing posted by @crash1912here was the most informative for identifying the DP IDs of the device, and I have a different one in it's way home, so using this method could be the simplest way.
I've asked @crash1912 privately, as I see he hasn't been around for a while but, just in case @fakuivan or somebody else knows the answer: What am I doing wrong? Is the "device id" the correct replacement for xxxxxxxxxxxxxxx?
Then, in the previous link, select Device Control -> Query Things Data Model:
Then, hit "Copy" in the "response" and you get this:
Code: JSON
Log in, to see the code
The interesting part is the one enclosed between quotation marks after "model": :
Code: JSON
Log in, to see the code
The problem is that is all in one line (no carriage returns), so not very legible. This, joined to the fact that the word "model" didn't show well in the previous screenshot is what made it difficult to locate. To make it more legible, I pasted it into notepad++ and made the following substitutions:
Yes, please do, we can send you an Elektroda gadget for doing such tutorial. A guide from start to finish, how to get dpIDs.
Still, keep in mind that it may be also possible to use online JSON formatters/beautifiers
Hello again! I was away for a long time, sorry.
I am very impressed with the great progress!
@morgan_flint Congratulations on your great work, you've worked hard!
@p.kaczmarek2 As always, your help is amazing.
I arrive very late and I see that they have solved practically everything, I don't know if I can contribute anything now... I can only repeat, wow! your work is incredible!
Yes, please do, we can send you an Elektroda gadget for doing such tutorial. A guide from start to finish, how to get dpIDs.
Still, keep in mind that it may be also possible to use online JSON formatters/beautifiers
✨ The discussion centers on the TOMZN TOMPD-63-LW Wifi Multi Function DIN power meter, specifically its compatibility and configuration with OpenBK firmware on the BK7231T platform. Users explored flashing the device with OpenBK, including safe UART data capture methods, backup procedures, and flashing techniques involving the TuyaMCU secondary MCU (HC89F0541). The device features dual relay switching for line and neutral, rated for 63A at 230V, 50/60Hz, with remote control, measurement of voltage, current, leakage current, power factor, and energy consumption, and configurable protection thresholds via the Tuya SmartLife app.
Key technical challenges included identifying UART pins, managing the TuyaMCU communication protocol, and mapping Tuya datapoints (dpIDs) to OpenBK channels. Users successfully extracted and analyzed dpIDs such as relay state (dpID 16), voltage/current/power (dpID 6), total energy (dpID 1), leakage current (dpID 15), alarms (dpID 9, 17, 18), and others. The community developed and refined autoexec.bat scripts to correctly interpret and display these datapoints, including handling raw data packets (RAW_TAC2121C_VCP), scaling factors, and channel labeling.
Firmware updates addressed issues like leakage current scaling, frequency display, and string termination for device identifiers. The device supports negative power detection (export), though the sign is not reported to the OpenBK interface. Users also discussed Tuya cloud API access for device shadow properties and the challenges of missing or write-only dpIDs (e.g., dpID 21, 101). The community contributed improved web interfaces and scripts for enhanced usability, including periodic state refresh commands (tuyaMcu_sendQueryState) to reduce data update latency from minutes to seconds.
Overall, the thread documents the collaborative reverse engineering, firmware customization, and integration of the TOMZN TOMPD-63-LW power meter with OpenBK, enabling local control and detailed monitoring beyond the original Tuya cloud ecosystem. Generated by the language model.
TL;DR: With a 2 MB flash backup first, this breaker can run OpenBeken reliably; as one expert put it, "It’s TuyaMCU". This FAQ helps TOMZN TOMPD-63-LW owners flash WB3S/CBU versions, decode dpIDs, fix slow updates, and restore full relay and metering behavior. [#20694223]
Why it matters: This thread turns a hard-to-flash Tuya DIN breaker into a documented OpenBeken target with known wiring, dpIDs, and working refresh tricks.
Option
Best fit
Main advantage
Main drawback
OpenBeken
TOMPD-63-LW with TuyaMCU
Full local control, dpID mapping, custom UI
Requires UART flashing and setup
ESPHome
Users already on HA
Familiar YAML workflow
Thread did not map this model fully
Tasmota
Users comparing ecosystems
Popular tooling
Thread provided no complete TOMPD-63-LW config
Key insight: The critical hurdle is not the Wi-Fi module itself. It is the secondary TuyaMCU link on UART, which must be isolated by reset or trace separation during flashing, then mapped correctly in OpenBeken.
Quick Facts
The breaker is rated 230 V, 50/60 Hz, up to 63 A, and the product description listed adjustable thresholds such as undervoltage 140–210 V, overvoltage 225–295 V, overcurrent 1–63 A, reconnect delay 1–500 s, and action time 1–30 s. [#20693422]
A successful flash path on the WB3S version used a full 2 MB backup, bk7231flasher_1.1.1, and OpenBK7231T_UA_1.17.221.bin; grounding pin 22 of the HC89F0541 reset line enabled UART read/write without permanent board cutting. [#20697176]
dpID 16 was confirmed as the main relay, dpID 6 carries the combined voltage/current/power packet, dpID 1 is total energy, and dpID 9 is the fault bitmap rather than a single numeric alarm. [#20697712]
The Tuya cloud model exposed at least 20 dpIDs on later units, including 104 power factor, 105 supply frequency, 106 refresh, 116 voltage, 117 current, and 118 active power, beyond the earlier basic set. [#20837470]
Default reporting was slow enough to frustrate users, but adding addRepeatingEvent 10 -1 tuyaMcu_sendQueryState produced practical refreshes every 10 s instead of waiting for the long factory interval. [#20702297]
How do you safely flash OpenBeken onto a TOMZN TOMPD-63-LW with a WB3S or CBU module, including backup, UART wiring, and handling the TuyaMCU connection?
Yes—make a full backup first, then flash over UART with the TuyaMCU isolated. 1. Connect 3.3 V, GND, TX1, RX1 to the WB3S or CBU pads and read a 2 MB backup. 2. Keep the mains side isolated and disable the secondary MCU, usually by reset or temporarily breaking its UART path. 3. Flash OpenBeken, reboot, then restore from backup if needed. On the WB3S unit, this worked with bk7231flasher_1.1.1 and OpenBK7231T_UA_1.17.221.bin. [#20697176]
What is TuyaMCU in the TOMZN TOMPD-63-LW, and how does it communicate with the WB3S or CBU Wi-Fi module?
"TuyaMCU" is a secondary control MCU that reads measurements, drives the front panel, and exchanges datapoints over UART with the Wi-Fi module. In this breaker, the Wi-Fi board is only one part of the design; the HC89F0541-class MCU handles protection logic and LCD tasks. OpenBeken talks through that UART link, so dpIDs come from TuyaMCU rather than directly from the relay hardware. That is why flashing and runtime mapping depend on the UART relationship between TuyaMCU and WB3S or CBU. [#20694223]
What is RAW_TAC2121C_VCP in OpenBeken, and how does it decode voltage, current, and power from dpID 6 on the TOMPD-63-LW?
RAW_TAC2121C_VCP is OpenBeken’s parser for the 8-byte Tuya raw packet on dpID 6. It splits one packet into voltage, current, and active power channels automatically. The Tuya model describes the format as 2 bytes voltage at 0.1 V, 3 bytes current at 0.001 A, and 3 bytes power at 0.0001 kW. The thread later confirmed the packet decodes exactly that way, which is why removing the mapping made channels 2, 3, and 4 fall back to zero. [#20707655]
Why do some TOMZN TOMPD-63-LW units need the HC89F0541 reset pin tied to GND before UART read/write will work?
They need it because the TuyaMCU shares the same UART lines used for flashing the Wi-Fi module. If the HC89F0541 stays active, it drives or listens on that bus and blocks clean UART read/write. One successful workaround grounded pin 22, the reset pin, during backup and flashing. That let UART access work without desoldering the resistor links between the TuyaMCU and the WB3S module. [#20694223]
How can I use tuyaMcu_sendQueryState or addRepeatingEvent to force faster refresh updates on a TOMPD-63-LW that otherwise reports very slowly?
Use tuyaMcu_sendQueryState directly, or schedule it with addRepeatingEvent. The working example was addRepeatingEvent 10 -1 tuyaMcu_sendQueryState, which polls every 10 seconds. That solved the complaint that power values updated only about every 2 minutes under the stock behavior. The command can also be triggered manually from the Web App command area when you want an immediate state dump. [#20702297]
Which dpIDs have been identified for the TOMZN TOMPD-63-LW, and what do dpIDs 1, 6, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 101, 104, and 105 mean?
The key dpIDs are known. 1 total energy, 6 phase A V/I/P raw packet, 9 fault bitmap, 11 prepayment switch, 12 clear prepaid energy, 13 balance energy, 14 charge energy, 15 leakage current, 16 relay switch, 17 alarm_set_1, 18 alarm_set_2, 19 breaker ID, 21 leakage test, 101 clear all energy, 104 power factor, and 105 supply frequency. Later cloud data also exposed 106 refresh, 116 voltage, 117 current, and 118 active power on newer units. [#20854635]
How do channels and dpIDs differ in OpenBeken, and how should linkTuyaMCUOutputToChannel be used correctly on a TuyaMCU breaker?
dpIDs are fixed Tuya datapoints; channels are OpenBeken variables you assign yourself. You can map any suitable dpID to any free channel, but the meaning and type of the dpID do not change. The correct syntax is linkTuyaMCUOutputToChannel [dpId] [varType] [channelID]. In practice, the thread used mappings like linkTuyaMCUOutputToChannel 16 bool 1 for the relay and linkTuyaMCUOutputToChannel 1 val 5 for total energy. [#20700864]
Why does dpID 9 on the TOMPD-63-LW behave like a bitmap, and how can its fault bits be mapped to alarms such as overload, leakage, overvoltage, undervoltage, or low balance?
dpID 9 is a bitmap because each bit represents one fault flag, not one numeric state. Testing showed values such as 4, 8, and 32768, matching single-bit alarms rather than sequential IDs. The Tuya model labels include overload, leakage current alarm, overvoltage, undervoltage, and no-balance alarm. For example, a leakage self-test produced 8, which matched the self-test or leakage-related bit position, while low balance matched a high-order bit. [#20842982]
How can I decode and use alarm_set_1 and alarm_set_2 raw packets from dpIDs 17 and 18 for protection thresholds on the TOMPD-63-LW?
Decode them as 4-byte records per protection: byte 1 = protection code, byte 2 = trip mode, bytes 3–4 = threshold. The thread decoded dpID 17 payloads like 04 01 00 1E as leakage protection enabled, trip-on-fault, threshold 30 mA. dpID 18 grouped three protections in 12 bytes, for example overcurrent, overvoltage, and undervoltage. These packets are mainly useful for reading or writing thresholds, but the actual active fault state still reports through dpID 9. [#20849043]
What is the best way to remove leftover buttons or fields from the OpenBeken web UI after changing or clearing autoexec.bat on this breaker?
Set the old channels back to Channel Type = none in the Web App. Clearing autoexec.bat alone does not remove previously stored UI channel types, so the empty controls remain visible. The fix was confirmed after manually resetting those channel types to default, which cleaned the main interface without a hard reset. If you change autoexec layouts often, clear channel types before assuming the script failed. [#20710443]
How do you get the full Tuya data model and dpID list for a TOMZN TOMPD-63-LW from the Tuya developer platform or cloud explorer?
Use Tuya Developer, not guesswork. 1. Create a Tuya developer project and bind the device. 2. Copy the device ID from the cloud device page. 3. In Cloud Explorer, run the Query Things Data Model request to return the full model JSON with abilityId, access mode, code, scale, and units. This method exposed items like dpIDs 104, 105, 106, 116, 117, and 118 that were not obvious from the early UART logs alone. [#20854635]
OpenBeken vs ESPHome vs Tasmota for a TuyaMCU-based DIN breaker like the TOMZN TOMPD-63-LW: which approach fits best and why?
OpenBeken fits best when the device is TuyaMCU-based and you want full local datapoint control. The thread began with users comparing OpenBeken, Tasmota, and ESPHome, but all concrete progress happened with OpenBeken: successful flashing, dpID discovery, custom autoexec files, fault decoding, and faster polling. One user did mention a similar breaker already flashed with ESPHome, but no equivalent TOMPD-63-LW mapping was developed there. For this exact model, OpenBeken is the only fully documented path in the thread. [#20693722]
Why can leakage current, current, and VCP-based channels interfere in some OpenBeken versions, and what changed with LeakageCurrent_div1000 and RAW_TAC2121C_VCP fixes?
They can interfere because older VCP handling wrote values into channels by channel type, creating race conditions when more than one current-like channel existed. That caused leakage current to mirror the main current or swap values unpredictably. The thread led to two fixes: a dedicated LeakageCurrent_div1000 type and later RAW_TAC2121C_VCP changes so multi-phase and shared-current cases behaved correctly. The maintainer explicitly merged a fix so VCP would only target the intended current channel. [#20871205]
What steps can bring the TOMPD-63-LW screen back if screen bright time was accidentally set to off and the display is no longer visible?
You can recover it blindly from the front keys. 1. Power-cycle the breaker so the menu state is predictable. 2. Long-press the set key, then press the up arrow about 10 times to raise screen bright time above zero. 3. Long-press set again to save. A flashlight may help on the older monochrome LCD, but the blind sequence alone was confirmed to restore a fully dark screen on this model. [#21615685]
How can the TOMZN TOMPD-63-LW be configured to stay off after power-up and only energize the relay after a web, MQTT, or API command?
The thread does not provide a finished power-up-off recipe for this breaker, so there is no confirmed TOMPD-63-LW startup command sequence here. What is confirmed is that relay state is exposed as dpID 16 and mapped in OpenBeken with a toggle channel, so any solution must act on that relay channel after boot. A later user asked for exactly this behavior, but no tested answer was posted in the thread. [#21740935]