BSEC with Tasmota

Hi,
I am running Tasmota on a NodeMCU ESP8266, with a BME680 attached. Everything works fine when I take the standard measurements, but I would like to also use the IAQ measurement.
I am having trouble adding the BSEC library to the compile.
In my `tasmota\lib\lib_i2c\BME68x-Sensor-API` folder, I have the following files:

  • bme68x.c

  • bme68x.h

  • bme68x_defs.h

  • bsec.cpp

  • bsec.h

  • bsec_datatypes.h

  • bsec_interface.h

  • libalgobsec.a

I have also changed my build options to include the necessary files like so:

[env:tasmota-sensors]
build_flags = ${env.build_flags} 
	-DFIRMWARE_SENSORS 
	-DOTA_URL='"http://ota.tasmota.com/tasmota/release/tasmota-sensors.bin.gz"'
	-Ilib/lib_i2c/BME68x-Sensor-API
	-Llib/lib_i2c/BME68x-Sensor-API
	-lalgobsec
lib_extra_dirs = lib/lib_basic, lib/lib_i2c, lib/lib_rf, lib/lib_div

When I try to compile my code, I get

/xtensa-lx106-elf/bin/ld.exe: .pio\build\tasmota-sensors\lib050\libBME68x-Sensor-API.a(bsec.cpp.o):(.text._ZN4Bsec11beginCommonEv+0x0): undefined reference to `bsec_init'

What should I be doing differently?

5 replies