Just received my AirGradient ONE today and so far I am very happy with it!
Very easy to setup out of the box, didn’t run into any issues.
Accessing local information is easy and straight forward a la arduino/docs/local-server.md at master · airgradienthq/arduino · GitHub using the mDNS name.
But I noticed an interesting design choice or oversight in reporting. In both the AirGradient Cloud App and locally using the API, the actual IP address information isn’t published. I wouldn’t have even questioned this, but the API actually reports wifi signal strength out of the box?
e.g.
{
"pm01": 0,
"pm02": 0,
"pm10": 0,
"pm01Standard": 0,
"pm02Standard": 0,
"pm10Standard": 0,
"pm003Count": 44.5,
"pm005Count": 22.17,
"pm01Count": 0,
"pm02Count": 0,
"pm50Count": 0,
"pm10Count": 0,
"atmp": 22.51,
"atmpCompensated": 22.51,
"rhum": 32.59,
"rhumCompensated": 32.59,
"pm02Compensated": 0,
"rco2": 619,
"tvocIndex": 131,
"tvocRaw": 31484.5,
"noxIndex": 1,
"noxRaw": 16953.33,
"boot": 159,
"bootCount": 159,
"wifi": -59,
"ledMode": "co2",
"serialno": "744dbdcf7b30",
"firmware": "3.1.21",
"model": "I-9PSL"
}
I’m an IT professional, so getting this information from my network infrastructure was trivial for me, but may be more challenging for some. Althought I suppose the mDNS name sorta solves this problem, but then you are relying on mDNS working. For home use thats fine, but in an Enterprise world with multiple VLANs and routing domains, at scale mDNS can be challenging.
{
"pm01": 0,
"pm02": 0,
"pm10": 0,
"pm01Standard": 0,
"pm02Standard": 0,
"pm10Standard": 0,
"pm003Count": 44.5,
"pm005Count": 22.17,
"pm01Count": 0,
"pm02Count": 0,
"pm50Count": 0,
"pm10Count": 0,
"atmp": 22.51,
"atmpCompensated": 22.51,
"rhum": 32.59,
"rhumCompensated": 32.59,
"pm02Compensated": 0,
"rco2": 619,
"tvocIndex": 131,
"tvocRaw": 31484.5,
"noxIndex": 1,
"noxRaw": 16953.33,
"boot": 159,
"bootCount": 159,
"wifi": -59,
"ledMode": "co2",
"serialno": "744dbdcf7b30",
"firmware": "3.1.21",
"model": "I-9PSL"
}
Secondarily, I was looking to see if I could set the IP address to a static address. For a whole host of reasons, any appliance like device of which I would consider this sensor, I prefer to keep a local static address assigned to it. This doesn’t seem to be available in /config
e.g.
{
"country": "US",
"pmStandard": "ugm3",
"ledBarMode": "co2",
"abcDays": 8,
"tvocLearningOffset": 12,
"noxLearningOffset": 12,
"mqttBrokerUrl": "",
"temperatureUnit": "f",
"configurationControl": "both",
"postDataToAirGradient": true,
"ledBarBrightness": 10,
"displayBrightness": 20,
"offlineMode": false,
"monitorDisplayCompensatedValues": false,
"model": "I-9PSL-DE",
"corrections": {
"pm02": {
"correctionAlgorithm": "epa_2021",
"slr": null
}
}
}
I’ll probably end up connecting to the serial port and dig around, but I really would prefer not to. Having the API safety belt is always preferable. As an example, is there a “reset” button for the WiFi, and would setting a static IP from the console break this functionality?
In any case, I’m planning on using Uptime Kuma as I do with all of my other random devices to give me an alert when particular sensor values get way too out of whack.
Having “http://airgradient_744dbdcf7b30.local/measures/current” just dump some JSON to parse is a fantastic design choice and makes integrations like this simple.
I can use Uptime Kuma to parse the JSON key for “rco2” and alert me on all of my devices when it goes above 1000, as an example.