logo elektroda
logo elektroda
X
logo elektroda

[BK7231N CBU] Generic Temperature and Humidity Sensor

Chasbrot 55317 359
ADVERTISEMENT
  • #301 21102222
    p.kaczmarek2
    Moderator Smart Home
    Nice find, I've added dumping of those new pins to Flasher, but I am not sure how to setup the IOR roles for them. What is alt pin?
    https://github.com/openshwprojects/BK7231GUIF...mmit/4cfca3d80e8d409388abff4872a29af6db1f606d
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #302 21102258
    divadiow
    Level 35  
    >>21102222

    cool

    not sure about alt pin. I don't see it anywhere but in reference to these temp/hum devices. eg https://github.com/search?q=repo%3Atuya-cloud...cloudcutter.github.io%20alt_pin_pin&type=code

    Added after 17 [minutes]:

    Tuya know this new model as "WIFI-TH-2023 8" fyi. fw ver 1.1.27

    Added after 35 [minutes]:

    Actually, is it that alert pin in the CHT sensors mentioned recently in another thread. https://www.elektroda.com/rtvforum/topic4052685.html#21094192
  • #304 21105282
    divadiow
    Level 35  
    @insmod

    Document excerpt about chip identification with Sensylink logo.

    The purpose of the Identification ID is to distinguish between different types of chips;
    The Identification ID register(0xFF) value for the CHT8315 is 8315.
  • #305 21106723
    divadiow
    Level 35  
    @insmod @artin961

    fearing I was not verbose enough in my original query, here is an update with corrected IDs

    Screenshot of an email about Sensylink's CHT8315 sensor support.

    Added after 1 [minutes]:

    and so
    Code: Text
    Log in, to see the code
  • #306 21106732
    p.kaczmarek2
    Moderator Smart Home
    Interesting, but didn't someone else here stated that some sensors have multiple IDs? Or was it incorrect?
    Helpful post? Buy me a coffee.
  • #308 21106851
    insmod
    Level 25  
    Test for 8315
    As for 8310, 0x8215 afaik is default value after sensor reset.
    I haven't found a 8315 datasheet with formulas or registers description, so this version will use 8310 formulas, instead of default 8305 ones.
  • #309 21106861
    divadiow
    Level 35  
    thanks. sadly I do not have CHT8315 device yet. @pipelkrsk is the only one on the forum that's mentioned it paired with BK I think. This mention has it on BL602 https://www.elektroda.com/rtvforum/topic4039068.html#21014962

    Added after 47 [minutes]:

    insmod wrote:
    I haven't found a 8315 datasheet with formulas or registers description


    I requested latest revision of each
  • #310 21107198
    pipelkrsk
    Level 3  
    >>21106861
    Yes, I have exactly BK7231N+CHT8315.
    >>21106851
    I can try to change something in it. But I don't understand what to do with OpenBK7231N_App_1.0.0.0.rbl. Where do I put it?
  • ADVERTISEMENT
  • #311 21107220
    divadiow
    Level 35  
    pipelkrsk wrote:
    But I don't understand what to do with OpenBK7231N_App_1.0.0.0.rbl. Where do I put it?

    OpenBK7231N control panel with diagnostic information.
  • #312 21108522
    pipelkrsk
    Level 3  
    >>21107220
    Thanks, it's working. It's showing data within the normal range.
  • ADVERTISEMENT
  • #313 21110781
    divadiow
    Level 35  
    p.kaczmarek2 wrote:
    I am not sure how to setup the IOR roles for them


    does this mean what to assign them as on import?

    I guess the i2c ones could default map to soft SDA/SCL so the user can go straight into using
    Code: Text
    Log in, to see the code

    if for some reason theyre not able to determine the i2c device from previous posts or a close-up image of component?

    Added after 1 [minutes]:

    or even just so they immediately see while in the module config page which need swapping for real driver
  • #314 21224375
    zdenekphilipp
    Level 4  
    Hi guys,
    I have new device with chip 8315. It is connected to scl PIN no 9 (23), sda no PIN8 (24).
    OTA OpenBK7231N_App_1.0.0.rbl

    My config is:
    "pins": {
    "20": "dInput_n;6;0",
    "23": "CHT83XX_SCK;0;0",
    "24": "CHT83XX_SDA;1;2",
    "26": "WifiLED;1"
    },

    autoexec.bat is
    startDriver CHT83xx

    I receive
    Info:SENSOR:DRV_CHT83XX_ReadEnv: Temperature:125.000000C Humidity:100.000000%

    Do you have any advice?

    Added after 45 [minutes]:

    >>21224375 My fault. Bad config. Sorry
  • #315 21231566
    p.kaczmarek2
    Moderator Smart Home
    I think we may need to test and integrate this feature for battery-powered sensors:
    https://github.com/openshwprojects/OpenBK7231T_App/pull/1297
    This should speed up WiFi connection and save some battery.
    Helpful post? Buy me a coffee.
  • #316 21231690
    zubekpiotr
    Level 2  
    Thank you for your great work! I would like to ask about the estimated battery life of this device with OpenBeken. My assumption is to operate on 2 AAA alkaline batteries with a measurement and transmission frequency of 1/hour for at least 6 months. Is this possible with OpenBeken.
  • #318 21261277
    we33
    Level 1  
    DeDaMrAz wrote:
    here is a schematic
    Electrical schematic diagram with various components.


    but on my board:

    RS2 not 100 kOhm - marking "87c" (correct 78.7 kOhm), and connect to +Batt (not +3v3)
    RS1/RS2+C4 it's a Fuel Gauges Battery measurement
    C4 - N.C.

    ic U1 (sot23-5) marking H30F
    in your schematic wrote "me2108d33p", but me2108 haven't synchronous rectifier and need outside/external diode (between pin 2&5 )
    me2108D need external switch transistor
    me2108d33P it's sot89 (correct me2108c33m5)

    L0 - bypass U1 (N.C.)

    diode D1 reverse polarity and connect via RS0 (not R3)
    R3 R4 - pull up (2x10kOhm to +3v3) for i2c bus (U2,U3,U4)

    ISP pads:
    R - 16 (rx1)
    T - 15 (tx1)
    G - 13 (ground/common)
    V - 14 (+3v3)
    SWS - 4 (P22)
    RST - 18 (CEN)

    outputs Hall-sensors H2 (via inverter Q3) and H1 connect to "alert's in" P16
  • #319 21282158
    martinassistantking
    Level 1  
    Thanks for all the contributions, friends, and for your time invested in the subject. I read you a lot, but this is the first time I dare to comment... impostor syndrome :p
    First of all, I would like to say that I have reached several personal convictions, in case it is of any use to anyone. I insist, these are just personal speculations :)
    Taking into account that I have even bought lithium AAA batteries. The device seems amazing in terms of quality and price, but I do not see the battery system as feasible, for several reasons, including sustainability and comfort for me.
    I need to do without batteries, that is, I do not want battery warnings, or data on hass percentages, or pay so many tolls to save myself the wiring that has taken me less time. I powered the devices on their 3.3V line, skipping the IC U1 (ME2108D33). Since it is a Step-up DC/DC converter that is closer to the SHT3x sensor, which I believe helps regulate the temperature altered by it. And I killed several birds with one stone.
    -There are some mini power supplies the size of half an appliance like this, which fits perfectly into the electrical installation junction box. And I have grouped several thermostats of this type to each transformer (3v3 1A), 3 or 4 max. to have 250ma each, more than enough...
    No headaches with sleep mode or energy saving for batteries, since these do not exist. Enough that I saved myself by not having to buy thermostats for use with a screen for each room. Since I cannot have 20 screens at home, nor 40 percentage units in hass, nor change 2 battery packs monthly. This is not progress xD.
    If it helps someone, I am very happy.
    Personal thermostats with Openbeken (Tasmota) that do not send data to any server, for 4 euros, have allowed me to delete data in hass (percentages and battery warnings), I have regulated the temperature of the thermostats, by not making the thermostat voltage booster raise the 3v of the batteries, and being able to remove some room thermostat screens, which seemed excessive to me. In the end I save energy. And all in exchange for a bit of work wiring from the source (230V AC/3.3V DC 1A) in the register boxes to each of the thermostats. Some, like where the brain of the house is, having a raspy, I took the 3v3 from it. And in the case of rooms with some ESP like the fireplace, well T&H extracted by BME sensor managed with the same ESP, which is more comfortable in jaml than all this mess. Sorry for all the text, but the review needed some development...
    Thank you for the work you provided for my tests. :) Regards.
  • #321 21311590
    divadiow
    Level 35  
    I don't recall the original route in but I have replied to their June email requesting the advanced datasheet for CHT832X
  • ADVERTISEMENT
  • #324 21311602
    Pinni3
    Level 5  
    >>21311597 Tnx would be nice if you post the positive reply from them.
  • #326 21326841
    PC-maniak
    Level 8  
    Hi, please advise.. is it possible to rename mqtt "channel/topic" I'm new to using OpenBK and I can't find it anywhere.. for the battery it is named automatically.. but for humidity and temperature it is not.. I see the channel numbers .. 0-> humidity and 2 is temp

    BK7231N - CHT8315
    OBK ver. : 1.17.780

    mqtt explorer :
    BK7231N_xxxx
    0 = 50 (humidity %)
    2 = 227 (temp 22.7c)
    voltage = 332 (0.332v <- I power it externally .. it shows correctly for the battery)
    battery = 0 (0%)

    to clarify, I will not use the home assistant .. I have other plans with it and renaming the channels would help me a lot

    thank you very much for the information.. and I apologize if I'm putting this in the wrong category =(
  • #328 21329561
    PC-maniak
    Level 8  
    >>21329545
    DeDaMrAz wrote:
    You are correct, it was a hastily reversed to show the inners (so that is my excuse at least )


    Hey nothing happened =) I then noticed that someone had already pointed out that it was different, even different RS2 value (I also have 78.7K) so I deleted the answer :D I didn't expect you to have time to answer
  • #329 21329585
    DeDaMrAz
    Level 20  
    @PC-maniak

    All good, different devices have different resistor dividers but the overall idea is there and the main thing is that you got the gist of the device schematics.
  • #330 21333063
    PC-maniak
    Level 8  
    Hi, is it possible to send mqtt messages in json format?
    example :
    {
    "room":"blach",
    "temp":22,
    "hum":55,
    "time":timestamp,
    }

