airgradienthq / arduino

Firmware of open-source hardware air quality monitors AirGradient ONE (indoor) and AirGradient Open Air (outdoor).
https://www.airgradient.com/documentation/
Other
218 stars 115 forks source link

Prevent "postDataToAirGradient": null #220

Closed airgradienthq closed 1 month ago

airgradienthq commented 2 months ago

We have cases when "postDataToAirGradient": null. Model O-1PPT

This should not happen.

@pnt325 Please investigate and fix.

{ "country": "TH", "configurationControl": "local", "pmStandard": "ugm3", "temperatureUnit": "c", "postDataToAirGradient": true, "ledBarBrightness": 95, "displayBrightness": 14, "ledBarMode": "pm", "tvocLearningOffset": 360, "noxLearningOffset": 720, "abcDays": 1, "model": "O-1PPT", "offlineMode": false, "postDataToAirGradient": null }

pnt325 commented 2 months ago

@airgradienthq Did you have log message from device for this case. Currently the read data from EEPROM/SPIFFS and write configuration value always validate. The value should not happen for null.

I try some case with some invalid valid but it's ignored:

Invalid value ignore log message

'postDataToAirGradient' type invalid, it's should 'boolean'