logo elektroda
logo elektroda
X
logo elektroda

Integrating BME280 Sensor with OpenBK on WB2S Modules for Home Automation

bilbs84 7452 75
Best answers

Can I use a BME280 sensor with OpenBK on a WB2S module over software I2C, and how do I configure the pins, address, and Home Assistant publishing?

Yes — OpenBK can drive a BME280 on a WB2S using the BMP280/BMPI2C software-I2C driver, and the later BMPI2C version adds temperature, pressure, and humidity support [#20862222][#21123022] Use the `startDriver` command with your GPIOs and channel numbers; examples from the thread were `startDriver BMP280 [CLK] [DATA] [TempChan] [PressureChan]` and later `startDriver BMPI2C [CLK] [DATA] [Temp] [Pressure] [Humidity] [Addr]` [#20862067][#21123022] A working BME280 setup on a WB2S used `P7` as SDA and `P8` as SCL, with the sensor address set to `0x76` [#21112840] For Home Assistant, you can use channel types like `Temp_div100` and `Pressure_div100`, or publish manually with `publishFloat`; MQTT still carries the raw integer value unless you apply the divider/publish logic yourself [#20862313][#21013338] One important caveat is that the BME280 temperature reading is the chip’s internal temperature, so it can read a few degrees high and may need an offset calibration if you want it to represent room temperature [#20862559][#20862569]
Generated by the language model.
ADVERTISEMENT
  • #1 20860257
    bilbs84
    Level 2  
    Posts: 14
    Rate: 1

    Hi.

    I'm fairly new to the open Beken project, and since discovering it, I have been finding ways to use all my old WB2S modules that I'd replaced in a heap of my devices.

    I was wondering if it's possible to use one of my BME280 sensors with Beken to create a few temperature sensors that I can incorporate into my automations.

    I've had a look and can't seem to find any examples of it, and I know there are other sensors already supported, but I have a few of these BME280's and would like to use them if possible.

    I'm aware that there is software-defined I2C in Beken, but wouldn't have the slightest clue where to start with that.

    Any help would be greatly appreciated. Thanks.
  • ADVERTISEMENT
  • #2 20860932
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14615
    Help: 655
    Rate: 12633
    That's a good idea. I have BMP280 sensor somewhere, I used it for this project:
    https://www.elektroda.pl/rtvforum/topic3961713.html#20467262
    I will see if I can port an existing driver to OBK for you. Do you know C?
    Helpful post? Buy me a coffee.
  • #3 20861133
    bilbs84
    Level 2  
    Posts: 14
    Rate: 1

    I know a little, enough to scrape by with a little searching anyway.
  • #4 20861222
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14615
    Help: 655
    Rate: 12633
    I've got it almost ready for you, here are first signs of life:
    Screenshot of system log showing I2C address: 0x76.
    And here is temperature read:
    Screenshot of temperature readings from the BMP280 sensor.
    I will try to commit it soon and let you test. Are your BMP280 (or E, they are similiar, right?) sensors ready?
    Helpful post? Buy me a coffee.
  • #5 20861554
    bilbs84
    Level 2  
    Posts: 14
    Rate: 1

    Yeah, it's all wired, and sitting ready. That's awesome that you have it nearly operational so quickly. I'd imagine that with the temp working, it shouldn't be any problem getting the humidity and pressure readings as well.
  • ADVERTISEMENT
  • #6 20861794
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14615
    Help: 655
    Rate: 12633
    Do you need to support multiple sensors on the single bus? I am asking because while the library port is already working, it's currently only linked in a static manner, so my test code handles one sensor per device.
    Helpful post? Buy me a coffee.
  • #7 20861877
    bilbs84
    Level 2  
    Posts: 14
    Rate: 1

    I only intend on using the one BME on each chip. I was having a look through your code earlier. Is it hard coded to specific pins on the device, or will it pick up whichever pins I have defined as Software I2C?

    I was in the process of building the latest commit with the driver included, but the clock ran out, and I had to leave for work.
  • #8 20861893
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14615
    Help: 655
    Rate: 12633
    I will make a build for you and attach it here, no problem. I still need to add the two or so lines of code allowing you to choose the GPIOs. Currently they are hardcoded.

    The same most likely will also apply to the I2C address of the sensor, as it may vary, right?
    Helpful post? Buy me a coffee.
  • #9 20861920
    bilbs84
    Level 2  
    Posts: 14
    Rate: 1

    This is a link to a website with the sensor I have (or close enough to mine for all other purposes):

    https://core-electronics.com.au/piicodev-atmospheric-sensor-bme280.html

    As you can see, the address can be selected between 0x77 or 0x76 (depending on a dip switch on the device I have, but with the ADDR line on other dev boards).

    I've used it for over a year with an ESP32, and it's actually quite a decent and reliable sensor.
  • ADVERTISEMENT
  • #10 20862018
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14615
    Help: 655
    Rate: 12633
    Ok, how would you like to process the measurements? Do you need to send them to Home Assistant via MQTT, or maybe would like to send them somewhere else, for instance via HTTP GET?
    Helpful post? Buy me a coffee.
  • #11 20862051
    bilbs84
    Level 2  
    Posts: 14
    Rate: 1

    For the time being, I'll be sending them to Home Assistant with MQTT. If I decide to implement the POST and GET routines that I used to use, then I can probably have HA handle that kind of thing.
  • #12 20862067
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14615
    Help: 655
    Rate: 12633
    I have added ability to choose pins for single BMP280 driver. I do not use IO roles enum because it's getting very long these days, so the setup now looks like this:
    
    // startDriver BMP280 8 14 1 2
    // startDriver BMP280 [CLK] [DATA] [ChannelForTemp] [ChannelForPressure]
    

    We will also need to check which adjustments we need for BME280 (if any). Futhermore, I will need to add a channel type, because currently our channels are integers (like in TuyaMCU) and we have channel types to specify the divisor to get fractional values. Still, OBK can prescale values before sending them to HA.
    Helpful post? Buy me a coffee.
  • #13 20862072
    bilbs84
    Level 2  
    Posts: 14
    Rate: 1

    p.kaczmarek2 wrote:

    We will also need to check which adjustments we need for BME280 (if any).


    From my research, the BME280 is backwards compatible, but obviously, for the humidity reading, there will need to be some addition to the driver to handle that.

    I'd also assume that it's not too difficult to be able to set the address in the driver start command (Although not too critical, I don't think too many people would have more than one I2C device running at a time)

    Added after 26 [minutes]:

    Info:SENSOR:BMP280_REG_CHIPID OK!
    Info:SENSOR:BMP280 ready!
    Info:CMD:[WebApp Cmd 'startDriver BMP280 24 11 1 2' Result] OK
    Info:SENSOR:T 2391, P 100185!
    Info:SENSOR:T 2400, P 100178!
    Info:SENSOR:T 2380, P 100140!


    So I have the temp and pressure readings working on my chip (Finally!!!)

    I was pulling my hair for a while, it kept giving an error about incorrect chip ID, eventually, I realized what was going on. The BME280 chip ID is 0x60, instead of the 0x58 of the BMP280.

    What library did you use to port the driver to that state that it's in? Is it an Arduino based one? That would make it fairly simple to analyze in order to add the humidity measurement in as well.

    For the moment, I'm just over the moon that even Temp and pressure work, and so quickly from my initial inquiry. So far, I'm very impressed with the OpenBK project, both in terms of support, development, and capability.
  • Helpful post
    #14 20862222
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14615
    Help: 655
    Rate: 12633
    Thank you for your kind words, the library I used is the same which I used in this topic: https://www.elektroda.pl/rtvforum/topic3961713.html#20467262 , it was originally for PIC but I ported it, it was created by https://simple-circuit.com/

    I am adding ability to choose address now, I also added ID detection:
    Code snippet for initializing the BMP280 sensor with ID detection.
    I will next ook into the humidity measurement.

    I will also need to rewrite that library anyway, because at the moment it's a bit too static for multiple sensors usage, but I can do that once we have BME fully working
    Helpful post? Buy me a coffee.
  • #15 20862268
    bilbs84
    Level 2  
    Posts: 14
    Rate: 1

    Thanks again for your help.

    I messed around with trying to implement the humidity measurement, however I wasn't able to fully understand how the driver reads from the correct registers. I'm also thinking that I had something messed up in the part that applies the transformation of the read value from the calibration data.

    I think the BMx280 is a great sensor, because of the inbuilt calibration data in each chip. It takes a lot of the guesswork out of things.

    One thing that I also don't quite understand is how to get it to publish the (currently) Temperature and Pressure readings to Home Assistant.

    Added after 22 [minutes]:

    bilbs84 wrote:
    One thing that I also don't quite understand is how to get it to publish the (currently) Temperature and Pressure readings to Home Assistant
    bilbs84 wrote:
    One thing that I also don't quite understand is how to get it to publish the (currently) Temperature and Pressure readings to Home Assistant.


    OK, so it has to do with the channel types. I can set the Temp to Temperature (Although, I think for this we either need a Temp_div100 or to alter the published value in the BMP280.h file so that it works with the current channel types. And is it easier to add Pressure as a new channel type, or can a custom channel type be defined manually?
  • #16 20862313
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14615
    Help: 655
    Rate: 12633
    Well, there many ways it can be done. You can wait for me to integrate BMP280 into HASS discovery. Or you can just set channel type (like Temp_div100) and use channel-type-based Discovery:



    If you are a more advanced user, or you just don't want to wait, you can script the publish yourself:
    
    publishFloat myTemp $CH1*0.01
    publishFloat myPress $CH2*0.1
    

    The above method will work without setting any channel types. Of course, you have to script it to, for example, run every 5 seconds or so, or on every change.
    
    addEventHandler OnChannelChange 1 publishFloat myTemp $CH1*0.01
    

    See more at:
    https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/autoexecExamples.md
    https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/commands.md
    but in case of manual publish, you would have to write YAML for Home Assistant to receive and process it

    We may also have floating point channels support (or flexible dividers) in the future, but currently we're following the TuyaMCU approach, that's why it may seem strange at first, but that's how TuyaMCU handles variables. In TuyaMCU thermometers, temperature is also stored as integer.
    Helpful post? Buy me a coffee.
  • #17 20862559
    Helmi_Beh
    Level 4  
    Posts: 6

    Folks, hope you've read the datasheet of the BME280: the temperature value is only for correcting the humidity and pressure values. This is only the chip temperature, which is 2 to 3 degrees higher than the surrounding temperature. So don't be astonished if the room temperature is much lower than the measured one!
  • ADVERTISEMENT
  • #18 20862569
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14615
    Help: 655
    Rate: 12633
    That's good point, I can add a simple calibration mechanism (just an offset) for people who insist on using that value
    Helpful post? Buy me a coffee.
  • #19 20863167
    bilbs84
    Level 2  
    Posts: 14
    Rate: 1

    Helmi_B wrote:
    Folks, hope you've read the datasheet of the BME280: the temperature value is only for correcting the humidity and pressure values.


    Wow, I'd never noticed that. I'd never even bothered to question the reading straight off the chip, as of all my IoT things, it's the one that reads closest to my home's thermostat. If I place the BME on top of it, I get a reading, usually within 1 degree of it. The BME280 that I have is actually sold as a temperature sensor, and the Datasheet also mentions that the temperature reading can also be used for estimating ambient temperature. So I figure that for my purposes, it's accurate enough.

    p.kaczmarek2 wrote:
    That's a good point, I can add a simple calibration mechanism (just an offset) for people who insist on using that value


    I think that's a good solution, kind of like the CHT8305 sensor that's in one of my devices.

    p.kaczmarek2 wrote:
    Well, there are many ways it can be done. You can wait for me to integrate BMP280 into HASS discovery. Or you can just set channel type (like Temp_div100) and use channel-type-based Discovery:


    My temporary workaround is to set the pressure channel type to Humidity so that both values are published to HA, then I apply the correct divider and measurement unit with a template sensor for dashboard display. Not the best way of doing it, I know, but at 3am, it was about the best that I could manage.

    With the rate of development on the OpenBK project in general, I suddenly find myself no longer looking past any devices with the WB2S modules like I used to.
  • #20 20864322
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14615
    Help: 655
    Rate: 12633
    Ok I have added pressure, but I only tested in simulator:
    Screenshot of a control panel with device information and logbook.
    Screenshot of the OpenBeken simulator showing the connection schematic of LEDs and controller.
    Screenshot of device pin settings and channel types with Pressure_div100 entry highlighted.
    I will commit changes now, let me know if it works for you
    Helpful post? Buy me a coffee.
  • #21 20864417
    bilbs84
    Level 2  
    Posts: 14
    Rate: 1

    I see the channel type. If I set it (Ch2 on my configuration), then the HA autodiscovery works and it adds the pressure channel. However, in the device web page, the value is blank where the channel types are usually displayed.

    User interface displaying sensor information: pressure, RSSI, and temperature. OpenBK7231T device status page showing temperature, pressure, and MQTT connection info.
  • #22 20864475
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14615
    Help: 655
    Rate: 12633
    Well, on my own screenshot, it doesn't seem blank, so maybe you need to refresh your page? As far as I remember it fetches the channel type names from OBK itself.
    Helpful post? Buy me a coffee.
  • #23 20864517
    bilbs84
    Level 2  
    Posts: 14
    Rate: 1

    Sorry, I may not have been clear.

    The function in HA is perfect, the missing part is in the OBK device webpage. At the top, where it displays the channel types with scaling. In my screenshot, you see the temperature, but not pressure.
  • #24 20865409
    Osrx
    Level 5  
    Posts: 11

    Hello! Thank you for your work.

    I have BME280 sensor and it's generally work.
    Firmware: Build: Build on Dec 17 2023 11:15:27 version 1.17.360
    Autoexec: startDriver BMP280 14 16 2 3
    Screenshot showing a dropdown list with various sensor settings.

    But in Index page Pressure not calculated properly. Pressure_div100 actually divided by 10 not 100.
    Screenshot of a BME280 sensor reading panel showing data on temperature, pressure, and energy.

    Humidity not work for now.
  • #25 20865733
    bilbs84
    Level 2  
    Posts: 14
    Rate: 1

    Hi

    Glad to see another with the BME280, it will be good to have another that can test.

    The unit reading in the index page, is in deka pascals, not hecto pascals. I think that in the long run, it would be best to apply the correct scaling to hPa here too. If you're familiar with C, and building your own version of OBK, it's actually fairly trivial to change how it is displayed here.

    in drv_bmp280.c Change the line,
    hprintf255(request, "<h2>BMP280 Temperature=%f, Pressure=%f</h2>", g_temperature*0.01f, g_pressure*0.1f);
    to
    hprintf255(request, "<h2>BMP280 Temperature=%f, Pressure=%f</h2>", g_temperature*0.01f, g_pressure*0.01f);
    and then the index page will be in hecto pascals pascals instead.

    I've just not bothered changing it during any of the development, as right now, I'm just glad that it IS being actively developed, and I don't want to waste the devs time with such a trivial change. The scaling in Home assistant is correct however, and that is where I'm viewing all my sensors anyway. I guess this is all stuff that we can wait until humidity is working to iron out.
  • #26 20865737
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14615
    Help: 655
    Rate: 12633
    I will push a fix and required channel types in few moments. You were correct @bilbs84 that something was missing.

    My testing setup:
    A breadboard with connected electronic components, such as sensors and modules.

    Added after 7 [minutes]:

    Adding that dot position fix:
    https://github.com/openshwprojects/OpenBK7231...mmit/53591c3a9511e5ae6d362ea631220a3bbe3e78ee
    Helpful post? Buy me a coffee.
  • #27 20865805
    bilbs84
    Level 2  
    Posts: 14
    Rate: 1

    p.kaczmarek2 wrote:
    My testing setup:
    Breadboard with ESP32, BME280 module, and other electronic components.


    Certainly a lot more practical than mine. I just have wires soldered to a WB2S module, powered by an ESP32, and dupont pins on the BME salvaged from my old weather station, all precariously balanced on a shelf lmao
  • #28 20865860
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14615
    Help: 655
    Rate: 12633
    This is my development board:



    I will add changes to repository soon:
    User interface for an IoT device displaying sensor data. User interface of the BK7231T_FourRelays development board with temperature and pressure readings and control toggles.
    Helpful post? Buy me a coffee.
  • #29 20865929
    bilbs84
    Level 2  
    Posts: 14
    Rate: 1

    Yeah, I think your setup is a little nicer than mine, I might look into one of those boards.

    Have you had a chance to look at the humidity on the BME chip?

    I had a little play with trying to add it by taking some code from the Adafruit library for the BME, and adding it to the code that you used, however, I suspect I couldn't get it working because I need to enable the humidity register in the device. I don't quite understand the code well enough to go any further, however. I get lost when you start dealing with pointers, registers, and references.
  • #30 20866002
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14615
    Help: 655
    Rate: 12633
    I must admit it's a bit hard for me to do this because I don't have BME at hand so I am not able to test what I implement. I will look into it more soon, maybe we could also try to use the alternate approach, maybe I could just try to get another library ported instead of extending that one? I'll have to think about it.
    Helpful post? Buy me a coffee.

Topic summary

✨ The discussion focuses on integrating BME280 sensors with OpenBK firmware on WB2S modules for home automation, specifically for temperature, pressure, and humidity measurements. Initial efforts involved porting a BMP280 driver to OpenBK, with adaptations for BME280 compatibility, including chip ID detection (0x60 for BME280 vs. 0x58 for BMP280) and configurable I2C pins and addresses (0x76 or 0x77). The driver supports software-defined I2C and channels for temperature, pressure, and humidity, with MQTT integration for Home Assistant. Users addressed issues such as measurement scaling, channel type configuration, and publishing intervals, with suggestions to adjust measurement frequency via driver tick commands or BMPI2C_Cycle. The BME280 temperature reading is noted to be chip temperature, slightly higher than ambient, requiring calibration offsets for accuracy. Development progressed to support multiple sensors and improved driver flexibility. Challenges include limited flash memory on some platforms (e.g., BL602), requiring manual driver enabling and custom builds. A newer BMPI2C driver supports both BME280 and BME680 sensors with humidity measurement, though humidity accuracy on BME680 requires further work. Users shared build configurations, troubleshooting tips, and integration methods, including Home Assistant MQTT discovery and manual scripting. The community also discussed driver availability on different hardware platforms, compilation issues, and OTA update file handling. Overall, the integration is functional with ongoing development to enhance features, stability, and ease of use for home automation applications.
Generated by the language model.

FAQ

TL;DR: With 1 sensor per WB2S and a simple command, OpenBK can read BME280 data over software I2C; one contributor confirmed, "all working fine" with BMPI2C_Cycle 60, which also stops 1-second MQTT flooding. This FAQ helps OpenBK users connect BME280/BMP280/BME680-class sensors and publish stable readings to Home Assistant or OpenHAB. [#21510838]

Why it matters: This thread shows the practical path from a first BME280 question to working OpenBK drivers, Home Assistant publishing, BL602 builds, and configurable reporting intervals.

Driver Sensors discussed Humidity support Address handling Reporting interval
BMP280 BMP280, partial BME280 use No native BME humidity at first Later extended Originally every 1 s
BMPI2C BME280, BMP280, BME680-class testing Yes, via humidity channel Explicit address parameter BMPI2C_Cycle 60 supported

Key insight: Use the older BMP280 driver only for basic temperature and pressure tests. For real deployments, BMPI2C is the better OpenBK path because it adds humidity-channel support and a configurable measurement cycle.

Quick Facts

  • BME280 and BMP280 use different chip IDs: BME280 reports 0x60, while BMP280 reports 0x58; confusing those values causes the classic "wrong ID" error. [#20862072]
  • The same BME280 breakout can expose two I2C addresses, 0x76 or 0x77, selected by switch or ADDR wiring on the board. [#20861920]
  • OpenBK later introduced startDriver BMPI2C [CLK] [DATA] [TempCh] [PressureCh] [HumidityCh] [Addr], where 0 means 0x77 and 1 means 0x76 in the newer syntax. [#21123022]
  • One BL602 user confirmed working wiring on P16 = SCL and P7 = SDA, after initial ID errors caused by wrong pin guesses. [#21011686]
  • A long-run test device with BME280 stayed stable for 10+ days, suggesting the OpenBK integration is practical beyond bench testing. [#21143369]

How do I connect a BME280 sensor to a WB2S module running OpenBK using software I2C?

Wire the sensor to two free GPIOs and start the OpenBK driver with those pins as software I2C clock and data. 1. Connect SCL to your chosen CLK GPIO and SDA to your chosen DATA GPIO. 2. Power the sensor and set its address to 0x76 or 0x77. 3. Run startDriver BMP280 24 11 1 2 for temp and pressure, or use BMPI2C if you also want humidity. The thread confirms one BME280 worked immediately after pin selection and driver start on WB2S-class hardware. [#20862072]

What does the OpenBK command "startDriver BMP280 [CLK] [DATA] [ChannelForTemp] [ChannelForPressure]" actually do, and how should I choose the GPIO pins and channels?

It starts the BMP280-family driver on two chosen GPIOs and stores readings in the channels you assign. CLK and DATA are the software I2C pins, while ChannelForTemp and ChannelForPressure are numeric OpenBK channels, such as 1 and 2. Pick GPIOs that are free on your board, then map the channels to channel types like Temp_div100 or Pressure_div100. One working example from the thread is startDriver BMP280 8 14 1 2. [#20862067]

Why does OpenBK report "BMx280 wrong ID" with a BME280 or BMP280 sensor, and how do I troubleshoot chip ID versus I2C address issues?

OpenBK reports "BMx280 wrong ID" when it can talk on I2C but the returned chip ID does not match what the driver expects. Check three things in order: 1. Confirm SCL and SDA are on the correct GPIOs. 2. Confirm the board is really a BME280 or BMP280. 3. Separate chip ID from I2C address during diagnosis. One BL602 user fixed the error simply by finding the correct pins, and another user found the BME280 returned 0x60 instead of the BMP280 0x58. [#21011686]

What is the difference between the BME280 chip ID and the I2C address, and why do values like 0x60, 0x58, 0x76, and 0x77 get mixed up?

The chip ID identifies the sensor model, while the I2C address identifies where that sensor sits on the bus. 0x60 is the BME280 chip ID, 0x58 is the BMP280 chip ID, and 0x76 or 0x77 are selectable I2C addresses. They get mixed up because both numbers appear during setup, but they solve different problems. One user explicitly realized the difference after trying to treat 0x77 as a chip ID value. [#21072813]

How can I publish BMP280 or BME280 temperature and pressure readings from OpenBK to Home Assistant over MQTT?

Use OpenBK channels with MQTT publishing, then let Home Assistant discover them or publish them manually. The thread gives two direct commands: publishFloat myTemp $CH1*0.01 and publishFloat myPress $CH2*0.1. You can also trigger updates on change with addEventHandler OnChannelChange 1 publishFloat myTemp $CH1*0.01. One user said the target platform was Home Assistant over MQTT, and the developer confirmed both discovery-based and script-based publishing paths. [#20862313]

What's the correct way to scale OpenBK BMP280 pressure and temperature values for Home Assistant, including Temp_div100 and Pressure_div100?

Scale temperature by 0.01 and pressure by the correct divider for the channel type you use. The thread shows raw values like T 2391 and P 100185, which correspond to about 23.91 °C and 1001.85 hPa after scaling. In OpenBK, Temp_div100 is the expected choice for temperature, and pressure needed its own corrected handling during development. One fix changed the web display from g_pressure*0.1f to g_pressure*0.01f for hectopascals. [#20865733]

How do channel types and the divider flag in OpenBK affect MQTT values for BME280 or BMP280 sensors?

Channel types control formatting and discovery, but MQTT can still send raw integers unless the divider flag is enabled. A BL602 user saw 2660 over MQTT instead of 26.60, even though the web page displayed scaled values correctly. The developer answered that a divider flag solves that mismatch because OpenBK still follows the TuyaMCU-style integer storage model. Turn that flag on if you want MQTT payloads to honor the selected divider. [#21013349]

What is the BMPI2C driver in OpenBK, and how is it different from the older BMP280 driver?

BMPI2C is the newer OpenBK driver for BMx280-style sensors, and it adds humidity support plus a configurable cycle command. "BMPI2C is a sensor driver that reads BMx280-family devices over software I2C, exposes separate temperature, pressure, and humidity channels, and accepts an explicit address parameter for multi-model support." The older BMP280 driver started as a simpler temp-and-pressure driver and originally ran every second. The BMPI2C command format adds [ChannelForHumidity] and [Addr], plus BMPI2C_Cycle 60. [#21123022]

BMP280 driver vs BMPI2C in OpenBK — which one should I use for BME280, BMP280, or BME680 sensors?

Use BMPI2C for new setups, especially if you need humidity or slower reporting. The older BMP280 driver is fine for quick BMP280 or basic BME280 temperature-and-pressure tests, and users confirmed it worked on real hardware. BMPI2C is the better fit for BME280 and newer experiments because it supports temp, pressure, humidity, and a cycle command. A later user switched to BMPI2C for a plain BMP280 and reported it worked after adding a placeholder humidity channel. [#21510838]

How can I slow down BME280 or BMP280 measurement and MQTT reporting in OpenBK so it doesn't publish every second?

Move to the newer BMPI2C driver and set a longer cycle. The older BMP280 path measured and published every 1 second, which multiple users called noisy or flooding for MQTT. The newer solution is BMPI2C_Cycle 60, which triggers the driver every 60 seconds instead. That change directly addresses the thread's repeated complaint about one-second updates on Home Assistant or OpenHAB. [#21123022]

What does the OpenBK command "BMPI2C_Cycle 60" do, and how should I set a practical measurement interval for Home Assistant or OpenHAB?

BMPI2C_Cycle 60 tells the BMPI2C driver to read and report every 60 seconds. For room temperature, pressure, and humidity, 60 seconds is a practical starting point because ambient conditions rarely need 1-second updates. One user wanted 5 minutes to reduce MQTT noise, while another confirmed 60 seconds worked fine in practice. Set the interval to match your dashboard and automation needs, not the fastest possible sensor rate. [#21510838]

Why is the BMP280 or BMPI2C driver missing from some OpenBK builds, and how do I enable it in obk_config.h and compile my own firmware?

Some OpenBK builds omit these drivers because flash space is tight, so you must enable them in obk_config.h and compile a custom binary. The developer explicitly said the BMP280 driver may be disabled because the project is slowly running out of flash memory. For the older driver, add #define ENABLE_DRIVER_BMP280 1. For newer builds, enable the newer BMPI2C path instead if that is the driver you need. [#20945538]

How do I build OpenBK with BMP280 or BMPI2C support for BL602, and what compile errors or missing dependencies should I watch for?

For BL602, enable the specific driver in the BL602 section of obk_config.h, then build without assuming generic I2C is required. The key trap is enabling ENABLE_I2C 1, which caused undefined references such as DRV_I2C_Init, DRV_I2C_EverySecond, and I2C_OnChannelChanged until it was fixed. The developer later clarified that ENABLE_I2C is not needed for this standalone BME/BMP driver on BL602. That makes the cleanest BL602 path: enable the sensor driver, skip generic I2C, and compile again. [#21370874]

What is OTA in OpenBK, and how do I prepare a custom BL602 firmware file so the web app accepts it for update?

OTA is the OpenBK web update package format, and BL602 custom builds may need repackaging before the web app accepts them. One user found that raw .bin and .ota.bin files were rejected as "Invalid OTA file was selected." They then compressed the OTA file to xz, renamed it to OpenBL602_OTA.bin.xz.ota, and got the file into the expected size range near 400 kB instead of about 700 kB. Later, the same user confirmed OTA worked with their BL602 custom builds. [#21371661]

How far can I get using a BME680 with OpenBK today, and what still needs extra driver work compared with BME280 support?

You can get partial detection and some experimental operation, but BME680 still needs extra driver work compared with BME280. One contributor added BME680 chip-ID detection only and stated that the driver itself still needed more work to function properly on BME680. Later, another user reported both BME680 and BME280 running on the same board with a custom BMPI2C-enabled build, but that was from a personal fork, not a standard public binary. So BME280 support is the mature path today. [#21275971]
Generated by the language model.
ADVERTISEMENT