Topic summary

The discussion centers on a generic WiFi temperature and humidity sensor based on the BK7231N CBU module with an SHT30 DIAS7M sensor, purchased from AliExpress. Key technical challenges include implementing effective power-saving strategies, particularly deep sleep modes, to extend battery life in this battery-powered device. Contributors explored the device's pinout, I2C communication (notably software I2C on pins P7 and P8), and firmware modifications using the OpenBeken SDK. Deep sleep implementation on BK7231N shows partial success: the device enters deep sleep and reboots after a set time but may reboot unexpectedly or cause boot loops if deep sleep is triggered too early in the startup script. PowerSave commands reduce power consumption but are insufficient alone; deep sleep with wake-up via GPIO or timer is essential. Battery voltage measurement and reporting were added, with calibration and percentage calculations to monitor battery health and trigger alerts on low voltage. The SHT30 sensor driver was enhanced with commands for calibration, single and periodic measurements, heater control, and alert modes that can wake the device from pindeepsleep. Scripts for automated measurement, battery management, and deep sleep cycles were developed and refined. Issues with script execution timing, startup command behavior, and SDK differences between BK7231N (N) and BK7231T (T) platforms were discussed. GPIO wake-up works on BK7231T but was initially unavailable on BK7231N until recent SDK updates. The MOSFET on the board likely provides reverse polarity protection. Integration with Home Assistant and Tasmota Control via MQTT and JSON was addressed, including sensor data formatting and auto-discovery. Challenges remain with battery-induced firmware corruption below 2V, requiring UART reflashing. Relay-based devices using CB2S boards with BK7231N were also discussed, highlighting pin assignment constraints and I2C communication issues. Overall, the community is actively developing firmware and scripts to enable local control, power optimization, and reliable sensor data reporting for these generic BK7231N-based temperature and humidity sensors.
Summary generated by the language model.
ADVERTISEMENT