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.
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.
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
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.
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.
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.
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).
>>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...).
Working BK7231N CBU config with CHT8315 and deep sleep
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...
Beken chip self-heating skews temperature readings
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
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....
>>21392543 I suffered the same issue regarding self heating and made a autoexec.bat that might be helpful for you, take a look at https://www.elektroda.com/rtvforum/topic4098816.html, in particular to the latest version of the autoexec
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.
Hi! I have a sensor on the same chip as yours. Today I assembled it from the latest release 1.18.92 with SHT3x driver support. Updated via OTA update, the sensor works.
Attachments:
OpenBK7231N_dev_20250421_172856.zip(491.51 KB)
You must be logged in to download this attachment.
>>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 (((
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. AI summary based on the discussion. May contain errors.
Why it matters: Proper scripting turns a one-week gadget into a months-long sensor.
Quick Facts
• MCU: Beken BK7231N CBU module, 3.3 V core, Wi-Fi b/g/n [Elektroda, p.kaczmarek2, post #20362193]
• Temp/Humidity chips: SHT30 or CHT8310/8315, I²C @ 100 kHz [Sensirion, 2023]
• Battery range: 2.0 – 3.0 V (two AAA) [Elektroda, user_param_key dump]
• DeepSleep current: ≈ 6 µA; active Wi-Fi current: ≈ 70 mA [Elektroda, dheenhasty, post #20393117]
• Typical script wake-time: 8–12 s, 15-min cycle ⇒ ~1 % duty-cycle power use.
How do I wire the UART for flashing?
Solder TX2 to the test pad marked TP2, RX2 to TP1 (labels on some boards are reversed), plus 3.3 V and GND. Pull CEN low during power-up to enter boot mode, then use BK7231 Flasher at 921 600 baud [Elektroda, sirhcsat, post #20905587]
Which GPIOs are used by the Wi-Fi-only SHT30 board?
Those values appear when the I²C pins or driver don’t match the chip. Select CHT8305 roles if your board carries CHT8310/8315 instead of SHT30 [Elektroda, sirhcsat, post #20905846]
Why does the device sometimes brick after a flat battery?
Dropping below 2 V can corrupt the RF/flash area; the module then boots with constant 2 mA draw and no AP [Elektroda, Xinayder, post #20886949] Re-flash RF partition or do a full "Erase All" to recover.
How can I stop endless waiting for MQTT when broker is offline?
Add a guard timer: addRepeatingEventID 30 1 999 DeepSleep 900 before waitFor MQTTState 1; if MQTT is still down after 30 s the sensor sleeps for 15 min [Elektroda, erdeidominik1999, post #20792052]
What script gives longest battery life?
1 ) enable PowerSave. 2 ) measure once, publish, sleep: startDriver SHT3X → waitFor MQTTState 1 → SHT_Measure → publishChannels → DeepSleep 900. 3 ) Use flag 37 for quick Wi-Fi connect. Users report >30 days on AAA with a 15-min cycle [Elektroda, dheenhasty, post #20456982]
Edge case: device stays awake 60 s instead of 10 s
mqtt_broadcastInterval left at 1 s sends five retained topics, stretching awake time. Set it to 60 s or disable extra broadcasts to avoid triple publishes [Elektroda, Xinayder, post #20882846]
Can I combine a door switch and temperature on one PCB?
Yes. Add an SHT30 to the unused P7/P8 lines of the door-sensor board. Door events will wake the MCU, publish temp/RH, then DeepSleep. Expect one extra MQTT burst per open/close [Elektroda, p.kaczmarek2, post #20906906]
How do I calibrate the SHT30?
Run SHT_Calibrate <TempOffset> <RHOffset> once in autoexec, e.g. SHT_Calibrate -2.4 3 lowers reported temperature by 2.4 °C and raises humidity by 3 % RH [Elektroda, dheenhasty, post #20458926]
Hold CEN low, power the board at 3.3 V. 2. Use BK7231 Flasher, select BK7231N, click Erase All then Write OpenBK. 3. Release CEN and reboot; connect to the OBK_XXXX AP.
How to round sensor output to two decimals?
Set channel type to temperature_div10 for 0.1 °C granularity or divide in publish: publishFloat temp $CH2/10. OBK trims trailing zeros from JSON [Elektroda, p.kaczmarek2, post #20458933]