ESPurna ESP8266 Automation Firmware Gets Support for BME680 Sensor’s Precise Indoor Air Quality Measurements

Bosch BME680 is a 4-in-1 air quality sensor measuring relative humidity, barometric pressure, ambient temperature, and gas (VOC) levels. It’s found in boards such as STM32 based Metriful Sense or Nordic Thingy:91, and Bosch Sensortec published an Arduino library based on “Bosch Sensortec Environmental Cluster (BSEC) Software” to provide precise calculations temperature, humidity, pressure, and indoor air quality (IAQ).

BSEC proprietary algorithms can provide indoor air quality data as good as more expensive CO2 sensors according to a recent presentation by the company. Max Prokhorov, lead ESPurna maintainer, and Rui Marinho noticed none of the popular open-source ESP8266 automation firmware including ESPurna, Tasmota, and Esphome supported BME680 sensor just yet.

A Close-up on BME680 Sensor without lid

So they decided to work together to add BME680 sensor support via BSEC library to ESPurna firmware, and now it’s very easy to use as you just need to define BME680_SUPPORT=1 before compiling the firmware. You’ll find the now-merged pull request here.

The feature was previously discussed in Tasmota, but they did not go ahead as due to a license issue:

My first reaction would be if Bosch wants to sell these sensors AND have users using it then they shouldn’t use such a restricting license.

As said before many users use pre-compiled binaries and I won’t add any interface to satisfy any license.

In short, they have the wrong license for Tasmota. Pity Bosch.

It must be because of this part in Bosch Arduino repository:

Software license agreement

The BSEC software is only available for download or use after accepting the software license agreement. By using this library, you have agreed to the terms of the license agreement.

It’s not a standard license, and the license is 6-page long. Having said that, Rui has a different understanding of the license agreement:

Since there is now an open repository for Arduino directly from Bosch Sensortec on GitHub which includes the proprietary lib compiled for the BME680, in my understanding, as long as we don’t deliberately remove any copyright notice (which 3-Clause BSD requires), then there should be no reason not to include it here. Platform.io manages this dependency, so the copyright notice is always downloaded and carried around alongside the compiled library.

Optical CO2 Sensor (~50 Euros) vs BME680 VOC Sensor (15 to 20 Euros)

Typical applications for BME680 sensor and BSEC software include health monitoring (e.g. warning regarding dehydration/heat stroke), home automation control, gaming applications like flying toys, IoT applications, enhancement of GPS navigation (e.g., time-to-first-fix improvement, dead-reckoning, slope detection), indoor navigation (floor detection, elevator detection), health care applications (e.g. Spirometry), vertical velocity indication (e.g. rise/sink speed) and more.

Support CNX Software - Donate via PayPal, become a Patron on Patreon, or buy review samples
Subscribe
Notify of
guest
4 Comments
oldest
newest most voted
John S.
John S.
2 months ago

That’s some super helpful code to look at. I love how well-wrapped up the whole thing is, even including some platformIO-specific python utilities to handle fixing the linker script for placement of the library on ESP8266s. And the comment in the pull request about the 3 seconds (Low Power) / 300 seconds (Ultra Low Power) is an absolute max for requiring a poll of the sensor else the BSEC library will never calibrate itself might explain some problems I’ve been running into playing with it myself (via ESPHome as a custom_component). Nice! About the license, I think they’re both right?… Read more »

OldNews?
2 months ago

The BME680 is supported in esphome since minimum February 2019 (so 1.5 years already)

https://esphome.io/components/sensor/bme680.html

John S.
John S.
2 months ago

The BME680 seems to be a fairly raw, general-purpose hotplate gas sensor (plus a temperature-humidity-pressure sensor like a BME280). You just set a profile of up to 10 temperature and duration setpoints for the heater and then cycle through them reading a resistance value from the gas sensor for each temperature setpoint. This is the extent of what the esphome driver implements (though I think it only supports a single temperature+duration). Bosch also offer a binary-blob blackbox library named BSEC that sits itself between you and the sensor, loads the sensor’s hotplate settings with its own set of profiles, and… Read more »

Advertisements