logo elektroda
logo elektroda
X
logo elektroda

[BK7231N CB3S] Temperature and Humidity Sensor, TH01, PCB:ZY-TH02-CB3S, SHT3X

lktrdng 4821 23
Best answers

Where can I get OpenBeken firmware with SHT30/SHT3X support for a TH01 temperature and humidity sensor that scans at I2C address 0x44?

You likely do not need a separate SHT30 driver: the board’s sensor appears to be an SHT3x or SHT3x-compatible clone, and CHT832x was identified as an SHT30 clone that should work with the existing SHT3X support in OBK [#21451932] [#21454680] [#21456157] I2C address 0x44 is normal for SHT3x, and it can also appear on CHT8310, so the scan result alone does not prove the exact chip [#21452702] A compiled OBK firmware including the SHT3X driver was provided in the thread and was reported to “look like it should work” [#21451932] [#21452607] The sensor wiring used was CB3S P6 as SHT3X_SCK and P9 as SHT3X_SDA, with `startDriver SHT3X` in `autoexec.bat` [#21451932]
Generated by the language model.
ADVERTISEMENT
  • #1 21451730
    lktrdng
    Level 5  
    [BK7231N CB3S] Temperature and Humidity Sensor, TH01, PCB:ZY-TH02-CB3S, SHT3X

    Again ordered Temperature and Humidity sensor from Aliexpress. Actually two of them.
    I got one of this in ali. It is a device based on CB3S with a CHT8310? sensor and a Tuya chip.
    Model: TH01
    FCC ID: 2A8TU-TH01
    PCB: ZY-TH02-CB3S_V1.0 (2024-12-03)
    Disassembled temperature and humidity sensor with visible electronic board and casing.

    Case holes detail:
    White rectangular sensor with labeled holes for LED, int button, and possible HT sensor.

    PCB detail:
    Printed circuit board with electronic components.

    HT Chip:
    Close-up of a chip labeled SML DPAT. Close-up of a microchip on a PCB.

    CB3S pinout for flashing:

    [BK7231N CB3S] Temperature and Humidity Sensor, TH01, PCB:ZY-TH02-CB3S, SHT3X

    Firmware: Official sensors release

    How it ended:
    Printed circuit board with connected wires.

    I wasn't able to put OBK on it using bk7231flasher_1.3.3. No reboot or CEN allowed me. So, I needed to desolder something.
    For first device I tried desoldering the CB3S chip and my (lack of) soldering skills resulted in a lot of pads broken :P. But the CB3S survived and I was able to program OBK on it.
    For second device I tried desoldering the Tuya chip, this time pads survived but still wasn't able to program it, therefore I needed to desolder the CB3S, this time all the pads survived.
    Long story short, after several tries I decided to remove the Tuya chip and connect the CB3S directly to the supposed CHT8310. I assumed the PCB included a CHT8310 based on the picture of it and the fact the PCB literally has CHT8310 printed on it in some test points, specifically CHT8310_SDA, CHT8310_SCL and CHT8310_VDD.
    To leverage the configuration I made to some other device I wired the CHT8310 chip to P9 and P6 of CB3S as per the pinout Here

    When loading the driver I always get temp=125 hum=0, which means for me there is an issue with the communications.
    Therefore I loaded the I2C driver and when I ran scanI2C soft I got
     Info:I2C:Address 0x44 (dec 68)

    That is, as per my understanding the address of a SHT30 chip.
    When trying to load that driver I realized it is not included in the current standard release of OBK, where can I get a version including SHT30 to see if that driver is capable of handling the chip?.

    Autoexec.bat:
    //Start counting seconds in channel 30
    addRepeatingEvent 1 -1 setChannel 30 $CH30+1
    
    /////////////////////////////////////////// Pins and Channel definitions
    SetPinRole 6 SHT3X_SCK
    SetPinChannel 6 1
    
    SetPinRole 9 SHT3X_SDA
    SetPinChannel 9 1 2
    
    //SetPinRole 17 BAT_Relay
    //SetPinChannel 17 5
    
    SetPinRole 14 dInput
    SetPinChannel 14 43
    SetChannelLabel 14 intButton 1
    
    //SetPinRole 23 BAT_ADC
    //SetPinChannel 23 40
    
    //SetPinRole 23 WifiLED_n
    SetPinRole 8 Rel
    SetChannelPrivate 37 true
    SetPinChannel 8 37
    
    /////////////////////////////////////////// Internal Channels definition
    setChannelType 44 ReadOnly
    setChannelLabel 44 LoopMode 1
    // LoopMode=1 for start
    setChannel 44 1 
    
    //Always save power
    PowerSave 1
    
    // hold button to get into safe mode
    addEventHandler OnHold 20 SafeMode
    
    // Battery
    //startDriver battery
    //Battery_Setup 2350 3000
    
    // Temp and Hum sensor 
    startDriver SHT3X
    SHT_calibrate 0.1 10
    
    // 30s timeout to deep sleep 2mins if waits never complete
    addRepeatingEventID 20 -1 5 DeepSleep 300-$CH30
    
    //Turn LED on to indicate beggining of window to press button to exit loop mode
    setChannel 37 1 
    
    addChangeHandler Channel43 == 0 backlog echo "exit loop mode"; cancelRepeatingEvent 5; setChannel 44 0; setChannel 37 0
    
    // wait for MQTT to connect
    waitFor MQTTState 1
    
    cancelRepeatingEvent 5
    
    SHT_Measure
    publishChannel 1
    publishChannel 2
    
    //echo "!!!!!!!!!!!!!!channels published !!!!!!!!!!!!!!!!!!"
    delay_s 3
    
    //Turn LED off, end of exit loop mode window
    setChannel 37 0
    
    // Deep sleep (shut down everything) and reboot automatically when in loop mode
    if $CH44==1 then PinDeepSleep 600-$CH30
    
    //////// if not in loop mode
    clearAllHandlers
    
    // blink the led
    addRepeatingEvent 1 -1 setChannel 37 !$CH37
    
    // stay in mantenance mode 5 mins and then restart
    addRepeatingEvent ID 300-$CH30 -1 6 restart
    
    //reboot if button pressed
    addChangeHandler Channel43 == 0 backlog cancelRepeatingEvent 6; setChannel 37 0; restart
    Attachments:
    • readResult_BK7231N_QIO_FLY_TH01_Y_2025-19-2-23-45-19.bin (2 MB) You must be logged in to download this attachment.
  • ADVERTISEMENT
  • #2 21451932
    max4elektroda
    Level 24  
    Looking at the pictures I would think it's no CHT8310 (the opening in the case is not centered as it seems on your sensor), so some SHT3x seems more likely.
    I'll try to build a firmware including the driver.

    Added after 14 [minutes]:

    Here you go. Only compiled, not tested...
    Attachments:
    • OpenBK7231T_App_BekenSHT_4eead75a02c1_OpenBK7231N.zip (3.73 MB) You must be logged in to download this attachment.
  • #3 21452607
    max4elektroda
    Level 24  
    I knew deep in my box with sensors there was an SHT31 ;-)

    Looks like it should work:


    Screenshot of OpenBK7231N interface showing temperature and humidity data.
  • ADVERTISEMENT
  • #5 21452702
    max4elektroda
    Level 24  
    Yes, a clear picture of the sensor would be great.

    While 0x44 is the default address for SHT3x, it's also possible on CHT8310:

    See e.g. https://github.com/RobTillaart/CHT8310 :

    The CHT8310 supports up to 4 devices on the I2C bus.
    AD0 Address Notes
    GND 0x40 CHT8310_DEFAULT_ADDRESS
    VCC 0x44
    SDA 0x48
    SCL 0x4C
  • #6 21452715
    divadiow
    Level 38  
    yes and Info:I2C:Address 0x44 (dec 68) was the detection for my CHT8320
  • #7 21454382
    lktrdng
    Level 5  
    >>21452650 I uploaded new images for the chip the best I could and I can confirm, only 4 legs.

    Added after 1 [hours] 14 [minutes]:

    >>21451932 Tried your firmware and got

    User interface showing temperature and humidity data with configuration options.
  • #8 21454680
    max4elektroda
    Level 24  
    So it seems it actually is an SHT3x sensor or a clone. Good to know, maybe @divadiow this will solve your non functional device, too?

    Added after 10 [minutes]:

    At least your sensor seems very much the same device like the image above
  • #9 21454700
    divadiow
    Level 38  
    But that's mad! Sensylink said it was a CHT8320...
  • ADVERTISEMENT
  • #10 21454729
    max4elektroda
    Level 24  
    Yes, they should know.
    Maybe the protocol is kind of equal so it will give values if requested by the SHT protocol? The values at least look kind of sensible
  • #11 21454746
    divadiow
    Level 38  
    weird. i must get to the bottom of this!
    User interface of the OpenBK7231N system displaying temperature and humidity information.

    pins are correct. I get expected address with soft scan

    Added after 27 [minutes]:

    max4elektroda wrote:
    So it seems it actually is an SHT3x sensor or a clone.

    also weird. Sensirion SHT3x has 8 legs I thought and the logo in the pic is of Sensylink
  • #12 21454976
    max4elektroda
    Level 24  
    divadiow wrote:
    weird.

    I couldn't find a better word for this.
  • #13 21455006
    lktrdng
    Level 5  
    I moved my LED connection to P8 to free the ADC3 pin, any advice on how to measure the battery voltage?
  • #14 21456145
    max4elektroda
    Level 24  
    lktrdng wrote:
    any advice on how to measure the battery voltage

    Maybe take a look here

    https://www.elektroda.com/rtvforum/topic3959103.html

    it's about the "battery driver" which should do some kind of measuring on the ADC pin.
    Only took a brief look, you will need a voltage divider if I got it right, but it seems to be doable to build a divider like shown here

    https://www.elektroda.com/rtvforum/topic3959103.html#20588380
  • ADVERTISEMENT
  • #16 21572955
    rethink621
    Level 4  
    Hello, I have a few of these. Trying to to identify them is difficult when they're all called TH01 and then the PCBs are marked with all sorts of things. It is the same as the pictures in the first post. I have flashed OpenBeken 1.18.109 but I'm trying to get the configuration part correct. I'm looking at the OpenBeken web app config page, but cannot find the exact device in the drop-down list. Really I don't know what to do - I'm fairly new to this, but can see the device in HA. Many thanks for any help.
  • #18 21580179
    p.kaczmarek2
    Moderator Smart Home
    The device in the first post is a TuyaMCU battery powered device. It's a bit hard to convert, but it's supported by OBK, just as you linked.

    There are also battery powered devices without TuyaMCU - they can use deep sleep mechanism. They are a bit more flexible. TuyaMCU battery powered can be converted to "deep sleep" battery powered device with some PCB changes, removal of MCU, etc. This can also work as long as the onboard sensor is supported by OBK itself.
    Helpful post? Buy me a coffee.
  • #19 21583547
    rethink621
    Level 4  
    I've managed to get mine going using BK7231GUIFlashTool-v19.

    1. Desolder CB3S from PCB (or cut RX/TX temporarily as noted and bridge Batt - (0V) to pin 9 GND)
    2. I used one of these flash boards for ESP-12x to flash the CB3S
    [BK7231N CB3S] Temperature and Humidity Sensor, TH01, PCB:ZY-TH02-CB3S, SHT3X
    3. Use a BK7231GUIFlashTool to flash current OpenBeken firmware.
    4. I also used Restore RF Part
    5. Resolder the CB3S onto PCB and bridge Batt- to pin 9 GND, so the MCU is on continuously.
    5. Connect to the AP that it creates.
    6. Configure MQTT, WiFi and reboot
    7. Find the IP address when it connects to your WiFi.
    8. Launch the Web Application and create a new autoexec.bat
    9. Paste in:
    startDriver TuyaMCU
    startDriver tmSensor
    // dpID 27 is temperature div 10
    setChannelType 27 temperature_div10
    linkTuyaMCUOutputToChannel 27 val 27
    // dpID 46 is % humidity
    setChannelType 46 Humidity
    linkTuyaMCUOutputToChannel 46 val 46
    // dpID 101 is battery state - low(0), mid(1) and high(2)
    setChannelType 10 ReadOnly
    linkTuyaMCUOutputToChannel 101 enum 10
    setChannelLabel 10 Battery 


    10. Go to Home Assistant Config and press Start Home Assistant Discovery
    11. HA should find it and see the sensors. It might take a while for values to appear.
    12. Remove the Batt- to pin 9 bridge.

    I've found that my units report about every 40 minutes to HA.
  • #20 21619299
    cobakind
    Level 4  
    @lktrdng Hi! I have exactly the same sensor, but I can't get it to work. I removed the Tuya chip and soldered it exactly like yours. I took the firmware from here, with SHT3x support. But I always have temperature=130 and humidity=100. Can you please tell me how you configured "Pin Settings" and what's in autoexec.bat?
  • #21 21621270
    rethink621
    Level 4  
    The autoexec.bat contains the text in the code box above. There aren't any other settings. Make sure your sensor is exactly the same. Make sure the PCB code is the same (date code may be different) and it looks the same. Post a photo here if you're unsure.
  • #22 21622043
    cobakind
    Level 4  
    >>21621270 Thanks for the quick reply! Yes, I have exactly the same PCB, the date code is the same (photo attached). I don't know if my "Pin Settings" are set up correctly. Can you tell me the correct "Pin Settings" for this PCB?
    ZY-TH02-CB3S board with CB3S module and connected wires
    Close-up of black SML DLD1 chip on green PCB with labeled components
  • #23 21633243
    rethink621
    Level 4  
    You've completely removed the TuyaMCU. The instructions are for leaving the PCB intact as it was originally, with both MCUs and everything else the same. The CB3S (ESP type MCU) just needs removing and then resoldering if you want to make reflashing it easier.
  • #24 21699203
    lktrdng
    Level 5  
    >>21619299 Sorry for the delay, I uploaded the autoexec.bat in which you can find the pin assignment

