logo elektroda
logo elektroda
X
logo elektroda

[BK7231N CBU] Generic Temperature and Humidity Sensor

Chasbrot 54003 359
ADVERTISEMENT
  • ADVERTISEMENT
  • #332 21365423
    SawekSenior
    Level 9  
    CBU temperature sensor - sorry for probably a simple question, but I can't manage to RESET the WiFi network - the sensor remembered the old router and I can't pair it with the new one for nothing.
    It only has a button next to the batteries, pressing it triggers the pairing, but like a faithful husband it only pairs with one......... I mean with the old router - pairing ok. further everything ok. with the new ones (3 different networks ) it sees, adds the equipment, at the end it informs me that it failed to attach the device. The pin hole in the casing is there, but the pin does not press anything - please help - greetings Slawek

    Added after 8 [minutes]:

    I tried 2 ways :
    I
    Remove the cover and remove the battery.
    Use the tool to reset the reset button and reinsert the battery until the LED lights up blue.
    Release the button and close the cover again.

    II
    Disconnect the sensor and turn it over.
    Press the switch on the top right 4 times and hold it down on the fourth press.
    The LED will light up and then go out after 3 seconds.
    Release the switch.
    The LED will start flashing to indicate a successful reset.

    Unfortunately without success.
  • #333 21365439
    p.kaczmarek2
    Moderator Smart Home
    Try in the Tuya app to first remove this sensor from your devices, select "Remove and wipe data", then cleanly pair as desired
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #334 21365450
    SawekSenior
    Level 9  
    In the app I told it to remove the sensor along with the data - from the app it disappeared, but when pointing it to another network it does not attach the device - unfortunately.
  • ADVERTISEMENT
  • #335 21365474
    p.kaczmarek2
    Moderator Smart Home
    But now it's no longer in the app, so it doesn't show up on the old WiFi either (in the DHCP client list)?

    Maybe the batteries are too weak?
    Helpful post? Buy me a coffee.
  • #336 21365482
    SawekSenior
    Level 9  
    Network inspection only shows:
    Strepeater
    and my computer

    Added after 4 [minutes]:

    The sensor was connected to a network amplifier that had a different ssid than the router it was amplifying, now I have moved the sensor closer to the router , but it no longer wants to connect to it and the amplifier already has a weak signal.

    Added after 25 [minutes]: .

    When I pair it with an "old router" - I mean amplifier, it's like this Screenshot from ESET Internet Security tool showing network inspection.
  • #338 21389134
    @GUTEK@
    Level 31  
    Hello.
    There is a problem with the new version of OpenBK. As usual when replacing the battery I updated the module to a new fw version, currently it is 1.18.19 and after this update my SHT30 is not working. It doesn't show up on the home page and I have values of 0. I didn't change anything else after the update, the pin configuration is correct, just to be sure, once again I selected this thermometer model in the WebApp from the list and saved the settings.

    By downgrading the software version I discovered that the problem started with version 1.18.12, the earlier 1.18.11 works fine.

    Screenshot of BK7231N module settings and electronics board view. .
    Screenshot of the OpenBK thermometer interface showing SHT3X parameters and device status. .
    Screenshot of the termometr_openbk_2 interface showing battery settings and connection status. .
  • #339 21389176
    p.kaczmarek2
    Moderator Smart Home
    As far as I can see SHT30 has recently been disabled in the official builds, but no problem, I can restore it today.

    It's just that with the addition of drivers we have a growing problem with flash memory and it's looking more and more likely that we'll have to have separate binaries, e.g. one for sensors and one for power measurement.
    Helpful post? Buy me a coffee.
  • #340 21389358
    @GUTEK@
    Level 31  
    Ok, that is clarified.
    Then maybe do some weekend or even monthly versions for specific use. I think Tasmota has versions divided up like that. And let the versions that are every couple of hours come out unchanged.
    Including SHT30 won't help too much, because someone else will immediately have the same problem with a different sensor. And it's unlikely anyone will bother to manually compile a version with support for whatever they happen to need.
  • #341 21389448
    sns1
    Level 5  
    Hi,

    Since this thread seems to be regarding CHT83xx sensors as well, could I ask on possible resolution on the following device:
    It's a Tuya newer temp/hum sensor which is BK7321N coupled with CHT8315 sensor. I've traced SDA to pin 9 (physical 24) and SKC (SCL) to pin 8 (physical 23).
    Not scani2c Soft nor CHT83xx driver works. I've found that SCL line is silent while SDA has commands (using logic analyzer). What could be a solution? Is pin 8 could not being used for some reason?
    I've thought that pullup resistor be broken, but seems to be perfect. I could only think of a defective pin, since this particular sensor has never been used (flashed bekken right out of the box).
  • #342 21389801
    p.kaczmarek2
    Moderator Smart Home
    Maybe first try with LED and GPIODoctor to see if LED (with resistor) on this pin works?
    Helpful post? Buy me a coffee.
  • #343 21390738
    sns1
    Level 5  
    >>21389801
    I'm sorry big time. Was looking at different pinout (T34), got wrong pins... P7 scl, P8 sda. Seems to be working though a bit off values (+2 C, -7 hum... in reference to a different tuya sensor...).
  • ADVERTISEMENT
  • #344 21392543
    sns1
    Level 5  
    >>21390738
    Finally seems to be working ok.
    Here's a picture of the device (BK7321N + CHT8315):

    Temperature and humidity sensor device and its packaging.

    Here's config and autoexec
    Spoiler:

    pins
    
     "pins": {
        "7": "CHT83XX_SCK;0",
        "8": "CHT83XX_SDA;2",
        "16": "dInput;8",
        "17": "BAT_Relay;5",
        "20": "Btn;6",
        "23": "BAT_ADC;4",
        "26": "WifiLED;0"
      },

    autoexec
    
    PowerSave 1
    startDriver NTP
    startDriver Battery
    startDriver CHT83XX
    
    addEventHandler OnHold 20 SafeMode
    addEventHandler OnClick 20 delay_s 600
    DSEdge 0
    
    
    waitFor WiFiState 4
    Battery_Setup 2500 3200 2.29 2400 4096
    battery_measure
    
    publishAll
    delay_s 10
    
    PinDeepSleep 900
    


    Device seems to be working ok and measurements seems to be valid. I've noticed while testing thath CHT sensor is prone to heating itself as if it works continuously it shows higher temp (might be not exactly CHT problem but whole pcb heating, but anyway), so, if on DeepSleep - it shows realistic values.
    Another quirk I didn't manage to work out - how to make it, say, wait a minute on button press before going to sleep - for reconfig/flashing procedure if such is needed. Autoexec line for delay does not work as expected...
  • #345 21392637
    @GUTEK@
    Level 31  
    It is rather the Beken chip itself that heats up and this heats up the whole board. I have the same thing with the thermometer from the topic on the SHT30. Fortunately, putting it to sleep and waking it up for a while does not affect the falsification of the reading by heating.

    As for the configuration changes, I have dealt with it in a different way. It is a bit tedious, but it is also not done often.
    While holding down the reset button, I insert the battery. Then the software starts in safemode. I go into configuration and command execution and execute lfs_format. This deletes the autoexec, then I click exit safemode and restart. Then the firmware boots normally and you can poke around.
    By the way, I have such entries in autoexec as in this topic: https://www.elektroda.pl/rtvforum/topic4025593.html
  • #346 21392806
    sns1
    Level 5  
    >>21392637
    Putting device in safemode works with OnHold button function, but I have to connect it to the pc afterwards...
  • #347 21392999
    @GUTEK@
    Level 31  
    With safemode running in hotspot mode, you can connect from your phone and go to the 192.168.4.1 configuration page and run the command.

    Such a curiosity, I checked what is heating up, the sensor itself is cold, the heat goes from the Beken chip:

    Thermal image of an electronic circuit with two temperature readings. .
  • #348 21393091
    p.kaczmarek2
    Moderator Smart Home
    And can you compare PowerSave 1 and without?
    Helpful post? Buy me a coffee.
  • #349 21393364
    sns1
    Level 5  
    >>21392999
    @GUTEK@ wrote:
    With safemode running in hotspot mode, you can connect from your phone and go to the 192.168.4.1 configuration page and run the command.

    Thank You for clarification - documentation did not state this except for "no drivers loaded" so I assumed that wifi will not fire up as well.
  • #350 21394158
    sns1
    Level 5  
    Hi,

    May be noob question, nut how do I provide MQTT CliendID?
    I have converted two identical sensors to OpenBekken, given them different names but now I see that values coming from one device are populating second one and vice versa... Mqtt broker seems to be differentiating devices (connected auto-xxxxxxxx with different identifiers) but the result is that it is mirrored....
  • #351 21394165
    p.kaczmarek2
    Moderator Smart Home
    You can do this in Configure Names tab I think.
    Helpful post? Buy me a coffee.
  • #352 21394200
    sns1
    Level 5  
    p.kaczmarek2 wrote:
    You can do this in Configure Names tab I think.

    Looks like it "primary topic" from MQTT configuration page....

    Log from mosquito broker, I've just set primary topic to homeassistant....
    
    2025-01-15 17:55:44: New client connected from 192.168.1.86:59749 as homeassistant (p2, c1, k100, u'tuya').
    
  • #353 21394522
    @GUTEK@
    Level 31  
    p.kaczmarek2 wrote:
    And can you compare PowerSave 1 and without?
    .
    Here's the thing:
    - measurements after 5min of operation

    without PowerSave:

    Thermal image showing an electronic board with a marked temperature of 36.7°C. .

    with PowerSave 1 in the autostart:

    Thermal image of an electronic board with a marked temperature of 23.2°C. .
  • #355 21524762
    @GUTEK@
    Level 31  
    Hi, could someone compile me the current version of OpenBK (with added fast wifi connection) under this thermometer.
    Unfortunately the official releases have the SHT3x driver cut out above version 1.18.11.
  • #357 21539716
    cobakind
    Level 2  
    >>21524762 Hi! Have you tried flashing with my firmware? Could you post your pin configuration and autoexec.bat? My battery drains very quickly, in 2-3 days (((
  • #359 21547925
    sevastianovv
    Level 5  
    Good afternoon. How can I change the data being sent to mqtt? The temperature comes in at 236 and it should be 23.6
  • #360 21548074
    cobakind
    Level 2  
    >>21547925 I think you need to configure "Channel Types" in the Web application, there is a type Temperature_div10

Topic summary

The discussion revolves around the BK7231N CBU temperature and humidity sensor, particularly focusing on its integration with OpenBeken firmware. Users share experiences regarding the sensor's performance, battery life, and configuration challenges. Key topics include the effectiveness of deep sleep modes for power saving, the calibration of the SHT30 sensor, and the impact of various configurations on battery consumption. Users also discuss issues with incorrect temperature readings, the need for proper GPIO assignments, and the potential for using alternative sensors. Several users report successful modifications and share their autoexec.bat scripts for optimal operation. The conversation highlights the importance of correct pin configurations and the challenges faced when using low-quality batteries.
Summary generated by the language model.
ADVERTISEMENT