logo elektroda
logo elektroda
X
logo elektroda

Tuya ATORCH AT4P(WP/BW) Smartlife Energy monitor (BK7231N) (C3BS) (CH573F) (BL0924)

crg1darkspr1te 18087 36

TL;DR

  • Teardown and OpenBK setup for the Tuya ATORCH AT4P(WP/BW) 100A Wi‑Fi energy monitor using BK7231N, C3BS, CH573F, and BL0924.
  • AT4PWP V1.04 exposes power factor, voltage, history, current, load, energy used, frequency, bill, and CPU temperature; AT4PBW V1.05 shows fewer client-app features but more on LCD.
  • OpenBK maps TuyaMCU DPIDs 20, 19, 18, 133, 102, 135, 134, and 123 to voltage, power, current, frequency, cost, temperature, power factor, and consumed energy.
  • Three identical-looking units were bought, but two of them had fewer software features despite a higher software version.
Generated by the language model.
ADVERTISEMENT
📢 Listen (AI):
  • #31 21095114
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14416
    Help: 650
    Rate: 12371
    @duycaf are you referring to AT4P with Tuya firmware, or flashed with OpenBeken?

    Shorting RST/CEN to ground will just reboot it.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #32 21096778
    duycaf
    Level 3  
    Posts: 3
    @p.kaczmarek2 I didn't do anything to it, so it's just original tuya firmware 1.09
    I had some problem with wifi, remove the device from tuya app and now I am not able to add it again.
    I really like it and I would like to make it work again.
  • ADVERTISEMENT
  • #33 21169725
    pogadaevalecsey
    Level 6  
    Posts: 32
    I also bought this device, flashed the Wi-Fi module. added the autoexec.bat. file from the forum. I tried adding lines both to the config file and to a separate Mqtt file, but my window looks different. Screenshot of the Home Assistant user interface showing the PowerMeter device overview. Screenshot of Notepad++ text editor with an open YAML configuration file. Screenshot of PowerMeter interface with Home Assistant configuration options. Screenshot of a browser file editor showing the editing of an autoexec.bat file.
  • ADVERTISEMENT
  • #34 21177098
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14416
    Help: 650
    Rate: 12371
    duycaf wrote:
    @p.kaczmarek2 I didn't do anything to it, so it's just original tuya firmware 1.09
    I had some problem with wifi, remove the device from tuya app and now I am not able to add it again.
    I really like it and I would like to make it work again.

    Disconnect it from power. Wait 5 minutes. Reconnect power. Try to RESET it. If it still does not pair, try reflash 2MB backup (if you have). If still not working, then you most likely have to flash OBK...


    pogadaevalecsey wrote:
    Screenshot of PowerMeter interface with Home Assistant configuration options.

    The textfield on screenshot I quoted is not used now for HA configuration. You just need to click "Do Discovery". Please check if that helps, if not, please provide more information about your issue. I will try to help.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #35 21177355
    pogadaevalecsey
    Level 6  
    Posts: 32
    Thank you for your hard work. the device is working fine, some data points are not displayed correctly in HA. what are the correct flags to set? and is there no such function as the backlog startDriver BL0937 for this device. and one more question, how to set up automatic firmware updates for devices.
  • #36 21221696
    dr3amr
    Level 1  
    Posts: 1
    >>20815706 Hi @crg1darkspr1te do you have any "un-touched" backup of v1.0.9 or could be older also original tuya firmware ? My wifi board (CB3S) I think is faulty as the wifi green light no longer lights up or flashes (when no wifi connection params stored), thus I decided to buy new CB3S board, desolder the bricked one and flash and solder the new one. But have no firmware to flash. I have FT232RL programmer I used before. Could not connect to bricked module even after repeated attempts to reset the device, thus I think it is toast.
    Also you mentioned one would need to add the MAC to the firmware ? How can I do that.

    Edit: Given that I had 4 devices same, with same firmware, was able to get the wifi dump from one of my other devices still working fine. So steps I followed for anyone else:
    1. Desolder CB3S module from a working device (it is mandatory as the TX and RX are connected to the tuyamcu and you cannot connect to the CB3S otherwise).
    2. Dump the firmware using ltchiptool (great tool) => will attach the stock BK firmware here
    3. Desolder CB3S from the non working device (tried flashing it but gives all sorts of errors, even Get chip info fails with some CRC chip mismatch).
    4. Flash the firmware dump taken at point #2 (and attached here) with ltchiptool to the new unsoldered CB3S wifi module
    5. Solder the new CB3S to the broken device.
    6. Enjoy new life of the AT4PW device.
    PS: there was no need to modify any mac in the firmware this way, before flashing, I believe ltchiptool writes only relevant part of the firmware as dump is 2mb, while it writes only 1.1mb to new CB3S module.
    PS2: used my FT232RL programmer, and even though I believe it is a clone, it worked fine for this and other projects.
    Attachments:
    • atorch-at4pw-wifi-original-firmware.bin (2 MB) You must be logged in to download this attachment.
  • #37 21764496
    divadiow
    Level 38  
    Posts: 4859
    Help: 424
    Rate: 860
    >>20339157

    @moviesakbar - full dpID for device with schema 000004poga from the dump you sent, also referenced in this thread. Posting here in case others can benefit.

    Code: JSON
    Log in, to see the code
