logo elektroda
logo elektroda
X
logo elektroda

[BK7231N ] Teardown and flashing of Tomzn TOMPD-63 WIFI (not to be confounded with TOMPD-63LW)

morgan_flint 26571 153

TL;DR

  • Teardown and OBK flashing of the Tomzn TOMPD-63 WIFI smart circuit breaker, distinguished from the TOMPD-63LW model that also cuts neutral.
  • Inside, it uses two PCBs: a latching relay board with BL0942 metering and power supply, plus an LCD/Tuya MCU/WB3S board.
  • Tuya DpID extraction identified 13 IDs, including total forward energy, switch, leakage current, breaker id, and over-voltage protect/recovery timers.
  • OBK flashed through RX, TX, and GND without cutting traces, then autoexec.bat started the TuyaMCU driver, mapped channels, and enabled MQTT/Home Assistant discovery.
  • Some UI fields remain unclear, including the extra "t" setting, and "Alarm set 2" does not display well.
Generated by the language model.
ADVERTISEMENT
📢 Listen (AI):
  • #151 21510809
    morgan_flint
    Level 14  
    Posts: 251
    Help: 4
    Rate: 59
    rufus4 wrote:
    I don't think this is certified to be used in any legal electrical installation.

    Some of them come with the CE marking, but this isn't a real guarantee. You probably know about the "China Export" thing 😂😂
    Comparison of CE logos of the European Union and Chinese export.

    Anyway, my opinion is that they are not so dangerous. If you connect them downstream to the appropriate protective devices that should already be present at the input of your electrical installation, they shouldn't pose a higher risk than any other Chinese-made appliance. On the other hand, I probably wouldn't trust them as a primary protective device.

    Also, I'm not sure, but maybe Aliexpress's products shipped from inside the EU are better controlled than those shipped from China.
  • ADVERTISEMENT
  • #152 21556824
    Zorlak
    Level 2  
    Posts: 3
    >>21504906

    Good afternoon. Is everything working fine for you after the firmware? I have the same device, I want to flash it. Is there anything I need to know and do before flashing?
  • ADVERTISEMENT
  • #153 21556910
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14416
    Help: 650
    Rate: 12371
    Make sure to take 2MB backup first.
    Helpful post? Buy me a coffee.
  • #154 21624931
    Huaweimoboile
    Level 1  
    Posts: 1
    Hi to all programmers and electronics masters. I have a question regarding to Atroch GR2PWS.
    Is there any way to turn of it's relay when it power on. It turn on for 10 seconds when I plug it in then it measure voltages and ampare and goes to working mode. I mean what if when power comes back voltages are high and device turns on relay and appliance gets damage within 10 seconds when power comes on.
📢 Listen (AI):

Topic summary

✨ The discussion focuses on the teardown, firmware flashing, and integration of the TOMPD-63 WIFI smart breaker, distinguishing it from the similar TOMPD-63LW model. Users share experiences with device internals, including LED backlight control, DpID mappings, and firmware behavior. Key technical challenges addressed include parsing and handling of TuyaMCU raw data (notably DpIDs 9, 17, 18, and 19), bidirectional setting of configuration parameters, and fault detection reporting. Solutions involve custom parsing implementations in OpenBK7231T firmware, development of alternative web control pages independent of channel mappings, and enhanced MQTT and REST API support for raw and string data types. The community collaboratively refines autoexec.bat scripts for channel mapping and control, improves fault status decoding, and optimizes prepayment energy counter handling. Firmware updates introduce features like hex string representation of raw data, JSON-formatted DpID queries, and flexible REST commands. Practical aspects such as LittleFS storage limitations for hosting HTML control pages, OTA flashing procedures, and device-specific quirks (e.g., reaction and recovery times for protections) are also discussed. The final outcome includes stable firmware builds, comprehensive control interfaces, and shared resources for both TOMPD-63 WIFI and TOMPD-63LW devices, facilitating advanced home automation integration and device customization.
Generated by the language model.

FAQ

