logo elektroda
logo elektroda
X
logo elektroda

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

divadiow 5754 22
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
  • #1 20879346
    divadiow
    Level 38  
    Posts: 4852
    Help: 424
    Rate: 857
    I present what appears to be another variant of the temperature and humidity sensor TH01 (TH01Y on PCB). This unit has a CBU (BK7231N) module soldered to the top of the PCB. It takes 2x AAA batteries. Packaging is labeled as a Smart Life product.

    (My original post)

    PCB silk-screen markings of interest:
    TH01Y-CBU_V1.0 2023-10-11

    I notice there are test pads marked "AHT20", but the sensor chip is actually an AHT30.

    Advertisement for Tuya temperature and humidity sensor on an online store.
    Smart Life temperature and humidity sensor packaging with barcode. Smart Life temperature and humidity sensor packaging. External view of the TH01 temperature and humidity sensor in a white casing. Temperature and humidity sensor case without batteries on a fabric background. PCB of temperature and humidity sensor with CBU module. Close-up of a sensor PCB with the CBU module. Close-up of a PCB with AHT30 component and markings TH01Y-CBU_V1.0.
    Screen showing no updates available for modules.

    The 16 pin unmarked chip appears to be some MCU.
    Here are some traces I found which I think I've got right. BAT-/+, KEY and P5_B pads not shown in pic, but easily readable on PCB

    Close-up of the TH01Y sensor PCB with CBU module.

    Diagram of CBU module (BK7231N) with pin labels.

    I don't seem to be able to get a dump/flash yet though, however I power the unit - either from the CBU pins or from the batt-/+ pads. I guess maybe the MCU comms are getting in the way and the TX and or RX need decoupling. I'll update this as I find more.

    edit: probably the same situation as this? https://www.elektroda.com/rtvforum/topic3972260.html

    I'll disconnect RX/TX
    Attachments:
    • TH01_AHT30_TuyaMCU_factory.bin (2 MB) You must be logged in to download this attachment.
    • uart2.txt (5.55 KB) You must be logged in to download this attachment.
  • ADVERTISEMENT
  • #2 20879377
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14412
    Help: 650
    Rate: 12356
    This looks like a TuyaMCU device, so probably a variant of this:
    [CB3S/BK7231N] Temperature/Humidity Sensor with TuyaMCU - Diagram, Reverse Engineering
    You could follow the guide above to handle this device, but... maybe it would be easier to add AHT30 support directly to OBK, remove the MCU and route the wires?

    Do you happen to know how AHT30 protocol looks like?
    We have a SHT3X driver, wouldn't that work for it already?
    https://github.com/openshwprojects/OpenBK7231T_App/issues/574
    https://github.com/openshwprojects/OpenBK7231...f3af70efda56f9f0ee856d/src/driver/drv_sht3x.c
    Removing TuyaMCU would bring some advantes, for example, you'd have full control over the sleep time.
    Helpful post? Buy me a coffee.
  • #3 20879452
    divadiow
    Level 38  
    Posts: 4852
    Help: 424
    Rate: 857

    Hi. Thanks for replying!

    I had not considered removing the MCU totally and rerouting.

    Since my last update, I've disconnected the MCU_TX pin on the MCU chip and have managed to begin a firmware dump, but it stops about 11-12s after power-up. Maybe it's going to sleep or something. I'll disconnect RX and try again.

    Screenshot of a flash memory reading process with success and failure messages.

    What is the purpose of the MCU if the CBU module can be engineered to perform all functions? Why do other temp/hum devices not have an MCU?

    I'll try the SHT3x driver if I can get it to flash with OBK. I do not know what the AHT30 protocol looks like. I could only find AHT20 references.
  • ADVERTISEMENT
  • #4 20880001
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14412
    Help: 650
    Rate: 12356
    Apparently no one knows. Tuya is using both TuyaMCU and solo WiFi module in their sensors. For us, I'd always say that TuyaMCU only complicates stuff, but maybe, just maybe, the MCU is a bit more power saving than the WiFI-only version, but I would have to check. Still, it's always a lottery, I don't think it's possible to determine whether a sensor is TuyaMCU-based or not just juding from the advertisement and product description itself.
    Helpful post? Buy me a coffee.
  • #5 20968680
    nacxoffw
    Level 5  
    Posts: 13
    Rate: 1
    @pkaczmarek2 @divadiow

    Hi, i have two PCBs more recent like that (TH01Y of 2023-12-16)
    Image of a PCB with connected wires on a blue surface.
    and with the next autoexec.bat no data is received, always 0:


    startDriver TuyaMCU
    startDriver tmSensor
    
    // may be needed, depends on device, some also use 9600
    tuyaMCU_setBaudRate 115200
    
    // dpID 1 is tempererature div 10
    setChannelType 1 temperature_div10
    linkTuyaMCUOutputToChannel 1 val 1
    // dpID 2 is % humidity
    setChannelType 2 Humidity
    linkTuyaMCUOutputToChannel 2 val 2
    // dpID 3 is battery state - low(0), mid(1) and high(2)
    linkTuyaMCUOutputToChannel 3 enum 3
    setChannelType 3 ReadOnlyLowMidHigh
    setChannelLabel 3 Battery
    //
    // setup dpCache - temperature interval
    //
    // Show textfield for that
    setChannelType 5 TextField
    // setup display name
    setChannelLabel 5 Temperature Interval
    // Make value persistant (stored between reboots), 
    // start value -1 means "remember last"
    SetStartValue 5 -1
    // set default value if not set
    if $CH5==0 then setChannel 5 1
    // link dpID 17 to channel 5, the type is val, extra '1' means that its dpCache variable
    linkTuyaMCUOutputToChannel 17 val 5 1
    
    setChannelType 6 TextField
    setChannelLabel 6 Humidity Interval
    SetStartValue 6 -1
    if $CH6==0 then setChannel 6 1
    linkTuyaMCUOutputToChannel 18 val 6 1


    Maybe dpID changes? How to know this?
  • #6 20968742
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14412
    Help: 650
    Rate: 12356
    For a start, please show us the full Web App log so we can tell which dpIDs are sent and whether is there TuyaMCU communication at all.
    Helpful post? Buy me a coffee.
  • #7 20968792
    nacxoffw
    Level 5  
    Posts: 13
    Rate: 1
    @pkaczmarek262
    Info:MAIN:Main_Init_Before_Delay
    Info:CFG:####### Boot Count 68 #######
    Warn:CFG:CFG_InitAndLoad: Correct config has been loaded with 6 changes count.
    Error:CMD:no file early.bat err -2
    Info:GEN:PIN_SetupPins pins have been set up.
    Info:MAIN:Main_Init_Before_Delay done
    Info:MAIN:Main_Init_Delay
    Info:MAIN:Main_Init_Delay done
    Info:MAIN:Main_Init_After_Delay
    Info:MAIN:ssid:CaritoAux key:Tequiero1390
    Info:MAIN:Using SSID [CaritoAux]
    Info:MAIN:Using Pass [Tequiero1390]
    Info:MQTT:MQTT_RegisterCallback called for bT BK7231N_HumedadPrinc/ subT BK7231N_HumedadPrinc/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT bekens/ subT bekens/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/BK7231N_HumedadPrinc/ subT cmnd/BK7231N_HumedadPrinc/+
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/bekens/ subT cmnd/bekens/+
    Info:MQTT:MQTT_RegisterCallback called for bT BK7231N_HumedadPrinc/ subT BK7231N_HumedadPrinc/+/get
    Error:CMD:Too many args, skipped all after 32nd.
    Info:MAIN:Started TuyaMCU.
    Info:CMD:CMD_StartScript: started autoexec.bat at the beginning
    Info:MAIN:Main_Init_After_Delay done
    Info:MAIN:Drv TuyaMCU is already loaded.
    Info:MAIN:Started tmSensor.
    Info:GEN:Channel 1 type changed to temperature_div10
    Info:GEN:Channel 2 type changed to Humidity
    Info:GEN:Channel 3 type changed to ReadOnlyLowMidHigh
    Info:GEN:Channel 5 type changed to TextField
    Info:EVENT:CMD_If: fourth argument always must be 'else', but it's '5'
    Info:GEN:Channel 6 type changed to TextField
    Info:EVENT:CMD_If: fourth argument always must be 'else', but it's '6'
    Info:MAIN:Time 1, idle 265638/s, free 72976, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 2, idle 186537/s, free 72976, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 3, idle 70244/s, free 72256, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 4, idle 0/s, free 72256, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 5, idle 0/s, free 72256, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTING - 1
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTED - 4
    Info:MQTT:mqtt_userName openhabian
    mqtt_pass openhabianNacxo
    mqtt_clientID BK7231N_HumedadPrinc
    mqtt_host 192.168.1.100:1883
    Info:MAIN:Time 6, idle 101614/s, free 72776, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Boot complete time reached (5 seconds)
    Info:CFG:####### Set Boot Complete #######
    Info:MQTT:mqtt_connection_cb: Successfully connected
    Info:MQTT:mqtt_subscribed to BK7231N_HumedadPrinc/+/set
    Info:MQTT:mqtt_subscribed to bekens/+/set
    Info:MQTT:mqtt_subscribed to cmnd/BK7231N_HumedadPrinc/+
    Info:MQTT:mqtt_subscribed to cmnd/bekens/+
    Info:MQTT:mqtt_subscribed to BK7231N_HumedadPrinc/+/get
    Info:MQTT:Publishing val humedadprinc to BK7231N_HumedadPrinc/host retain=0
    Info:MAIN:Time 7, idle 173706/s, free 72832, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:Publishing val Build on Jan 25 2024 17:06:47 version 1.17.425 to BK7231N_HumedadPrinc/build retain=0
    Info:MAIN:Time 8, idle 198563/s, free 72832, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    
  • #8 20968807
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14412
    Help: 650
    Rate: 12356
    There is no TuyaMCU communication at all. Do you power that WiFI module artificially? TuyaMCU communication will only occur if you allow TuyaMCU to control the power of WIFi chip
    Helpful post? Buy me a coffee.
  • #9 20968824
    nacxoffw
    Level 5  
    Posts: 13
    Rate: 1
    I tested powering from battery pinouts and from CB3S 3v/GND pinouts before and after rebuild Rx Tx board traces...
    Any tip?
  • ADVERTISEMENT
  • #10 20968837
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14412
    Help: 650
    Rate: 12356
    What is that?
    
    Error:CMD:Too many args, skipped all after 32nd.
    

    This isn't supposed to happen.

    It looks like an issue that I saw few months ago, where a user had some strange web browser bug that caused autoexec.bat script copied from forum to corrupt itself (wrong line endings) and it broke OBK parser.

    Maybe you need to somehow fix (remove and manually enter) line endings of script and retry...

    Can you go to OBK web app panel, to LittleFS tab, and download zip/tarball of LFS and attach it here so I can check?
    Helpful post? Buy me a coffee.
  • #11 20968855
    nacxoffw
    Level 5  
    Posts: 13
    Rate: 1
    Of course! here you are @p.kaczmarek2 ! LittleFS__...-41-50.tar (10 kB)You must be logged in to download this attachment.

    Edited: after same work, with a clean template this error gone
    Error:CMD:Too many args, skipped all after 32nd.


    Other error solved by commiting it:
    Info:EVENT:CMD_If: fourth argument always must be 'else', but it's '6'

    because this lines are wrong ¿?
    
    if $CH5==0 then setChannel 5 1
    if $CH6==0 then setChannel 6 1
    



    After that, MCU still not sending info in log (Logs.txt (7.6 kB)You must be logged in to download this attachment.)


    About this board... maybe... is a new model with CB3S instead of CBU... maybe need other Driver? In the U8 chipset say 8310...
    Another question, if i connect it throw battery connectors, TuyaMCU must be operating with Wifi chipset and send data? About timing... how long keep ON and how time took to sleep?

    Any sugestions?
  • #12 21006796
    gloorung
    Level 6  
    Posts: 8
    Rate: 1

    Hi,

    I have the same unit and following the instructions, I was able to get this to work. The only thing I had to change in the autoexec.bat script provided in a previous post is the baud rate. After setting this to 9600, the device sends temperature, humidity, and battery level values as documented.
  • #13 21006801
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14412
    Help: 650
    Rate: 12356
    nacxoffw wrote:

    Other error solved by commiting it:
    Info:EVENT:CMD_If: fourth argument always must be 'else', but it's '6'

    because this lines are wrong ¿?
    
    if $CH5==0 then setChannel 5 1
    if $CH6==0 then setChannel 6 1
    

    This will happen if you use older version of firmware without better syntax parsing. Please update.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #14 21070716
    JardaLCZ
    Level 5  
    Posts: 17
    Help: 1
    Rate: 1
    Hello, thanks to all for the descriptions and tips.

    I have also two PCBs (TH01Y-CB3S_V1.6 2023-12-16), searched all forum topics but now I am in this state:
    Temperature and Humidity is displayed, but I need some level correction.
    There is warning to configure target channels for temp and humid. results, but I don't know where to do it. I tried to guess the pins but not successfully. See attached screenshot.


    MQTT is connected, but publish voltage and battery with 0 values.
    Humidity and temperature are published as:
    temperature not divided by 10
    ChaTH1/1/get 

    humidity
    ChaTH1/2/get


    My autoexec.bat:

    startDriver TuyaMCU
    startDriver tmSensor
    
    // may be needed, depends on device, some also use 9600
    tuyaMCU_setBaudRate 9600
    
    // dpID 1 is temperature div 10
    setChannelType 1 temperature_div10
    linkTuyaMCUOutputToChannel 1 val 1
    // dpID 2 is % humidity
    setChannelType 2 Humidity
    linkTuyaMCUOutputToChannel 2 val 2
    // dpID 3 is battery state - low(0), mid(1) and high(2)
    linkTuyaMCUOutputToChannel 3 enum 3
    setChannelType 3 ReadOnlyLowMidHigh
    setChannelLabel 3 Battery
    //
    // setup dpCache - temperature interval
    //
    // Show textfield for that
    setChannelType 5 TextField
    // setup display name
    setChannelLabel 5 Temperature Interval
    // Make value persistent (stored between reboots),
    // start value -1 means "remember last"
    SetStartValue 5 -1
    // set default value if not set
    if $CH5==0 then setChannel 5 1
    // link dpID 17 to channel 5, the type is val, extra '1' means that its dpCache variable
    linkTuyaMCUOutputToChannel 17 val 5 1
    
    setChannelType 6 TextField
    setChannelLabel 6 Humidity Interval
    SetStartValue 6 -1
    if $CH6==0 then setChannel 6 1
    linkTuyaMCUOutputToChannel 18 val 6 1


    Thanks for advice or links to final solution. If there is no final on one page, I will post my result when I will successfully similar to the "my" door sensor solution as here: https://www.elektroda.com/rtvforum/topic4023117.html

    EDIT/UPDATE:
    I understood, that battery indicator is readable and it has only 0,1,2 states
    ChaTH1/3/get 


    So now I want to customize:
    1. Wake up interval, for example the measuring one hour is enough to me.
    2. how to read temperature divided 10. I can change it in home assistant, but better is change it before MQTT publishing
    3. how to set up the correction of temp. and humidity.


    Screenshot of a configuration interface with channel settings. Screenshot of sensor interface showing temperature and humidity data with a warning about unconfigured target channels.
  • #15 21103261
    nyal
    Level 2  
    Posts: 2

    I also have some of these TH01Y-CBU Boards.
    This is what I have found out so far:
    If you try often enough (more than 10-100 times), you can program the firmware randomly without stopping after about 11-12 seconds.
    If you remove the MCU chip, programming works without any problem at the first time

    I have flashed 6 of these devices, but they stop working after a few hours. They don't publish to MQTT anymore.
    I want to revert them to the original firmware, but unfortunately, I can't find my original firmware file.

    Can someone upload or send this file to me?
  • #16 21104717
    divadiow
    Level 38  
    Posts: 4852
    Help: 424
    Rate: 857
    I've added factory firmware backup to first post, but MQTT shouldn't be dropping off. Anyway, won't it be in deep sleep mode most of the time and only do MQTT when it wakes...
  • #17 21104783
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14412
    Help: 650
    Rate: 12356
    BK7231 easy uart flasher automatically saves backups to backups directory.
    Helpful post? Buy me a coffee.
  • #18 21432080
    groove6j
    Level 9  
    Posts: 49
    Help: 3
    Rate: 13
    I have the same CBU variant of TH01Y-CBU-V1.0 2023-11-15
    I have tested the solution with the autoexec.bat at 9600 baud and it works fine with tuyaMCU present.

    Now I'm figuring out how to wire the AHT20 directly to CBU and how I could communicate with it. I think it would be a nicer solution and propably more battery friendly if configured with the DeepSleep function. I suppose it is over I2C protocol.
  • #19 21434398
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14412
    Help: 650
    Rate: 12356
    AHT20 certainly works with OBK, I have AHT20 modules from aliexpress and I have them setup on my test boards with various OBK chips.

    You can also check AHT20 family tutorial:
    https://www.elektroda.com/rtvforum/topic4052685.html
    Helpful post? Buy me a coffee.
  • Helpful post
    #20 21891367
    divadiow
    Level 38  
    Posts: 4852
    Help: 424
    Rate: 857
    didn't realise I'd already sort-of done this in the first post.

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

    I wanted to find out what these unmarked 16-pin TuyaMCUs really are.

    they could be Padauk PFS154s. GND, VCC and PB5 line up.
    https://www.padauk.com.tw/en/product/show.aspx?num=66&kind=42
    [BK7231N] [CBU] [AHT30] Cutesliving TH01 Smart Life Temperature and Humidity Sensor

    annoyingly they require the Padauk burning hardware
    https://www.padauk.com.tw/en/technical/index.aspx?kind=27
    Attachments:
    • PFS154 datasheet_EN_V107_20240912.pdf (2 MB) You must be logged in to download this attachment.
  • #21 21891559
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14412
    Help: 650
    Rate: 12356
    Why is Padauk burning hardware required? What's special there? Couldn't we just make a driver for Beken?
    Helpful post? Buy me a coffee.
  • #22 21891652
    divadiow
    Level 38  
    Posts: 4852
    Help: 424
    Rate: 857
    in section 9.1.8 in the datasheet:

    Code: Text
    Log in, to see the code

    Code: Text
    Log in, to see the code

    [BK7231N] [CBU] [AHT30] Cutesliving TH01 Smart Life Temperature and Humidity Sensor
    5S-P-003
    [BK7231N] [CBU] [AHT30] Cutesliving TH01 Smart Life Temperature and Humidity Sensor

    it seems there are DIY programmers, but their creation looks quite involved:
    https://free-pdk.github.io
    https://github.com/free-pdk/easy-pdk-programmer-hardware
    https://github.com/free-pdk/easy-pdk-programmer-lite-hardware

    assuming these chips are PFS154-S16 even
  • Helpful post
    #23 21892976
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14412
    Help: 650
    Rate: 12356
    Ahhh, it seems it needs higher voltages, like VPP which may be more than 5V. I can see how it complicate stuff.

    It reminds me of the old PICKIT2 clone I did 10 years ago, it also had to generate VPP with a simple step up converter from 5V:
    https://www.elektroda.pl/rtvforum/topic3209760.html

    So that would not be very simple for Beken, sadly. I hoped for a flashing approach that will work at BK7231 GPIO logic levels (0-3.3V).
    Helpful post? Buy me a coffee.

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