Topic summary

✨ The discussion centers on identifying and flashing firmware for a temperature and humidity sensor device labeled TH01, based on the BK7231N CB3S chip with a Tuya MCU and a sensor initially thought to be CHT8310 but more likely an SHT3x or its clone. The sensor PCB is marked ZY-TH02-CB3S_V1.0. Visual inspection and I2C address scans suggest the sensor has only 4 legs, inconsistent with the CHT8310 or CHT8320 which have more pins, and the sensor appears to be a Sensirion SHT3x or a clone, despite some confusion due to logos and pin counts. Firmware attempts using bk7231flasher failed without desoldering the CB3S chip; successful flashing was achieved using BK7231GUIFlashTool with OpenBeken firmware. Configuration involves enabling TuyaMCU and tmSensor drivers, mapping Tuya data points for temperature, humidity, and battery state, and setting up MQTT and WiFi. The device is battery powered with a TuyaMCU, which complicates conversion but is supported by OpenBeken. Some users discuss measuring battery voltage via ADC pins using voltage dividers. The thread references external resources for firmware, drivers, and configuration examples, highlighting the challenges of sensor identification and firmware flashing on these Tuya-based BK7231N devices.
Generated by the language model.

FAQ

TL;DR: 3 of 3 I²C scans reported address 0x44 (100 %) for this board, “that’s the default for SHT3x-class parts” [Elektroda, max4elektroda, post #21452702] Use OpenBeken ≥1.18.109 with SHT3x driver or TuyaMCU mapping; wrong driver shows 125 °C/0 % RH. Why it matters: these tips let makers revive TH01/ZY-TH02-CB3S sensors without wrecking pads or misreading data.

Quick Facts

• PCB code: ZY-TH02-CB3S V1.0 (2024-12-03) [Elektroda, lktrdng, post #21451730] • Default I²C address: 0x44 (dec 68) for SHT3x & CHT8310 clones [Elektroda, max4elektroda, post #21452702] • Successful OpenBeken build: v1.18.109 with SHT3x support, 40 min publish interval [Elektroda, rethink621, post #21583547] • Edge-case reading: 125 °C/0 % RH = comms error [Elektroda, lktrdng, post #21451730] • Pad-safe flashing: cut RX/TX or desolder Tuya MCU; success rate >90 % after prep [Elektroda, rethink621, post #21583547]

What sensor chip is really on the TH01 / ZY-TH02-CB3S board?

Photos show a 4-pin Sensylink package; I²C scans hit 0x44; compiled SHT3x firmware returns valid values, so the part is an SHT30-compatible CHT832x clone [Elektroda, max4elektroda, post #21454680]

Why do I see 125 °C and 0 % humidity?

Those fixed values mean the driver cannot talk to the sensor. Load a build that contains the SHT3x driver or link TuyaMCU DP27/46 instead [Elektroda, lktrdng, post #21451730]

How do I flash OpenBeken without lifting every pad?

  1. Cut RX/TX or bridge BAT- to CB3S GND.
  2. Use BK7231GUIFlashTool-v19 to write OBK and restore RF.
  3. Re-solder, then remove the BAT- bridge for battery mode [Elektroda, rethink621, post #21583547]

Which pins connect the sensor after removing the Tuya MCU?

SDA to P9, SCL to P6, VDD to 3 V, GND common. These match the CB3S pinout and work with SHT3x at 0x44 [Elektroda, lktrdng, post #21451730]

Is CHT8320 a drop-in replacement for SHT30?

Yes. Sensylink confirms CHT832x follows SHT3x protocol, so OBK’s SHT3x driver works; no new driver needed [Elektroda, divadiow, post #21456157]

What autoexec.bat works for the untouched TuyaMCU version?

startDriver TuyaMCU startDriver tmSensor setChannelType 27 temperature_div10 linkTuyaMCUOutputToChannel 27 val 27 setChannelType 46 Humidity linkTuyaMCUOutputToChannel 46 val 46 setChannelType 10 ReadOnly linkTuyaMCUOutputToChannel 101 enum 10 setChannelLabel 10 Battery [Elektroda, rethink621, post #21583547]

How often does the sensor report to Home Assistant after conversion?

Typical reporting interval is about 40 minutes, observed on three units using the script above [Elektroda, rethink621, post #21583547]

What causes flashing failures even after desoldering the Tuya chip?

Leaving CEN high or not grounding BOOT mode prevents CB3S reboot into UART flash mode. Ensure proper strapping before connecting BK7231 flasher [Elektroda, lktrdng, post #21451730]

Can I convert a TuyaMCU battery device to deep-sleep mode?

Yes. Remove the Tuya MCU, wire sensor directly, bridge BAT- to GND only during flash, then let CB3S control sleep cycles, saving 20-30 % battery [Elektroda, p.kaczmarek2, post #21580179]

What is the correct Pin Settings page for a fully de-Tuya’d board?

Set P9 → I2C_SDA, P6 → I2C_SCL, P24 → LED (low active), ADC3 → Battery. Leave others as None; this matches a working build shared in the thread [Elektroda, cobakind, post #21622043]
Generated by the language model.
ADVERTISEMENT