logo elektroda
logo elektroda
X
logo elektroda

TH01 BK7231N CHT8310 Showing 0.00 Temperature and Humidity After Flashing

johnnyh 447 28
ADVERTISEMENT
  • #1 21828894
    johnnyh
    Level 2  
    TH01 BK7231N CHT8310 No temperature or humidity readout.

    Flashed OK without cutting any lines. I can access the IP address. I have tried several templates and Autoexec.bat files. The temp and humidity always say 0.00. I don't know where to go from here.
    AI: Which firmware (name, version, and source) did you flash onto the device?
    OBK, 1.18.248 from BK7231Flasher.
  • ADVERTISEMENT
  • #2 21829340
    p.kaczmarek2
    Moderator Smart Home
    Hey, can you provide some more information about your device? Some photos?

    Is it using TuyaMCU, or is sensor connected directly?

    Did you try to extract Tuya config?
    Helpful post? Buy me a coffee.
  • #4 21829432
    divadiow
    Level 38  
    that 4mb dump looks to be from a Quectel Matter device.

    Code: Text
    Log in, to see the code


    Code: Text
    Log in, to see the code
  • #6 21829734
    johnnyh
    Level 2  
    >>21829432

    How do I read these dumps? When I open the last one I uploaded, I just get unrecognisable signs.
  • #7 21829798
    divadiow
    Level 38  
    Tuya KV extraction is performed in this tab in Easy Flasher

    Screenshot of Easy UART Flasher Tuya extraction tab showing JSON baud 9600 and notes about missing pin data

    If it's a TuyaMCU device only the baud needed will be shown as there are no GPIO assignments
  • #8 21829805
    johnnyh
    Level 2  
    >>21829798
    Ah, I think it's too late then, as the original was deleted and written with the OBK firmware over the top. I must have extracted the original with the wrong baud rate (if that's possible); it just shows as bizarre characters.

    Any idea why I get no temp readings?

    Screenshot of OpenBK7231N web page showing 0.00°C temperature, 0.0% humidity, and channel value controls
  • ADVERTISEMENT
  • #10 21829810
    johnnyh
    Level 2  
    >>21829809

    I don't know why I didn't find that thread, I've searched a dozen times with TH01 etc.

    Anyway, thanks, I will follow through that one this evening.

    Added after 1 [minutes]:

    >>21829809

    Autoexec.bat: Just this at the moment:

    startDriver tuyaMCU
    startDriver tmSensor
    linkTuyaMCUOutputToChannel 1 val 1
    setChannelType 1 Temperature_Div10
    linkTuyaMCUOutputToChannel 2 val 2
    setChannelType 2 Humidity
  • #11 21829818
    divadiow
    Level 38  
    yes, there are quite a few TH01 variations, some with TuyaMCU, some without. Could do with a TH0x library with pics and known-good autoexec.bat, if theyre TuyaMCU.
  • ADVERTISEMENT
  • #12 21830005
    johnnyh
    Level 2  
    Just going through that thread now, and looks like a different board layout, and mine's 2 years newer (or at least bought 2 years later), so might be quite a bit different. I said it was CHT3810 only because that's what's printed on the board and TH01 as that's what's printed on the box, but having said that, whilst checking the board with a magnifier, I see that the model is actually ZY-TH02-CB3S_V.1.0

    So do people normally just keep trying different configs and files until they hit something that works, or is there a process to home in on the right files and configs? I'm pretty new to this so if there is a methodical process that would save time, I'm all ears, as they say.

    I'll do a search for the TH02 model.

    Added after 1 [hours]:

    I haven't got what it takes to photograph tiny components but this sensor has S M L and EBPT on it.
    View through a magnifying glass of a green PCB with wires; a laptop keyboard in the background.
  • #13 21831040
    johnnyh
    Level 2  
    I've been trying different templates and now got temp of 125 and humidity of 119%... Is it just a case of trying anything and everything, or are there some rules to help find the right pins?
  • #14 21831053
    divadiow
    Level 38  
    try with tuyaMcu_defWiFiState 4 after startdriver tmsensor
  • #15 21831062
    johnnyh
    Level 2  
    Still got the same numbers showing.

    My autoexec is now:

    startDriver TuyaMCU
    startDriver tmSensor
    tuyaMcu_defWiFiState 4
    setChannelType 1 temperature_div10
    linkTuyaMCUOutputToChannel 1 val 1
    setChannelType 2 Humidity
    linkTuyaMCUOutputToChannel 2 val 2
  • #16 21831198
    divadiow
    Level 38  
    try

    Code: Text
    Log in, to see the code
  • #17 21831734
    johnnyh
    Level 2  
    Thanks, I tried it, but still got 120% and 119%; however, for a moment the temp looked normal around 25 °C, but when I refreshed after a bit of faffing it was back to the usual.
  • #18 21831745
    p.kaczmarek2
    Moderator Smart Home
    If you have valid dpIDs, but they have different multiplier than ones supported by OBK, you can specify extra multipler/divider while linking channels.
    
    linkTuyaMCUOutputToChannel [dpId][varType][channelID][obkFlags-Optional][mult-optional][bInverse-Optional][delta-Optional][delta2][delta3]
    


    Added after 32 [seconds]:

    The main queston now is, do you have valid dpIDs, and you just want to scale their values, or is something wrong going on?
    Helpful post? Buy me a coffee.
  • #19 21831759
    johnnyh
    Level 2  
    I don't think it can be corrected by multiplying/dividing, at least not by 10.

    The sensor is in a heated room, so we could be expecting 200 or even 250, but not 120.
  • #20 21831816
    p.kaczmarek2
    Moderator Smart Home
    With linkTuyaMCUOutputToChannel , you can specify any divider, also 2 (I saw this in few devices), and also an offset.
    Helpful post? Buy me a coffee.
  • #21 21831827
    divadiow
    Level 38  
    well these are the dpIDs from Tuya after pairing your backup file and using product key x3o8epevyeo3z3oa

    Code: JSON
    Log in, to see the code


    dpIDs 27, 46 and 101 are where the test autoexec.bat came from
  • #22 21831854
    johnnyh
    Level 2  
    Also the reading doesn't change, so I'm guessing it's not an actual temperature reading. Divadiow, are those definitely the correct channels then? What else could be wrong?
  • #23 21831858
    divadiow
    Level 38  
    I *think* they are. I did what I usually do with a backup to get them. I can't recall if tuyaMcu_defWiFiState 4 is always required, so maybe add that, as in previous autoexec.bat
  • ADVERTISEMENT
  • #24 21831865
    johnnyh
    Level 2  
    After playing about with the thing, holding my finger on the sensor and on the chip, I often get plausible readings. It seems to be working at least for now, although if anything it may be a faulty product.
    However, in the screenshot the top part shows the correct readings, but below that CHT8305 TEMPERATURE stays at 120.00, and Humidity also stays "wrong" at 119%.
    Screenshot of a web dashboard showing 23.7°C and 41%, but CHT8305 reads 120.00 and 119%, battery 0%
  • #25 21831867
    divadiow
    Level 38  
    oh. you have start-up commands too? only TuyaMCU and tmsensor should be running. The other drivers are for non-TuyaMCU devices. Clear startup command and use autoexec.bat only?
  • #26 21831881
    johnnyh
    Level 2  
    Deleted startup commands. Things have changed, but still got some weirdness going on.
  • #27 21832023
    p.kaczmarek2
    Moderator Smart Home
    CH83XX driver should not be run. It may overwrite your channels with bogus data.
    Helpful post? Buy me a coffee.
  • #28 21832038
    johnnyh
    Level 2  
    I don't think I've got that. I've got no startup commands now and the Autoexec.bat doesn't mention CHT83XX driver — only TuyaMCU and tmSensor drivers.

    Edit: No, but yeah! There it is: "4 drivers active... CHT83XX..."

    Where is the thing that makes that happen? The template?

    I can't see where it's activated, and I have other issues with wifi etc. so maybe this will be the fix. Otherwise, it's working at least for temperature and I don't care about humidity. So how do I turn this driver off ?

    Much appreciated, all your help, by the way.
  • #29 21833622
    johnnyh
    Level 2  
    I did a hard reset from the Tools menu and I no longer have the CHT83XX driver running.
    Autoexec is:
    startDriver TuyaMCU
    startDriver tmSensor
    
    // DPID 27: temperature
    setChannelType 1 temperature_div10
    setChannelLabel 1 Temperature
    linkTuyaMCUOutputToChannel 27 val 1
    
    // DPID 46: humidity
    setChannelType 2 Humidity
    setChannelLabel 2 Humidity
    linkTuyaMCUOutputToChannel 46 val 2
    
    // DPID 101: battery_state enum: low(0), middle(1), high(2)
    setChannelType 3 ReadOnlyLowMidHigh
    setChannelLabel 3 Battery
    linkTuyaMCUOutputToChannel 101 enum 3
    


    Please advise which template to upload?

    What's weird is that the config_pins page is "blank", as in no pins are selected or assigned, yet it publishes temp and humidity data.

Topic summary

A TH01 temperature and humidity sensor based on the BK7231N chip with a CHT8310 sensor shows 0.00 readings for both parameters after flashing firmware OBK version 1.18.248 using BK7231Flasher. The device is accessible via IP, and multiple templates and Autoexec.bat configurations have been tested without success. The sensor is likely a Tuya MCU-based module purchased from AliExpress. Diagnostic output suggests the firmware dump resembles that of a Quectel Matter device, with logs indicating OTA package initialization and app verification failure, hinting at possible firmware compatibility or configuration issues. Further information about the sensor connection method (direct or via TuyaMCU) and extraction of Tuya configuration was requested to diagnose the problem.
Summary generated by the language model.
ADVERTISEMENT