Hi, I'm using a bme680 with an esp32 in spi, in a very simple loop. The project uses the bsec library. The project is compiled using the Arduino IDE 1.8.11 (because the project does not compile until now with the Bsec library using the Arduino IDE 1.8.12 version but with 1.8.11 yes) (init)
iaqSensor.begin(UINT8_C(0x77), Wire);
bsec_virtual_sensor_t sensorList[10] = {
BSEC_OUTPUT_RAW_TEMPERATURE,
BSEC_OUTPUT_RAW_PRESSURE,
BSEC_OUTPUT_RAW_HUMIDITY,
BSEC_OUTPUT_RAW_GAS,
BSEC_OUTPUT_IAQ,
BSEC_OUTPUT_STATIC_IAQ,
BSEC_OUTPUT_CO2_EQUIVALENT,
BSEC_OUTPUT_BREATH_VOC_EQUIVALENT,
BSEC_OUTPUT_SENSOR_HEAT_COMPENSATED_TEMPERATURE,
BSEC_OUTPUT_SENSOR_HEAT_COMPENSATED_HUMIDITY,
};
iaqSensor.updateSubscription(sensorList, 10, BSEC_SAMPLE_RATE_LP);
checkIaqSensorStatus(); (loop) if (iaqSensor.run()) { // If new data is available
StaticJsonDocument<500> JSONdocument;
JSONdocument["measurment"] = "esp32_children";
JsonObject tags = JSONdocument.createNestedObject("tags");
tags["location"] = "childrensroom";
JsonObject fields = JSONdocument.createNestedObject("fields");
fields["temperature"] = iaqSensor.temperature;
fields["pressure"] = iaqSensor.pressure;
fields["humidity"] = iaqSensor.humidity;
fields["iaq"] = iaqSensor.iaq;
fields["iaq_accuracy"] = iaqSensor.iaqAccuracy;
fields["gas_resistance"] = iaqSensor.gasResistance;
fields["static_iaq"] = iaqSensor.staticIaq;
fields["co2Equivalent"] = iaqSensor.co2Equivalent;
fields["breath_voc_equivalent"] = iaqSensor.breathVocEquivalent;
char buffer[500];
serializeJsonPretty(JSONdocument, buffer);
Serial.println(buffer);
client.publish("esp32/children/output", buffer);
Serial.println("sent to mqtt");
} else {
checkIaqSensorStatus();
} I've noticed several things that seem strange to me. First of all, iaq and iaq_static values sometimes exceed 500. I don't know if the air in my house is particularly impure, but it's out of the official range. How can this happen? As an example, that is a JSON received from the device : {
"measurment": "esp32_children",
"tags": {
"location": "childrensroom"
},
"fields": {
"temperature": 22.90531,
"pressure": 101038,
"humidity": 66.33105,
"iaq": 187.3018,
"iaq_accuracy": 3,
"gas_resistance": 132382,
"static_iaq": 434.5628,
"co2Equivalent": 4345.628,
"breath_voc_equivalent": 244.1985
}
} Here, the value is not over 500, but there is a correlation between co2equivalent and static_iaq and I wonder if it is normal that much. Also, I noticed that the co2Equivalent value is 10 times static_iaq, would that be relevant? I wonder if there isn't a configuration or overflow problem somewhere? Thanks in advance.
... View more