02-24-2019 01:41 PM
it seems there may occur a problem while init after restarting sensor.
Following situation:
Sensor was running a long time (3 weeks, last time block 28266 seconds - about 8 hours) in outdoor environment.
Was stable and bad air was detected.
There was a situation with very poor air quality (smoke from stove heaters or open fire has polluted the air) - that's why the values here were bad.
In this situation the WiFi connection was lost and ESP was restarted (by program).
BME did not initialize full - the IAQ and TVOC values did not change more from default values, only the resistance was changing after restart.
Time, Timestamp, gas/Ohm, IAQ, IAQ accur., temp/°C, hum./%, staticIaq, co2Eq., VocEq. Feb 23 21:43:34 .28257914, 103753, 306.28, 2.00, -1.20, 66.22, 723.24, 7232.40, 1000.00 Feb 23 21:43:37 .28260914, 103755, 305.96, 2.00, -1.20, 66.28, 722.44, 7224.43, 1000.00 Feb 23 21:43:40 .28263914, 103754, 305.67, 2.00, -1.20, 66.31, 721.72, 7217.27, 1000.00 Feb 23 21:43:43 .28266914, 103755, 306.10, 2.00, -1.20, 66.35, 722.79, 7227.91, 1000.00 Feb 23 21:43:48 . client connection failed (1) - restart Feb 23 21:43:57 .Begin (setup) Feb 23 21:43:58 .2980, 103753, 25.00, 0.00, -1.25, 66.32, 25.00, 500.00, 0.49 Feb 23 21:44:01 .5979, 103752, 25.00, 0.00, -1.30, 66.64, 25.00, 500.00, 0.49 Feb 23 21:44:04 .8980, 103754, 25.00, 0.00, -1.28, 66.61, 25.00, 500.00, 0.49 .... Feb 24 02:40:22 .17786979, 103697, 25.00, 1.00, -1.64, 74.48, 25.00, 500.00, 0.49 Feb 24 02:40:25 .17789980, 103696, 25.00, 1.00, -1.64, 74.45, 25.00, 500.00, 0.49 Feb 24 02:40:30 . client connection failed (1) - restart Feb 24 02:40:36 .Begin (setup) Feb 24 02:40:37 .2981, 103696, 25.00, 0.00, -1.65, 74.20, 25.00, 500.00, 0.49 Feb 24 02:40:40 .5980, 103696, 25.00, 0.00, -1.69, 74.53, 25.00, 500.00, 0.49 .... Feb 24 08:10:37 .19803337, 103565, 25.00, 1.00, -1.02, 73.23, 25.00, 500.00, 0.49 Feb 24 08:10:40 .19806337, 103565, 25.00, 1.00, -1.01, 73.22, 25.00, 500.00, 0.49
A second restart did not help (OA update with restart):
Time, Timestamp, gas/Ohm, IAQ, IAQ accur., temp/°C, hum./%, staticIaq, co2Eq., VocEq. Feb 24 08:10:40 .19806337, 103565, 25.00, 1.00, -1.01, 73.22, 25.00, 500.00, 0.49 Feb 24 08:10:41 .Begin OTA Feb 24 08:10:49 .End OTA Feb 24 08:10:59 .Begin (setup) Feb 24 08:10:59 .9595, 103564, 25.00, 0.00, -1.00, 73.27, 25.00, 500.00, 0.49 Feb 24 08:11:02 .12595, 103564, 25.00, 0.00, -1.05, 73.57, 25.00, 500.00, 0.49 .... Feb 24 08:30:11 .1161594, 103586, 25.00, 1.00, -0.36, 71.65, 25.00, 500.00, 0.49 Feb 24 08:30:14 .1164595, 103585, 25.00, 1.00, -0.35, 71.62, 25.00, 500.00, 0.49 ....
Only after power off/power on the sensor was working again as expected:
Time, Timestamp, gas/Ohm, IAQ, IAQ accur., temp/°C, hum./%, staticIaq, co2Eq., VocEq. Feb 24 08:42:21 .Begin (setup) Feb 24 08:42:21 .#012BSEC library version 1.4.7.1 Feb 24 08:42:22 .3046, 103600, 25.00, 0.00, 0.19, 68.79, 25.00, 500.00, 0.49 Feb 24 08:42:25 .6046, 103600, 25.00, 0.00, 0.16, 69.02, 25.00, 500.00, 0.49 .... Feb 24 08:47:25 .306046, 103596, 25.00, 1.00, 0.48, 67.29, 25.00, 500.00, 0.49 Feb 24 08:47:28 .309046, 103598, 26.10, 1.00, 0.48, 67.22, 25.48, 501.92, 0.50 Feb 24 08:47:31 .312046, 103596, 28.21, 1.00, 0.47, 67.17, 26.40, 505.61, 0.51 Feb 24 08:47:34 .315046, 103597, 29.10, 1.00, 0.48, 67.07, 26.79, 507.17, 0.51
Is there any additional reset command what can be used instead of a physical power down?
BTW - the sensor did make the restarts before (about 2 weeks) fine, I have seen the restarts of the ESP in log.
I do not use the config_save/config_load functions.
04-26-2019 11:13 AM
Ok. Yes the begin method internally calls beginCommon, which in turn calls bme680_init, which in turn does a soft-reset.
/** * @brief Common code for the begin function */ void Bsec::beginCommon(void) { status = bsec_init(); getVersion(); bme680Status = bme680_init(&_bme680); }
Actually we have an update on this issue. It turns out that there is mismatch between the temperature range supported by the BSEC library [0...80C] and the temperature range of the sensor [-40...+85C].
We believe the issue you are facing is that the sensor was reset below 0C. If the sensor is started above 0C, then kept in use below that threshold, it is still not fully supported, but will keep giving some data.
We are investigating internally how to proceed, but as of version 1.4.7.3, this is a limitation. Either we expand the supported temperature range, remove the limitation without warranty, or simply document the BSEC operating range in the release. In any case we shall update this thread.