logo elektroda
logo elektroda
X
logo elektroda

[Solved] [T34 BK7231N] Tuya Wifi Smart Plug: Flashing, Configuration, and Power Monitoring Options

Svetlaya 7701 17
ADVERTISEMENT
  • #1 20414363
    Svetlaya
    Level 4  
    Posts: 11
    Help: 1
    Rate: 2
    [T34 BK7231N] Tuya Wifi Smart Plug: Flashing, Configuration, and Power Monitoring Options

    [T34 BK7231N] Tuya Wifi Smart Plug: Flashing, Configuration, and Power Monitoring Options [T34 BK7231N] Tuya Wifi Smart Plug: Flashing, Configuration, and Power Monitoring Options [T34 BK7231N] Tuya Wifi Smart Plug: Flashing, Configuration, and Power Monitoring Options [T34 BK7231N] Tuya Wifi Smart Plug: Flashing, Configuration, and Power Monitoring Options

    Flashed Windows BK7231GUIFlashTool release 1.15.305, update to OpenBK7231N_QIO_1.15.391 (release version)

    P10 -> TX (TTL)
    P11 -> RX (TTL)
    3.3 -> 3.3 (TTL)
    GNG -> GND (TTL)
    CEN -> GND (TTL )


    [T34 BK7231N] Tuya Wifi Smart Plug: Flashing, Configuration, and Power Monitoring Options

    Configured: Wi-Fi Led, Led, Buttom power ON/OFF & power monitoring

    Option #1 - Wi-Fi led is blue when connected. Turns off when there is no connection.
    [T34 BK7231N] Tuya Wifi Smart Plug: Flashing, Configuration, and Power Monitoring Options

    Option #2 - Wi-Fi led blinks blue when connected and goes out after connection.
    [T34 BK7231N] Tuya Wifi Smart Plug: Flashing, Configuration, and Power Monitoring Options

    Thanks a lot for your help and project p.kaczmarek2

    Full on Russian

    Added video firmware
    and
    management in the smart home system MajorDoMo
  • ADVERTISEMENT
  • #2 20414413
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14398
    Help: 650
    Rate: 12321
    Hellp, I can try to help you.
    First of all, I've read that article:
    https://www.v-elite.ru/t34
    and I must say, very good job! Excellent writeup, thanks!


    Regarding power monitoring - can you tell me if it's BL0937 or BL0942?

    Without this knowledge it may be hard to guess. BL0937 can be on any pins so there are many combinations to check...

    but if it's bl0942, then just do "startDriver BL0942" and try to check the readings - do anything show up?
    Helpful post? Buy me a coffee.
  • #3 20414428
    Svetlaya
    Level 4  
    Posts: 11
    Help: 1
    Rate: 2
    p.kaczmarek2 wrote:
    Hello, I can try to help you.
    First of all, I've read that article:
    https://www.v-elite.ru/t34
    and I must say, very good job! Excellent writeup, thanks!


    Sorry for my bad English...
    Thank you for the excellent firmware! And to everyone who took part in the project!)
    I will be grateful for your help!
  • Helpful post
    #4 20414439
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14398
    Help: 650
    Rate: 12321
    Regarding power metering - maybe try to start BL0942 driver?
    The power metering chip is usually BL0937 or BL0942. So we have a 50% chance to get BL0942, which is always on the same UART port.
    If it's BL0937, then it can use any pins, so it would be hard...

    But maybe let's try BL0942.
    Step 1: Config->Startup command text:
    [T34 BK7231N] Tuya Wifi Smart Plug: Flashing, Configuration, and Power Monitoring Options
    Step 2: restart
    [T34 BK7231N] Tuya Wifi Smart Plug: Flashing, Configuration, and Power Monitoring Options
    Step 3: do you get results?
    [T34 BK7231N] Tuya Wifi Smart Plug: Flashing, Configuration, and Power Monitoring Options
    Step 4: calibrate with VoltageSet, PowerSet, CurrentSet (like Tasmota)
    https://tasmota.github.io/docs/Power-Monitoring-Calibration/
    Helpful post? Buy me a coffee.
  • #5 20414454
    Svetlaya
    Level 4  
    Posts: 11
    Help: 1
    Rate: 2
    Thank you!
    I tried yesterday to put BL0942.
    Voltage - very big!
    But I did not set it as you showed.
    After activating the driver, I introduced an adjustment.

    In the evening I'll just try to activate the driver.
  • ADVERTISEMENT
  • #6 20414464
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14398
    Help: 650
    Rate: 12321
    The thing is, we don't know if it's BL0942 or not. I am just guessing. It could be BL0937 as well.

    Are you able to look at the chip and read the marking?
    Helpful post? Buy me a coffee.
  • #7 20414486
    Svetlaya
    Level 4  
    Posts: 11
    Help: 1
    Rate: 2
    [T34 BK7231N] Tuya Wifi Smart Plug: Flashing, Configuration, and Power Monitoring Options
    can not see((

    Added after 6 [minutes]:

    Question.
    # startDriver BL0937
    Will disable BL0942?

    Added after 12 [minutes]:

    If adjustments were made
    # VREF 15987.125000
    # PREF-683.023987
    # IREF 272302.687500
    How to reset to default?
  • ADVERTISEMENT
  • Helpful post
    #8 20414537
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14398
    Help: 650
    Rate: 12321
    Wait please. I have some hints.
    First, this looks like '7', as in BL0937:
    [T34 BK7231N] Tuya Wifi Smart Plug: Flashing, Configuration, and Power Monitoring Options
    Second, this is BL0942:
    [T34 BK7231N] Tuya Wifi Smart Plug: Flashing, Configuration, and Power Monitoring Options
    so chip from photo is not BL0942 because it has 8 and not 10 pins.
    Third, this is BL0937:
    [T34 BK7231N] Tuya Wifi Smart Plug: Flashing, Configuration, and Power Monitoring Options
    Fourth:
    for BL0937 you must do:
    - remove "startDriver", this is not needed
    - check which GPIO pin is used for CF, CF1 and SEL
    - set those GPIO in Config->Device:
    [T34 BK7231N] Tuya Wifi Smart Plug: Flashing, Configuration, and Power Monitoring Options
    You need to set all 3 pins. Check which is which with multimeter.

    Dodano po 7 [minuty]:

    Well, just remove the line and save empty field.
    [T34 BK7231N] Tuya Wifi Smart Plug: Flashing, Configuration, and Power Monitoring Options
    And reboot.

    The thing you need to do now is to determine which T34 pins are used for:
    - CF
    - CF1
    - SEL
    of BL0937.

    Dodano po 9 [minuty]:

    and of course you might need to reboot for BL0937 driver to start, at least for the first time.
    Helpful post? Buy me a coffee.
  • #9 20417944
    Svetlaya
    Level 4  
    Posts: 11
    Help: 1
    Rate: 2
    p.kaczmarek2 wrote:
    Wait please. I have some hints.
    First, this looks like '7', as in BL0937:

    Thank you!
    I had to disassemble again and call contacts)))

    [T34 BK7231N] Tuya Wifi Smart Plug: Flashing, Configuration, and Power Monitoring Options

    Datashit
    [T34 BK7231N] Tuya Wifi Smart Plug: Flashing, Configuration, and Power Monitoring Options

    [T34 BK7231N] Tuya Wifi Smart Plug: Flashing, Configuration, and Power Monitoring Options
  • #10 20418053
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14398
    Help: 650
    Rate: 12321
    Svetlaya wrote:

    [T34 BK7231N] Tuya Wifi Smart Plug: Flashing, Configuration, and Power Monitoring Options

    Sorry, is "cv" a "CF1" ? And "H" is "SEL"?
    Those pin numbers: P22, P23, P24, etc
    [T34 BK7231N] Tuya Wifi Smart Plug: Flashing, Configuration, and Power Monitoring Options
    are here:
    [T34 BK7231N] Tuya Wifi Smart Plug: Flashing, Configuration, and Power Monitoring Options
    Do something like:
    [T34 BK7231N] Tuya Wifi Smart Plug: Flashing, Configuration, and Power Monitoring Options
    and reboot
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #11 20418440
    Svetlaya
    Level 4  
    Posts: 11
    Help: 1
    Rate: 2
    p.kaczmarek2 wrote:

    Sorry, is "cv" a "CF1" ? And "H" is "SEL"?
    Those pin numbers: P22, P23, P24, etc

    Yes, is work monitoring.
    Designations on the board. Didn't change. For those who buy such a power plug.
    You can match the numbers by datashit or by looking at my config.


    p.kaczmarek2 wrote:

    [T34 BK7231N] Tuya Wifi Smart Plug: Flashing, Configuration, and Power Monitoring Options
    and reboot

    not work!

    this is work
    [T34 BK7231N] Tuya Wifi Smart Plug: Flashing, Configuration, and Power Monitoring Options [T34 BK7231N] Tuya Wifi Smart Plug: Flashing, Configuration, and Power Monitoring Options
  • #12 20418536
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14398
    Help: 650
    Rate: 12321
    Svetlaya wrote:

    p.kaczmarek2 wrote:

    [T34 BK7231N] Tuya Wifi Smart Plug: Flashing, Configuration, and Power Monitoring Options
    and reboot

    not work!

    Example, real configuration is different.

    Svetlaya wrote:

    this is work
    [T34 BK7231N] Tuya Wifi Smart Plug: Flashing, Configuration, and Power Monitoring Options [T34 BK7231N] Tuya Wifi Smart Plug: Flashing, Configuration, and Power Monitoring Options

    Good jobs! Thanks.

    Is there anything else I may help you with?
    Helpful post? Buy me a coffee.
  • #13 20419824
    Svetlaya
    Level 4  
    Posts: 11
    Help: 1
    Rate: 2
    p.kaczmarek2 wrote:

    Good jobs! Thanks.

    Is there anything else I may help you with?


    Not on this topic)
    Thanks for your help and your project!

    I am preparing a new article - [BL602] LED RGB Strip (Magic Home)
    Hope it's ready next week.
  • #14 20419851
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14398
    Help: 650
    Rate: 12321
    Thanks.

    Remember to try out:
    
    backlog startDriver SSDP; startDriver NTP
    


    SSDP is so devices show here:
    [T34 BK7231N] Tuya Wifi Smart Plug: Flashing, Configuration, and Power Monitoring Options
    NTP is for realtime from web.
    Helpful post? Buy me a coffee.
  • #15 20419905
    Svetlaya
    Level 4  
    Posts: 11
    Help: 1
    Rate: 2
    Ok, Thanks
    I'll be home in 10 hours, I'll try

    Added after 9 [hours] 22 [minutes]:

    Svetlaya wrote:
    Ok, Thanks
    I'll be home in 10 hours, I'll try


    Work! Thanks!
    [T34 BK7231N] Tuya Wifi Smart Plug: Flashing, Configuration, and Power Monitoring Options
  • #17 20442989
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14398
    Help: 650
    Rate: 12321
    Thanks, very useful resource.
    We recently added BL602 guide:
    https://www.youtube.com/watch?v=L6d42IMGhHw
    Helpful post? Buy me a coffee.
  • #18 20566330
    Svetlaya
    Level 4  
    Posts: 11
    Help: 1
    Rate: 2
    3 months in operation, everything is ok

