logo elektroda
logo elektroda
X
logo elektroda

[BK7231N] [CBU] [AHT30] Cutesliving TH01 Smart Life Temperature and Humidity Sensor

divadiow 5997 32
Best answers

How can I flash and use this TH01Y-CBU BK7231N temperature/humidity sensor when the onboard MCU seems to interfere?

This board is likely a TuyaMCU-based sensor, and the reported working setup is to use OpenBK with the TuyaMCU driver at 9600 baud; with that configuration, the device publishes temperature, humidity, and battery values correctly [#20879377][#21006796][#21432080] If flashing stops after about 11–12 seconds, disconnect the MCU TX/RX lines or remove the MCU chip entirely, because users reported that programming works reliably once the MCU is removed [#20879452][#21103261] One user also noted that with the MCU still present, flashing may only succeed after many retries, which matches the “stops after 11–12s” behavior [#21103261] If you want to bypass the MCU completely, the suggestion was to wire the sensor directly and add sensor support in OBK instead of keeping TuyaMCU in the path [#20879377] OBK already supports AHT20 modules, and the maintainer suggested checking whether AHT30 can work through the existing SHT3X driver or by adding direct AHT30 support [#20879377][#21434398]
Generated by the language model.
ADVERTISEMENT
  • #31 21909373
    divadiow
    Level 38  
    Posts: 4936
    Help: 431
    Rate: 876
    p.kaczmarek2 wrote:
    but GND/VDD footprint was matching?

    yes, and 'PB5'

    It could be a Padauk that the flasher doesn't support I suppose. I will buy some real ones to test. I'm also getting ChatGPT to add more verbose logging to the probe exe and the STM32 firmware so I can see if I'm getting anything from these chips
  • ADVERTISEMENT
  • #32 21909389
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14506
    Help: 651
    Rate: 12506
    I dont know anything about Padauk, can they be locked?
    Helpful post? Buy me a coffee.
  • #33 21909438
    divadiow
    Level 38  
    Posts: 4936
    Help: 431
    Rate: 876
    p.kaczmarek2 wrote:
    can they be locked

    apparently yes

    Code: Text
    Log in, to see the code


    https://www.padauk.com.tw/upload/doc/PFS173%20datasheet_v105_EN_20200619.pdf

    but I'd still expect some change with this verbose raw probe firmware and new probe executable. output is the same with and without TuyaMCU present:

    Code: Text
    Log in, to see the code

Topic summary

✨ The discussion centers on the Cutesliving TH01 Smart Life Temperature and Humidity Sensor variant featuring a BK7231N-based CBU module and an AHT30 sensor chip, despite PCB markings indicating AHT20. Users explore firmware dumping challenges due to MCU sleep behavior and consider removing the TuyaMCU to gain full control and improve power management. The device communicates via TuyaMCU protocol at 9600 or 115200 baud, with temperature, humidity, and battery data transmitted as dpIDs. OBK firmware support and driver configurations for TuyaMCU and tmSensor are discussed, including channel type settings and linking dpIDs to sensor outputs. Some users report intermittent MQTT publishing failures and seek original firmware backups. Direct wiring of the AHT30 sensor to the BK7231N module is proposed for better battery efficiency using I2C and deep sleep modes. The AHT20 driver in OBK firmware is suggested as potentially compatible with AHT30. Troubleshooting includes correcting autoexec.bat script syntax and line endings to avoid command parsing errors. Overall, the thread provides insights into reverse engineering, firmware flashing, and custom firmware configuration for BK7231N-based temperature and humidity sensors with TuyaMCU modules.
Generated by the language model.

FAQ

TL;DR: Set TuyaMCU UART to 9600 to get TH01Y temperature, humidity, and battery; “After setting this to 9600” it works. For makers flashing OpenBK (OBK) on TH01Y CBU/CB3S who want reliable telemetry and sleep control. [Elektroda, gloorung, post #21006796]

Why it matters: It prevents empty logs, mismatched dpIDs, and failed reads so you ship stable sensor data fast.

Quick Facts

What hardware is inside the Cutesliving TH01Y TH01/TH01Y board?

It’s a TH01Y with a BK7231N module (CBU/CB3S), 2× AAA cells, and an AHT30 sensor. The PCB often prints test pads labeled “AHT20,” but the fitted chip is AHT30. Board silkscreen examples include TH01Y-CBU_V1.0 2023-10-11. [Elektroda, divadiow, post #20879346]

How do I configure OBK to read T/RH/Batt via TuyaMCU?

Use the TuyaMCU driver at 9600 baud and map dpIDs. 1) startDriver TuyaMCU; startDriver tmSensor 2) tuyaMCU_setBaudRate 9600 3) setChannelType 1 temperature_div10; linkTuyaMCUOutputToChannel 1 val 1; setChannelType 2 Humidity; linkTuyaMCUOutputToChannel 2 val 2; linkTuyaMCUOutputToChannel 3 enum 3; setChannelType 3 ReadOnlyLowMidHigh. [Elektroda, JardaLCZ, post #21070716]

My log shows no TuyaMCU messages. How do I fix that?

Let the TuyaMCU MCU control the Wi‑Fi module’s power. If you power the Wi‑Fi directly from 3V/GND, the UART stays silent. “There is no TuyaMCU communication at all.” Power from the battery rails with the MCU in path or restore the power gating. [Elektroda, p.kaczmarek2, post #20968807]

Why do I get “Too many args, skipped all after 32nd” when running autoexec.bat?

Your script likely has corrupted line endings from copy‑paste. Recreate autoexec.bat with proper CRLF/LF, or paste commands manually in the console. You can download LFS to inspect files, then reupload a clean script. [Elektroda, p.kaczmarek2, post #20968837]

Why do I see “CMD_If: fourth argument must be 'else'”?

You are on older firmware with stricter IF parsing. Update your OBK build to a newer version and rerun your script. Then the IF syntax works as shown in templates. [Elektroda, p.kaczmarek2, post #21006801]

What dpIDs and scaling should I use for this sensor?

Use dpID 1 for temperature scaled by 10 (temperature_div10). Use dpID 2 for humidity in percent. Use dpID 3 for battery as enum with values 0, 1, and 2. Set channel types accordingly. [Elektroda, JardaLCZ, post #21070716]

Can I control wake/sleep intervals (e.g., report once per hour)?

With TuyaMCU kept, the external MCU decides wake/sleep. You can expose and cache interval dpIDs, but sleep timing remains MCU‑driven. Remove TuyaMCU and wire the sensor to OBK to gain “full control over the sleep time.” [Elektroda, p.kaczmarek2, post #20879377]

Can I wire AHT20/AHT30 directly to BK7231N and skip TuyaMCU?

Yes. OBK supports AHT20 over I2C, and you can enable DeepSleep for battery life. “AHT20 certainly works with OBK.” See the AHT20 family tutorial and route SDA/SCL from the sensor to OBK pins. [Elektroda, p.kaczmarek2, post #21434398]

Flashing stops after ~11–12 seconds. What should I do?

This happens when the MCU sleeps mid‑flash. Try many attempts (10–100) or lift MCU RX/TX. Removing the MCU lets flashing work first try. Back up before changes. This prevents the 11–12s cut‑off. [Elektroda, nyal, post #21103261]

My MQTT stops after a few hours. Is the device broken?

Likely not. The unit spends most of its time in deep sleep and only publishes on wake. Expect periodic MQTT updates rather than continuous streaming. Plan dashboards around episodic telemetry. [Elektroda, divadiow, post #21104717]

Which baud rate should I use: 115200 or 9600?

Use 9600 for TH01Y CBU/CB3S TuyaMCU. One user reported values flowed immediately after switching to 9600 in autoexec.bat. Try 9600 if logs are empty. [Elektroda, gloorung, post #21006796]

How do I back up or restore the factory firmware?

Use BK7231 easy UART flasher; it auto‑saves backups in the backups directory. Check that folder before experimenting so you can revert if needed. [Elektroda, p.kaczmarek2, post #21104783]

How do I expose reporting intervals for temperature and humidity?

Create TextField channels and link dpCache dpIDs. Example: dpID 17 to channel 5 for temperature interval; dpID 18 to channel 6 for humidity. Persist values with SetStartValue and initialize defaults. [Elektroda, JardaLCZ, post #21070716]

Is this board using AHT20 or AHT30?

The board shows AHT20 test pads, but the actual sensor soldered is AHT30. Wire checks confirm AHT30, despite silk labels. Adjust drivers or plan direct I2C accordingly. [Elektroda, divadiow, post #20879346]
Generated by the language model.
ADVERTISEMENT