BME680 IAQ Direct Output, how?


#1

Hello, I have the BME680 and on the RaspberryPi I am using Python3 and the Pimoroni module.
I would like to use the Direct Output the BME680 has for IAQ from the Gas Sensor.
As per the Bosch documents, it specifies this is possible.

Output data processing : direct output of IAQ: Index for Air Quality

https://www.bosch-sensortec.com/bst/products/all_products/bme680

I cannot see in the module how to call that, there is just a method for what looks like a home made IAQ number.?

Thanks.


Airquality and breakout garden
#2

This likely refers to BOSCH’s proprietary, closed source software and not our Python port of their library. See- https://www.bosch-sensortec.com/bst/products/all_products/bsec


#3

Had a quick look over that,
That says ‘for outside the device’ and while there is a Pi version there, I cannot see anything in the download, just Arduino and loads of C style coding.

Where i want the ‘direct reading of IAQ’ calculation from it i.e. from inside the device.
Normally I guess via a register call.

I wouldn’t mind the ‘outside reading’ if I could actually using it (all that is beyond me at the moment), can it be integrated into he Python code.
If licensing is a problem, then make the blob part a drop in option?

Or should I write off the BME680 for VOC IAQ reading as a poor product?*
And wrongly advertised (w.r.t Bosch), not actually yourselves.
There are loads of pdf there too :-( that some reading.

(Currently I’m borrowing an ‘other generic’ sensor from someone for testing, but looking at yours as you are linked from Bosch as an official supplier hence using your module)
That and I like Pimoroni :-)

As a side question, are you planning on getting any particle sensor product for PM2.5/PM10 ?

  • Fine for relative one device readings. But not IAQ numbers.

#4

Bosch correctly advertise it- but you need to use their software to use those features. In their download table of available binaries they list “Raspberry PI0 linux” and “Raspberry PI3 linux” so presumably it’s possible to grab the binary, stick it on a Pi and interface with it. The last part being the tricky bit of course if you’re unfamiliar with C and how to link against a shared library.

It also looks like it requires the whole BME680 C driver to handle the interfacing with the sensor itself, so it’s pretty complicated to set up but certainly possible.

There’s simply no way we can integrate their IAQ calculation in Python directly because it’s proprietary and closed-source. IE:

  1. we have no idea what the calculation actually is so we can’t replicate it.
  2. it may be running afoul of licensing if we attempted to reverse engineer it

But that’s not to say we couldn’t provide a Python wrapper for the BSEC library- which you would still need to download from Bosch’s website- that makes it much easier to interface with. That said, it’s so involved it would probably be easier just to write a C program that can query the sensor, and then talk to that in Python.

Unfortunately time is my enemy at the moment, but you’re not the first person to ask about IAQ and the BTEC library so it’s probably something I’ll make the time to look into.

In the mean time, it looks like someone else has got further than me in this respect: https://github.com/alexh-name/bsec_bme680_linux


#5

Many thanks for explaining it.
:-)

(It is much appreciated)