logo elektroda
logo elektroda
X
logo elektroda

[BK7231N/CBU] Tuya TH01? Generic Wi-Fi Temperature & Humidity Sensor [CHT8310]

divadiow 46263 160
Best answers LABEL_AI_GENERATED

Do I need to dump anything else before flashing OpenBeken on this BK7231N temperature/humidity sensor?

No additional dump was identified as necessary; the firmware dump and boot logs you already captured were enough to move forward, and the thread later confirmed support for the CHT8310 sensor through the CHT8305 driver. Enable the CHT8305 driver in OpenBeken, then check the log for `DRV_CHT8305_init: ID: 59 59 8215` to confirm the chip is being detected correctly [#20874759][#20876020] After that, the device should work normally, and one user reported it was fine aside from needing calibration [#20876035] The thread also concluded this device is really a TH01-style unit rather than TH08, so update the template/name accordingly [#21109755][#21109760] If you want to try cloudcutter first, note that the device may be on patched firmware / NL battery firmware, so serial flashing may still be required [#20852460][#20852625][#20970455]
AI summary based on the discussion. May contain errors.
ADVERTISEMENT
  • Battery ADC appears misconfigured by 0.3–0.4 V

    #151 21888469
    proks777
    Level 2  
    Posts: 10
    Sorry for posting in this thread, but I couldn't find a thread with a similar device. I'm new, and this is the first device I'm trying to flash on OpenBeken.
    I flashed OpenBK7238_QIO_1.18.287.bin. I even tried configuring the pins. The temperature and humidity readings seem to be correct. However, the battery pins seem to be incorrect. I don't remember why I assigned them exactly, and I don't have a better option. The battery is overstated by 0.3-0.4 V. I also doubt I assigned the other pins correctly! Please help me configure them correctly.

    Spoiler:

    [BK7231N/CBU] Tuya TH01? Generic Wi-Fi Temperature & Humidity Sensor [CHT8310] Close-up of a green PCB with SMD components, a mounting hole, and a plus sign marking Hand-drawn wiring diagram of a BME280 sensor connected to a microcontroller, with labeled I2C pins
    Screenshot of sensor status: temperature, humidity, battery level/voltage, Wi‑Fi RSSI, and MQTT connection.


    Spoiler:

    {
    "vendor": "Tuya",
    "bDetailed": "0",
    "name": "Full Device Name Here",
    "model": "enter short model name here",
    "chip": "BK7238",
    "board": "TODO",
    "flags": "1028",
    "keywords": [
    "TODO",
    "TODO",
    "TODO"
    ],
    "pins": {
    "0": "CHT83XX_SDA;1;0",
    "1": "CHT83XX_SCK;0;0",
    "6": "WifiLED_n;0;0",
    "8": "Btn;0;0",
    "9": "dInput;0;0",
    "26": "BAT_Relay;0;1",
    "28": "BAT_ADC;0"
    },
    "command": "",
    "image": "https://obrazki.elektroda.pl/YOUR_IMAGE.jpg",
    "wiki": "https://www.elektroda.com/rtvforum/topic_YOUR_TOPIC.html"
    }
  • ADVERTISEMENT
  • Try Tuya config extraction in OBK first

    #152 21888687
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14770
    Help: 659
    Rate: 12913
    Hey, the first step we usually recommend is Tuya Config Extraction. It's a nice feature of OBK, that can be done entire in OBK Web App! Please give it a try and let us know, what was extracted for you:



    Note that sometimes there is no configuration in Tuya partition, so we may resort to other methods, but it's good to check it first anyway .
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • Questions about pin mapping, battery ADC accuracy, and autoexec.bat

    #153 21888714
    proks777
    Level 2  
    Posts: 10
    >>21888687

    Unfortunately, I was out of luck.

    Quote:
    Sorry, no meaningful pins data found. This device may be TuyaMCU or a custom one with no Tuya config data.
    No module information found.
    Device internal platform - T1, equals BK7238.
    And the Tuya section starts at an UNCOMMON POSITION 28672 (0x7000)


    ====================================

    "0": "CHT83XX_SDA;1;0",
    "1": "CHT83XX_SCK;0;0",
    "6": "WifiLED_n;0;0",
    "8": "Btn;0;0",
    "9": "dInput;0;0",
    "26": "BAT_Relay;0;1",
    "28": "BAT_ADC;0"

    Can I assume the pins are configured?
    My thoughts:
    1. The temperature and humidity are correct. Does this mean CHT83XX_SDA and CHT83XX_SCK are correct?
    2. The LED blinks during boot. Does this mean WifiLED_n is correct?
    3. If I execute PinDeepSleep 90 in the command line and press the button during sleep, the device wakes up. Does this mean Btn and dInput are correct?
    4. I adjusted BAT_ADC and BAT_Relay (Battery_Setup 2200 3000 1.92 2400 4096). I apply 2 volts and see 2.05 on the device, but at 3 volts, I see 2.94 volts. The error is almost 0.1 volt. Is this normal for such devices?

    ===============
    Regarding autoexec.bat. Do I need to add startDriver CHT83XX, startDriver battery? It seems to work without these lines too! Or is it better to add them?

    Can you tell me how to boot without running autoexec.bat? To adjust the settings? I tried five reboots and Safe Mode. But then Launch Web Application is unavailable, and it's unclear how to edit autoexec.bat, and it takes a long time. Is there a simpler solution?
  • Battery-saving deep sleep config with maintenance mode

    #154 21914921
    mkrum001
    Level 3  
    Posts: 41
    Rate: 5
    After a long period of tests I want to share my current config which has the best battery life so far for me:
    Code: Bash
    Log in, to see the code


    Battery setup was done with a volt meter so you can play with it if it doesn't look correct on your device. Disabled sensor background loops so it will read only once after wake up. Button will enter the device in "maintenance" mode so you can access it over browser. And the deep sleep of 570 gives me a real measure of around 10 minutes viewed from HomeAssistant. With this config if there is no change since the last measure it won't push the data for the non changed value.
  • ADVERTISEMENT
  • #155 21929916
    vincenzoernst1
    Level 9  
    Posts: 100
    Help: 3
    Rate: 7
    battey lifetime exstimation?
  • ADVERTISEMENT
  • #156 21930196
    mkrum001
    Level 3  
    Posts: 41
    Rate: 5
    Around 18-20 days with 1000 mA rechargeable batteries.
  • #157 21930209
    vincenzoernst1
    Level 9  
    Posts: 100
    Help: 3
    Rate: 7
    still not really usable off-grid. :-(
  • 60-minute reporting may improve battery life

    #158 21930220
    mkrum001
    Level 3  
    Posts: 41
    Rate: 5
    Well, if you are not looking for measures every 10 minutes you can go with 60 minutes (it was like that when using tuya/smartlife). When the device was with the original firmware it worked for about 40-50 days with the same rechargeable batteries. Also with the original firmware, there was an option for sensitivity between 0.3 and 2, which also improve the batteries. If 0.5 resolution is acceptable, that will reduce MQTT communication. It's a theory, but it's worth trying.
  • #159 21930411
    vincenzoernst1
    Level 9  
    Posts: 100
    Help: 3
    Rate: 7
    this one i only use for playing around ;-)

    i´ll stick with bluetooth based versions and bthome firmware and a esphome bt proxy to HA. battey lifetime >>1 year. i´m very happy with the setup.
  • #160 21930451
    mkrum001
    Level 3  
    Posts: 41
    Rate: 5
    This sounds interesting - could you please share some more details? Especially for the BT-based version.
  • #161 21930456
    vincenzoernst1
    Level 9  
    Posts: 100
    Help: 3
    Rate: 7
    just grep some thb2 variant and flash:

    https://github.com/pvvx/THB2

    for bthome support. then u can go on with avery bthome supporting platform or gateway.
    eg. flash a esp32 with esphome as bt proxy and bind it to your HA or any other supported system

Topic summary

LABEL_AI_GENERATED
Discussion centers on a Tuya Wi‑Fi temperature/humidity sensor based on BK7231N/CBU and a Sensylink CHT8310 sensor, initially mislabeled as TH08/TH01. The thread covers identifying the correct hardware, obtaining the full CHT8310 protocol datasheet, flashing OpenBK firmware via BK7231GUIFlashTool or tuya-cloudcutter, and confirming the device configuration. Support was added by reusing the CHT8305 driver for CHT8310, with the correct sensor ID reported as 59 59 8215. Contributors worked through pin mapping, secondary I²C channel setup, battery monitoring, MQTT/Home Assistant discovery, calibration offsets, and low-battery bootloop behavior. Later updates added ALERT pin support on P7 for deep-sleep wakeup, improved battery-saving scripts, and clarified that the device can be configured as a generic TH01/TH08-style sensor with CHT8310 support in OpenBeken.
AI summary based on the discussion. May contain errors.
ADVERTISEMENT