Topic summary

✨ The discussion revolves around flashing and configuring the Tuya Wifi Smart Plug (T34) using the BK7231N chip. Users share experiences with the BK7231GUIFlashTool, specifically version 1.15.305, and the OpenBK7231N_QIO firmware. Key topics include power monitoring capabilities, identifying the power metering chip (BL0937 or BL0942), and configuring GPIO pins for proper functionality. Users provide step-by-step instructions for activating drivers, calibrating voltage and power settings, and troubleshooting issues related to the chip identification and configuration. The conversation highlights the importance of correctly identifying the chip to ensure accurate power monitoring and successful configuration.
Generated by the language model.

FAQ

TL;DR: Flash and configure a Tuya T34 (BK7231N) for power metering: there’s a 50% chance it’s BL0942, and “BL0942 is always on the same UART port.” Use the correct driver or pin mapping, then calibrate. [Elektroda, p.kaczmarek2, post #20414439]

Why it matters: It shows DIYers how to flash, pick the right power-chip method, and calibrate a T34 plug for accurate monitoring.

Quick Facts

What chips does the T34 use for power monitoring, and how do I choose the setup?

T34 plugs typically ship with either BL0937 or BL0942 power ICs. There’s a 50% chance yours is BL0942. “BL0942 is always on the same UART port.” If BL0942, enable the BL0942 driver and calibrate. Otherwise, configure BL0937 by assigning CF, CF1, and SEL pins in OpenBK. [Elektroda, p.kaczmarek2, post #20414439]

How can I physically identify BL0937 vs BL0942 on the board?

Count the pins. BL0937 packages have 8 pins; BL0942 has 10 pins. Board photos in the thread show this difference clearly. If you see 8 pins, use BL0937 with CF, CF1, and SEL mapping. With 10 pins, proceed using the BL0942 driver. [Elektroda, p.kaczmarek2, post #20414537]

How do I flash OpenBK on a T34 BK7231N?

Use Windows BK7231GUIFlashTool v1.15.305 and flash OpenBK7231N_QIO_1.15.391. After flashing, configure Wi‑Fi LED, relay, and power monitoring in the web UI. This tool and firmware combination was confirmed working on the T34. [Elektroda, Svetlaya, post #20414363]

What UART wiring puts the T34 into flashing mode?

Wire P10→TX and P11→RX on your USB‑TTL adapter. Provide 3.3 V to 3.3 and GND to GND. Pull CEN to GND to enter flash mode. This wiring allowed successful flashing on the T34 board. [Elektroda, Svetlaya, post #20414363]

How do I enable BL0942 readings in OpenBK (three quick steps)?

  1. Enter "startDriver BL0942" in Config > Startup command and save.
  2. Reboot the device.
  3. Verify readings, then calibrate with VoltageSet, PowerSet, and CurrentSet. This sequence starts the BL0942 driver and brings up measurements for calibration. [Elektroda, p.kaczmarek2, post #20414439]

How do I configure BL0937 on the T34?

Do not add a startDriver line. Map BL0937’s CF, CF1, and SEL to the correct BK GPIOs in Config > Device. “You need to set all 3 pins.” Reboot so the driver starts. Trace pads with a multimeter to confirm each signal before assigning. Setting only two lines prevents valid readings. [Elektroda, p.kaczmarek2, post #20414537]

I enabled BL0942 and see huge voltage—what went wrong?

Large or nonsense readings usually mean the wrong driver or bad calibration. If your meter IC is 8‑pin BL0937, BL0942 won’t work. Clear the BL0942 startup command, map CF/CF1/SEL for BL0937, reboot, then calibrate. Readings normalize once the correct method is used. [Elektroda, p.kaczmarek2, post #20414537]

How do I disable a driver I added in Startup command?

Open Config > Startup command, delete the line, save, and reboot. This stops the driver from starting at boot. Use this when switching from a BL0942 attempt to the BL0937 pin‑mapped setup. [Elektroda, p.kaczmarek2, post #20414537]

Which board labels help map BL0937 signals?

On the T34 board, labels like “cv” and “H” appear near meter pads. Use a multimeter to trace these pads to BK pins and assign CF, CF1, and SEL accordingly in Config > Device. Reboot after saving your mapping. [Elektroda, p.kaczmarek2, post #20418053]

How do I calibrate readings after enabling power monitoring?

For BL0942, use VoltageSet, PowerSet, and CurrentSet to align with known voltage and load. Calibrate only after readings appear. OpenBK follows Tasmota‑style calibration, so values adjust live. Reboot if needed to apply changes cleanly. [Elektroda, p.kaczmarek2, post #20414439]

Can I make the plug discoverable on my network and sync time automatically?

Yes. Run: backlog startDriver SSDP; startDriver NTP. SSDP exposes the device in Windows Network. NTP keeps the clock synced from the internet. Add the backlog to Startup for persistence. [Elektroda, p.kaczmarek2, post #20419851]

What Wi‑Fi LED behaviors can I configure in OpenBK?

Two verified modes: 1) Blue when connected, off when disconnected. 2) Blink blue while connecting, then off after connection. Assign the LED roles in OpenBK per your preference. Both modes worked on the T34 after flashing. [Elektroda, Svetlaya, post #20414363]

Is this setup stable over time?

A user reported three months of continuous operation without issues after flashing and configuration. This indicates stable behavior under normal use. Recheck calibration if mains conditions or loads change. [Elektroda, Svetlaya, post #20566330]

What if the chip marking is unreadable?

Identify by package and tracing. Count pins (8 for BL0937, 10 for BL0942). If markings are unclear, count pins, then probe labeled pads (e.g., “cv”/“H”) to map CF/CF1/SEL before configuring. [Elektroda, p.kaczmarek2, post #20414537]

Does it work with a smart home platform like MajorDoMo?

Yes. The author shared a video demonstrating control of the flashed T34 in MajorDoMo. Follow the shown approach for automation after OpenBK setup. [Elektroda, Svetlaya, post #20442507]
Generated by the language model.
ADVERTISEMENT