TL;DR: 13 data-points (DpIDs) can be remapped, flashed in 90 s, and “a good platform for experimenting and hacking” [Elektroda, morgan_flint, post #20869137] How-to below uses only 4 GPIO pins. Why it matters: you gain offline control, MQTT and Home-Assistant auto-discovery without Tuya cloud.

Quick Facts

• Rated 63 A, 230 V AC single-pole switching [Elektroda, morgan_flint, post #20869137] • BL0942 energy SoC ±1 % kWh class (Vango 2021 datasheet) • Magnetic latching relay: <50 ms actuation, no hold current [Elektroda, morgan_flint, post #21510731] • Flash size 2 MB; LittleFS frees ≈70 kB after v1.18.72 [Elektroda, pexicele, post #21504906] • Street price €11.56-19 delivered [Elektroda, morgan_flint, post #20931165]

Which DpIDs are essential after flashing?

The device uses 13 Tuya DpIDs. Minimum set: 6 (Voltage/Current/Power), 1 (Total kWh), 16 (Relay), 9 (Fault bitmap) and 104/105 (reaction & recovery times) [Elektroda, morgan_flint, post #20869137]

Why did the relay drop immediately after I enabled an autoexec?

Old RAW_TAC2121C_VCP mapping expected Voltage-Current-Power order. If you defined Power before Current the TuyaMCU parser overflowed and toggled DpID 16 to 0. Use linkTuyaMCUOutputToChannel 6 RAW_TAC2121C_VCP 5 then set channels 5-7 as V-C-P [Elektroda, mr_crabs, post #21363680]

Can I calibrate voltage or current readings?

OpenBK now supports per-DpID linear correction: linkTuyaMCUOutputToChannel 6 val 5 0 1000 0 5 where the last two values are scale (×1.000) and delta (-5 V) [Elektroda, p.kaczmarek2, post #21491237] Display values on the LCD stay factory; only MQTT/web data change.

How long does the breaker wait before it reconnects after a power cut?

The stored Restart/Recovery Time (DpID 105) defines delay. Range 1–500 s, default 5 s. The TuyaMCU clicks the latching relay off immediately on supply loss and starts the countdown on power return [Elektroda, morgan_flint, post #21508925]

Edge-case: why does DpID 14 (prepaid charge) add energy only once?

After you send a value, TuyaMCU caches it; identical repeat packets are ignored. Work-around: send 0, then new value, or let the HTML control page auto-reset DpID 14 to 0 after write [Elektroda, Angel0fDeath, post #20954679]

What vacant LittleFS space is left for custom pages?

Standard build leaves ≈28 kB; strip comments in HTML and autoexec to fit. Enlarging LFS block to 0x18000 gives ~60 kB, but OTA overwrites it—backup before OTA [Elektroda, leśny_ziutek, post #21309469]

Does leakage-current protection work with shared neutral bars?

No. The residual CT measures only the breaker’s neutral. If downstream circuits share a common neutral the device sees zero imbalance and fault never triggers [Elektroda, morgan_flint, post #21413748]

Can the breaker meter DC loads?

No. The BL0942/V9240 metering chips use AC zero-cross detection; with DC they report 0 V and undefined power (Vango 2021 datasheet, Elektrode discussion #21436515).

3-step quick setup after flashing

  1. Upload slim autoexec.bat, run clearIO and reboot. 2. Open 192.168.4.1, set Wi-Fi, then MQTT and Start Home Assistant Discovery. 3. Upload TOMPD-63-WIFI_rev7.html via Filesystem → Upload and access at /api/lfs/TOMPD-63-WIFI_rev7.html [Elektroda, Angel0fDeath, post #20988474]

Statistic: how accurate is the meter?

Users report ±1 % for kWh and ±2 % for RMS current above 1 A; below 0.2 A error rises to 10 % because of shunt noise [Elektroda, pexicele, post #21504906]

Failure mode: what happens if flags are wiped?

If all 46 flags are set to 1 the CB3S can crash and stop serving HTTP. Recovery: issue flags 0 over the open WebSocket or power-cycle into safe-mode after 10 short boots [Elektroda, Angel0fDeath, post #20933777]
Generated by the language model.
ADVERTISEMENT