02-27-2020 10:09 AM - edited 02-27-2020 10:16 AM
Hi, I have ESP32 and used this code https://github.com/BoschSensortec/BSEC-Arduino-library/tree/master/examples/basic_config_state
to get IAQ. I call iaqSensor.run() every 3 seconds and publish data to MQTT server each 5 minutes. Here is graph for last 24 hours. iaqAccuracy is still 0
1 day IAQ graph
This is graph for last 4 days
4 days IAQ
What should i do to make it show IAQ?
03-02-2020 06:56 PM
@mmib wrote:
Hi, I have ESP32 and used this code https://github.com/BoschSensortec/BSEC-Arduino-library/tree/master/examples/basic_config_state
to get IAQ. I call iaqSensor.run() every 3 seconds and publish data to MQTT server each 5 minutes. Here is graph for last 24 hours. iaqAccuracy is still 0
IAQ accuracy being stuck at 0 is not good. Upon a clean start of BSEC (i.e. no state file reloaded), the IAQ accuracy should at least show 1 for some time 5 minutes after start in LP mode (or after 20 minutes in ULP mode). Assuming that you are using WiFi to transmit MQTT data and based on your code, we have seen in the several cases that the time needed to reconnect and transmit the data would break the timing requirements of BSEC, especially in LP mode (3s sampling period). My recommentation if you are already publishing data every 5 minutes would be to run BSEC in ULP mode (also with 5 minutes sampling period, thus plenty of time for WiFi or other processes to complete before the next BME680 sample is needed). This should hopefully solve the IAQ accuracy being stuck at 0.
Another hint could be to check for any warning/error messages outputs in the console if available, as such timing issues are usually reported.
@mmib wrote:
1 day IAQ graph
This is graph for last 4 days
4 days IAQ
Looks like hassio history graphs 🙂 I would point out that the squarish/sharp spikes could partially be explained by artificats of the method used to plot data with this tool.
In general to comment about sensor data it would be better to look at data-logs, including if possible real timestamps (i.e. the ones fed into BSEC) and raw sensor outputs (T/P/H/G).