logo elektroda
logo elektroda
X
logo elektroda

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

divadiow 22374 128
ADVERTISEMENT
  • ADVERTISEMENT
  • #122 21402430
    p.kaczmarek2
    Moderator Smart Home
    Maybe we can start with Tuya Config Extraction:


    Helpful post? Buy me a coffee.
  • #123 21403366
    rhizome
    Level 2  
    @divadiow thanks! I haven't seen the topic.. their config worked instantly without tweaks. @p.kaczmarek2 many thanks for fundamentals! :)
  • ADVERTISEMENT
  • #124 21403545
    lktrdng
    Level 4  
    >>21402420
    Remember i am a newbie, mine is more good intentions than knowledge.
    I would reboot without any driver, double check the CHT83XX_SCK and CHT83XX_SDA, and maybe load it manually.
    Also, you can quickly check if my config also works with your device. I think we have the very same device.
    
    {
      "vendor": "Tuya",
      "bDetailed": "0",
      "name": "Tuya TH Sensor",
      "model": "enter short model name here",
      "chip": "BK7231N",
      "board": "PCB_576P1-V1.0",
      "flags": "0",
      "keywords": [
        "Tuya",
        "CHT8310",
        "temperature",
        "humidity",
        "battery",
        "sensor"
      ],
      "pins": {
        "6": "CHT83XX_SCK;1;0",
        "9": "CHT83XX_SDA;1;2",
        "17": "BAT_Relay;5",
        "20": "dInput;43",
        "23": "BAT_ADC;40",
        "26": "WifiLED_n;37"
      },
      "command": "backlog PowerSave 1; startDriver battery; startDriver CHT83XX; Battery_Setup 2350 3000; CHT_calibrate -1.5 10",
      "image": "https://obrazki.elektroda.pl/5076675700_1736544409.jpg",
      "wiki": "https://www.elektroda.com/rtvforum/topic4098816.html"
    }


    Added after 2 [minutes]:

    >>21403545
    Sorry, i just realized you already solved the issue. My bad :S.
  • ADVERTISEMENT
  • #125 21414181
    sns1
    Level 5  
    Hi,

    I'd like to share some thoughts on this sensor and its optimization and take some advice if any.
    I've converted 4 units (BK7321N CHT3815), added lifepo4 18650 (1.5ah) battery and usb-charger module, packed all in small box with leds/buttons so it's somewhat useful device for monitoring temps on premises.

    Autoexec.bat -
    PowerSave 1
    
    startDriver NTP
    startDriver Battery
    startDriver CHT83XX
    
    Battery_Setup 2500 3400 2.00 2400 4096
    Battery_cycle 2
    
    addEventHandler OnHold 20 SafeMode
    //addEventHandler OnClick 20 delay_s 600
    DSEdge
    
    
    waitFor WiFiState 4
    
    
    publishAll
    delay_s 5
    
    PinDeepSleep 900


    Issues:
    - You have to calibrate each one for reasonable battery measurement. Across all 4 units - dividers are 1.96 to 2.10, it's somewhat important for proper battery monitoring.
    - It's not convenient to reconfigure device, since the path is to boot it into safemode, delete autoexec, restart and configure... If I could launch Web Application under SafeMode - it would be much easier.
    - I'm yet to optimize for how long it should delay before deepsleep. 3 seconds is too small, 10 seconds is too long (for battery reasons), I wish there would be some mqtt state on finishing publish. Probably have to mqtt publish properly and estimate across devices, since not all report, for example, battery data in time, for some devices 5 seconds is enough, for 2 of them it is not...

    p.s. not yet implemented mqtt not found workaround.
  • #126 21511164
    irogala
    Level 2  
    Hi!
    My sensor just went crazy after a couple of months working relatively normal (but draining battery like hell). Yesterday it went silent and after trying all I could I realized the only things which still work are flashing and debug output on TX2 which looks like this:

    V:BK7231N_1.0.1
    REG:cpsr     spsr     r13      r14
    SVC:000000D3          00401C1C 000033AC
    IRQ:000000d2 00000010 00401e0c 00004c28
    FIR:000000d1 00000010 00401ffc db6ca612
    SYS:000000df          0040192c 00000158
    ST:0001AD12
    J 0x10000
    bk_misc_init_start_type b 1ad12
    prvHeapInit-start addr:0x4142f0, size:113936
    [Flash]id:0xeb6015
    sctrl_sta_ps_init
    cset:0 0 0 0
    Entering initLog()...
    Commands registered!
    initLog() done!
    Info:MAIN:Main_Init_Before_Delay



    after this there are only garbage output and of course software doesn't start.
    Any idea what/how to try to bring it to life?
  • ADVERTISEMENT
  • #127 21511232
    divadiow
    Level 34  
    irogala wrote:
    Any idea what/how to try to bring it to life?

    I believe we've seen this before when battery gets too low and the solution has been to solder it back up and reflash - maybe to full factory to restore all then start with OBK again.
  • #128 21511415
    irogala
    Level 2  
    >>21511232
    I felt the same but apparently it can be reflashed without desoldering, I can read OBD config successfully but it doesn't help with boot. Not sure what to reset or erase to change that. And yes, it died due to depleted battery probably.

    Dodano po 9 [godziny] 23 [minuty]:

    Seems reflashing with original tuya firmware and back OBK couple of times helped, it's back working 8-/
  • #129 21571199
    bzzzt
    Level 1  
    A friend of mine bought a couple of these WiFi thermostats, and he realized later, that they (annoyingly) connect to the main server and you also need an app to monitor them,
    On the chip it says the following:
    CBU 2.01.01.103308
    Close-up of a thermostat PCB with a WiFi module labeled CBU and part number 2.01.01.103308.

    I searched around, and I found the tuya-cloudcutter github repo and the list of supported models, but I can't seem to find the exact model for this item.
    I searched the net and according to some images there are different versions (possibly older) of this thermostat, the differences being rather minor, like different icon on plastic or some of them have a barcode model name printed on one of the sides of the battery cover.

    Could the procedure presented in this thread work on this, or is it a different model?
    How could I find the model id/name and see if it is supported by cloudcutter?
    Do I need to dump the firmware?

    Also attaching additional images:
    Close-up of a white electronic module with black printed text, with a white casing visible underneath.
    Label with barcode and product info Tuya WiFi Temperature Humidity Sensor Smart Life on a white cardboard box.
    Close-up of a temperature and humidity sensor package label, showing a QR code and manufacturer details.
    White box with Wi-Fi temperature and humidity sensor, Tuya and Wi-Fi logos, and a thermometer graphic on the front.
    Three parts of a disassembled WiFi thermometer: back cover, front case with thermometer symbol, and electronic circuit board.

Topic summary

The discussion revolves around the Tuya TH01 and its variations, particularly focusing on the CHT8310 temperature and humidity sensor. Users share experiences with flashing the device using OpenBK firmware, troubleshooting issues related to incorrect temperature and humidity readings, and configuring the device for optimal battery performance. Key topics include the use of the ALERT pin for power-saving features, calibration of sensor readings, and the integration of the device with Home Assistant via MQTT. Users also discuss the challenges of using the device with low battery levels and the need for proper pin configuration to avoid boot loops. The conversation highlights the importance of firmware updates and community support in enhancing device functionality.
Summary generated by the language model.
ADVERTISEMENT