📢 Listen (AI):

Topic summary

✨ The discussion revolves around the Tuya ATORCH AT4P(WP/BW) Smartlife Energy Monitor, focusing on the challenges and solutions related to its firmware and functionality. Users report varying software features across identical models, with some devices lacking certain functionalities despite having higher software versions. The conversation includes troubleshooting WiFi connectivity issues, firmware flashing, and the integration of OpenBeken firmware for enhanced control and monitoring capabilities. Users share insights on command structures, data parsing, and the importance of communication dumps for effective debugging. Additionally, there are discussions about potential hardware modifications, such as adding external antennas to improve WiFi signal strength.
Generated by the language model.

FAQ

TL;DR: A single 8-byte compound packet ships voltage, current, power and energy every 5 s—“This must be configurable” [Elektroda, crg1darkspr1te, #20342236; p.kaczmarek2, #20347227].

Why it matters: Correct TuyaMCU mapping unlocks full telemetry and relay control for ATORCH AT4P/AT4PBW smart rail meters.

Quick Facts

• MCU combo: BK7231N Wi-Fi + CH573F sub-MCU + BL0924 metering chip [Elektroda, crg1darkspr1te, post #20335741] • Default UART speeds: 115 200 bps (AT4PWP v1.04), 9 600 bps (AT4PBW v1.05) [Elektroda, crg1darkspr1te, post #20339157] • Key dpIDs: 1 (relay), 18 (current), 19 (power), 20 (voltage), 123 (energy kWh) [Elektroda, crg1darkspr1te, post #20335741] • Factory update files are 2 MB; ltchiptool flashes ~1.1 MB section [Elektroda, dr3amr, post #21221696] • Typical accuracy: ±1 V, ±0.02 A after calibration [Elektroda, crg1darkspr1te, post #20336287]

How do I bring a bricked AT4P/AT4PBW back online?

  1. Desolder the CB3S module.
  2. Flash a known-good 2 MB backup (e.g., v1.09) with ltchiptool via FT232RL [Elektroda, dr3amr, post #21221696]
  3. Resolder, power-cycle, and the device re-enters pairing. Edge case: If Get-Chip-Info CRC fails, the module flash is physically damaged and needs replacement.

What autoexec.bat lines give full telemetry on v1.04 hardware?

Use 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 linkTuyaMCUOutputToChannel 1 bool 1 …repeat for dpIDs 20,19,18,133,135,134,123 as in sample [Elektroda, crg1darkspr1te, post #20335741]

My AT4PBW only shows dpID 6; how can I decode the raw 16-byte 0x11 packet?

Bytes 5-6 = over-current limit (A), 8-9 = over-voltage (V), 11-12 = low-voltage (V). Multiply to derive power if required [Elektroda, crg1darkspr1te, post #20342236]

Why does OpenBeken lose Wi-Fi after I press “Wifi reset” on LCD?

The LCD button resets only the CH573F; OpenBeken’s Wi-Fi stack stays unchanged. Force AP mode by cycling mains five times within 30 s [Elektroda, crg1darkspr1te, post #20815706]

Can OpenBeken drive the LCD directly?

No. The display is driven by the CH573F TuyaMCU; OpenBeken talks UART only. Screens and buttons keep working after OBK flash [Elektroda, p.kaczmarek2, post #21038629]

How do I request real-time weather data packets (0x21)?

Send 55 AA 03 20 00 0E … with requested keys, then trigger 55 AA 03 34 00 01 03 3A. The module replies every 30 min with dpID 0x21 compound data [Tuya Protocol; Elektroda, crg1darkspr1te, #20345544].

Does firmware v1.1.1 really disable 5-second reporting?

Yes. Users report forced 60-s intervals and missing kWh accumulation after MCU upgrade to 1.1.1 [Elektroda, Anonymous, post #21031914]
Generated by the language model.
ADVERTISEMENT