MQTT Intergration

Hello, I recently received my pre soldered DIY AirGradient device.

I’ve connected it to my wifi, but when attempting to access the device with a browser over my LAN it says connection refused. Not sure if there’s a specific port for it? It worked with port 80 when initially connecting wifi on its internal wifi network.

Either way, I’ve added it to the AirGradient Dashboard and can see telemetry there.

Is there a way to have the AirGradient device post to a local MQTT server I’m running? Or send REST requests to a NodeRed instance for telemetry? I could flash the device with Tasmota, but hoping that there is a native way to do it.

That isn’t part of the official AirGradient code, but others have posted different ways to do what you are looking for with MQTT.

I’m using ESPHome on the devices so it natively sends all of the data to my HomeAssistant server and then I can do whatever I want with it.

Ahhh, ok. I’ve not used the CO2 and particulate matter sensors before. Do they require any calibration software side, or is it all handled in the sensor? I could probably get them working on Tasmota or ESPHome, but worried about accuracy.

Do you have any links to others’ code where they added MQTT? I’m guessing they compiled and flashed with PlatformIO or something?

Try searching this forum or check out this blog about using Prometheus
https://www.jeffgeerling.com/blog/2021/airgradient-diy-air-quality-monitor-co2-pm25

1 Like