logo elektroda
logo elektroda
X
logo elektroda

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

crg1darkspr1te  36 18087 Cool? (+7)
📢 Listen (AI):

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.

Hi All,
I have started on getting OpenBK ready for this device ,
https://pt.aliexpress.com/item/1005004407477380.html?gatewayAdapt=glo2bra
It is a 100A wifi (disabled BT) energy monitor.
Internals pictures as follows
i total of 3 units each Identical on the outside, purchased as the same model and 2 of the 3 software wise have less features but higher software version.
Software AT4PWP V1.04 will show Power Factor, Voltage, history, current (A) ,load (W) , energy used kw/h , frequency, bill and cpu temp on client app and main screen.
Software AT 4PBW V1.05 will show Voltage, Load (W) and current with on/off history on client app but displayss all the above and humidity ? on the lcd. it also has exact same pcb and markings.
Screenshot...t Life.jpg (186.36 kB)You must be logged in to download this attachment. AT4PBW
Screenshot...t Life.jpg (241.85 kB)You must be logged in to download this attachment. AT4PWP
openbk autoexec.bat

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


pinouts of the ch573

PB15 -> pin 3 of JP3
PB14 -> Pin 2 of JP3 -> Button 1
PB13 -> CB3S RXD1
PB12 -> CB3S TXD1
PB11 -> pin 4 of JP2 -> bt led
PB10 - > pin 3 of JP2 -> Button 3
PB7 -> bl0942 adc/energy monitor RX
PB4 -> bl0942 adc/energy monitor TX
PB23 -> bt uart tx Ac6328 (zh-jieli.com) -> pin 2  of JP4 (not fitted)
PB22 -> bt uart rx AC6328 -> pin 4 of JP4 (not fitted) 
PA4 -> Button 2
PA9 -> Relay control 
Attachments:
  • 20221212_101413.jpg (703.96 KB) You must be logged in to download this attachment.
  • c3bs_module.pdf (811.32 KB) You must be logged in to download this attachment.
  • Screenshot_20221207_101849_Smart Life.jpg (150.91 KB) You must be logged in to download this attachment.
  • ch573f_usage.png (189.64 KB) You must be logged in to download this attachment.
  • 20221212_095000.jpg (740.96 KB) You must be logged in to download this attachment.
  • 20221205_153758.jpg (709.28 KB) You must be logged in to download this attachment.
  • 20221205_153806.jpg (633.76 KB) You must be logged in to download this attachment.
  • 20221121_124023.jpg (680.29 KB) You must be logged in to download this attachment.
  • 20221122_100159.jpg (879.42 KB) You must be logged in to download this attachment.
  • 20221122_100151.jpg (857.42 KB) You must be logged in to download this attachment.

About Author
crg1darkspr1te wrote 22 posts with rating 12 , helped 2 times. Been with us since 2022 year.

Comments

p.kaczmarek2 15 Dec 2022 12:07

Very good job, did you figure dpIds yourself? From what I can see, there was no compound device-specific packet types? For example, this device: Hiking DDS238-2 Smart Meter had one custom packet... [Read more]

crg1darkspr1te 15 Dec 2022 16:23

The dplds were pulled from the logs once i figured that the baud rate had to be changed (many a time i fotgot to add that and assume wiring at fault, lmao) most stick to the listed ones for power/current/voltage/frequency... [Read more]

crg1darkspr1te 17 Dec 2022 12:01

I found more, this one passed my eyes but brain did not see, when i unpacked/decrypted the factory firmware i found a .json file with ID's in it that match this hardware { "gw_bi":... [Read more]

crg1darkspr1te 18 Dec 2022 08:40

So on the next device (type AT4PBW, Mcu ver 1.05) i am not getting any feedback at all, in the logs there are quite a few issues Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04... [Read more]

p.kaczmarek2 18 Dec 2022 10:35

Having a full communication dump from the original firmware can help a lot in such cases. It is easier to investigate when you know what's supposed to happen. Info:TuyaMCU:TUYAMCU received:... [Read more]

crg1darkspr1te 18 Dec 2022 11:17

Attached is a realterm hex dump of the device with factory firmware. I reset the device the recorded the provisioning from both the TX and RX of the signal , attached is capture(TX of tuyamcu) and capture2... [Read more]

p.kaczmarek2 18 Dec 2022 12:46

Any more information on those captures? Current voltage, power, etc? Lots of data here https://obrazki.elektroda.pl/5760334200_1671363689_thumb.jpg Some of packets looks like custom data: ... [Read more]

crg1darkspr1te 18 Dec 2022 20:15

Ok, I finally got openbk to build for the N device i have , lots of face palm moments my side getting build env up, I like to use platformio for my ide on win/linux and normally not a issue but as I also... [Read more]

p.kaczmarek2 18 Dec 2022 21:10

You don't need to do the capture via UART, you could launch OpenBeken and then do test with 60W bulb and 10W bulb and show me what OpenBeken receives, I think. [Read more]

crg1darkspr1te 19 Dec 2022 11:05

I have flash the lastest bin file but it seems the device wont go past the ez-pair screen (not accepting the ok from bk device? ) if i do the command tuyaMcu_sendQueryState i will get this in the logs... [Read more]

crg1darkspr1te 20 Dec 2022 07:52

So i did some more digging and found this https://developer.tuya.com/en/docs/iot/tuya-cloud-universal-serial-port-access-protocol And they mentioned the Commands in use, I noticed a few on there not... [Read more]

p.kaczmarek2 20 Dec 2022 18:35

0x21 also seems to be specific to this device. I am not sure about the structure of 0x21 packet yet. Sample whole packet: 55AA002100400108772E74656D702E300004000000160C772E68756D69646974792E3000040000004608772E706D32352E3000040000002607772E6171692E3000040000006C30 71... [Read more]

crg1darkspr1te 21 Dec 2022 07:14

The packet 0x21 is response to the command 55 aa 03 34 00 01 03 3a , proactively request weather data , and the breakdown of 0x21 is as follows this is found on the link i posted before ... [Read more]

p.kaczmarek2 21 Dec 2022 08:37

I will try to add parsing of that data to OpenBeken later today. Will commit soon: https://obrazki.elektroda.pl/1114962300_1671636492_thumb.jpg [Read more]

crg1darkspr1te 22 Dec 2022 09:30

I have been able now to read voltage/current from the device and then manually calculate power , here is my patch , drv_tuyaMCU.c else if (sectorLen == 4) { iVal = data[ofs +... [Read more]

p.kaczmarek2 22 Dec 2022 10:06

This is not the correct way to do that. Please see this commit: https://github.com/openshwprojects/OpenBK7231T_App/commit/5a03649f7261413fba0d2c0794894c347381a5a8 https://obrazki.elektroda.pl/7852314300_1671699832_thumb.jpg... [Read more]

aerzk1971 14 Nov 2023 01:01

@ElektrodaBot I have a wifi problem before it works well but after the last power outage the wifi does not work and the green light no longer lights up I tried all the parameters like setting to zero and... [Read more]

ElektrodaBot 14 Nov 2023 01:05

It definitely sounds like the power outage may have caused some damage to your WiFi equipment. Let's try to troubleshoot the issue step by step. 1. Power Cycle : Although you've mentioned setting things... [Read more]

aerzk1971 14 Nov 2023 02:05

the AT4P HD smart account. the problem everything works well overvoltage amperage cuts off at the request of people the red light comes on except the wifi and the two green lights Added after 1 [minutes]:... [Read more]

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.
%}