[{"data":1,"prerenderedAt":240},["ShallowReactive",2],{"post-\u002Fen\u002Fblog\u002Foptimizing-air-quality-monitoring-with-iot":3,"post-surround-\u002Fen\u002Fblog\u002Foptimizing-air-quality-monitoring-with-iot":229},{"id":4,"title":5,"authors":6,"badge":7,"body":9,"date":212,"dateModified":6,"description":213,"extension":214,"image":215,"meta":220,"navigation":221,"path":222,"seo":223,"stem":226,"translation":227,"__hash__":228},"blog\u002Fen\u002Fblog\u002Foptimizing-air-quality-monitoring-with-iot.md","Optimizing Air Quality Monitoring with IoT: A Case Study",null,{"label":8},"IoT architecture",{"type":10,"value":11,"toc":195},"minimark",[12,16,21,44,48,51,62,66,69,74,79,93,97,111,115,129,133,136,140,143,150,154,174,178,181,185],[13,14,15],"p",{},"A large office building had a problem with high CO2 levels. Our task was to bring them under control and, while we were at it, cut energy use. We built an IoT stack of LoRa sensors, Telegraf, InfluxDB, Kapacitor and Chronograf. It measures air quality continuously, alerts building managers the moment CO2 crosses a safe threshold, and gives them the data they need to run the building more efficiently.",[17,18,20],"h2",{"id":19},"tldr","TL;DR",[22,23,24,32,38],"ul",{},[25,26,27,31],"li",{},[28,29,30],"strong",{},"The problem:"," high CO2 levels in a large office building.",[25,33,34,37],{},[28,35,36],{},"The stack:"," LoRaWAN CO2 sensors, The Things Network, Telegraf (MQTT), InfluxDB, Kapacitor and Chronograf.",[25,39,40,43],{},[28,41,42],{},"The outcome:"," CO2 levels kept within safe limits, and a reduction in peak energy consumption of 80% once building managers could act on motion and CO2 data.",[17,45,47],{"id":46},"project-goals","Project goals",[13,49,50],{},"The project aimed to:",[22,52,53,56,59],{},[25,54,55],{},"Gather and analyze air quality data continuously.",[25,57,58],{},"Notify building managers when air quality changes.",[25,60,61],{},"Reduce energy consumption significantly by turning the data into actionable insights.",[17,63,65],{"id":64},"the-technology-stack","The technology stack",[13,67,68],{},"Sensor data flows through the stack like this:",[13,70,71],{},[28,72,73],{},"LoRaWAN sensors → The Things Network → MQTT → Telegraf → InfluxDB → Kapacitor (alerts) and Chronograf (dashboards)",[75,76,78],"h3",{"id":77},"_1-lora-network-sensors-across-the-building","1. LoRa network: sensors across the building",[22,80,81,87],{},[25,82,83,86],{},[28,84,85],{},"Long-range communication:"," LoRa transmits data over long distances with minimal power consumption, which made it a good fit for monitoring an entire building.",[25,88,89,92],{},[28,90,91],{},"Deployment:"," we installed LoRaWAN-enabled CO2 sensors throughout the building for full coverage and real-time data transmission to central gateways.",[75,94,96],{"id":95},"_2-telegraf-collecting-the-data","2. Telegraf: collecting the data",[22,98,99,105],{},[25,100,101,104],{},[28,102,103],{},"Data collection:"," Telegraf agents gather the data from the LoRa sensors and feed it directly into InfluxDB.",[25,106,107,110],{},[28,108,109],{},"Integration:"," the MQTT input plugin moves the sensor data collected on The Things Network (TTN) into the central database, so the data is available in real time.",[75,112,114],{"id":113},"_3-influxdb-time-series-storage","3. InfluxDB: time-series storage",[22,116,117,123],{},[25,118,119,122],{},[28,120,121],{},"Built for time series:"," InfluxDB handles high-frequency, time-stamped data efficiently, which is crucial for continuous monitoring.",[25,124,125,128],{},[28,126,127],{},"Data storage:"," the database stores CO2 levels, temperature and humidity with precise timestamps, enabling detailed analysis over time and a review of historical data.",[75,130,132],{"id":131},"_4-kapacitor-real-time-alerts","4. Kapacitor: real-time alerts",[13,134,135],{},"Kapacitor processes and analyzes the data in real time and notifies building managers instantly when CO2 levels exceed safe thresholds.",[75,137,139],{"id":138},"_5-chronograf-dashboards","5. Chronograf: dashboards",[13,141,142],{},"Chronograf visualizes the data from all sensors, giving building managers a clear picture of what they need to do to keep air quality at the right level.",[13,144,145],{},[146,147],"img",{"alt":148,"src":149},"Chronograf dashboard titled \"CO2 Motion Visualization\", showing time-series charts of sensor readings","\u002Fcontent\u002Fimages\u002Fchronograf.png",[17,151,153],{"id":152},"results","Results",[22,155,156,162,168],{},[25,157,158,161],{},[28,159,160],{},"Better air quality:"," continuous monitoring and alerts to building managers kept CO2 levels within safe limits, contributing to a healthier indoor environment.",[25,163,164,167],{},[28,165,166],{},"Lower energy use:"," with notifications on motion and CO2 levels, building managers could manage the HVAC systems and reduced peak energy consumption by 80%.",[25,169,170,173],{},[28,171,172],{},"Real-time insight:"," the combination of LoRa, InfluxDB, Telegraf, Kapacitor and Chronograf made it possible to manage air quality and energy use proactively instead of reactively.",[17,175,177],{"id":176},"why-this-stack-works","Why this stack works",[13,179,180],{},"Each component does one job well: LoRa for connectivity, Telegraf for data collection, InfluxDB for data management, and Kapacitor and Chronograf for real-time alerts and visualization. Together they form a robust system that improved air quality and optimized energy use at the same time.",[17,182,184],{"id":183},"planning-an-iot-or-automation-project","Planning an IoT or automation project?",[13,186,187,188,194],{},"At Coding Delta we build custom IoT solutions around specific business needs, designed to be scalable and reliable. If you want sensor data to trigger alerts and actions automatically, see how we approach ",[189,190,193],"a",{"href":191,"rel":192},"\u002Fautomation",[],"AI and automation",", or use the button below to discuss your project with us.",{"title":196,"searchDepth":197,"depth":197,"links":198},"",2,[199,200,201,209,210,211],{"id":19,"depth":197,"text":20},{"id":46,"depth":197,"text":47},{"id":64,"depth":197,"text":65,"children":202},[203,205,206,207,208],{"id":77,"depth":204,"text":78},3,{"id":95,"depth":204,"text":96},{"id":113,"depth":204,"text":114},{"id":131,"depth":204,"text":132},{"id":138,"depth":204,"text":139},{"id":152,"depth":197,"text":153},{"id":176,"depth":197,"text":177},{"id":183,"depth":197,"text":184},"2024-07-08","How we use 100s of sensors to improve air quality.","md",{"src":216,"alt":217,"height":218,"width":219},"\u002Fcontent\u002Fimages\u002Fcover-iot-air-quality.jpg","Cover: 'Fresh air, measured.' with a CO₂ chart dropping below the safe limit and the LoRaWAN to InfluxDB stack",900,1600,{},true,"\u002Fen\u002Fblog\u002Foptimizing-air-quality-monitoring-with-iot",{"title":224,"description":225},"IoT Air Quality Monitoring: A CO2 Case Study","How we monitor CO2 in a large office building with LoRaWAN sensors, InfluxDB, Telegraf, Kapacitor and Chronograf to improve air quality and save energy.","en\u002Fblog\u002Foptimizing-air-quality-monitoring-with-iot","optimalisatie-van-luchtkwaliteitsbewaking-met-iot","aGI0PAUIn1fLgKxrc6Bk6IsTnHpVTUd_KjRlxWyyOZE",[230,235],{"title":231,"path":232,"stem":233,"description":234,"children":-1},"Watch a real hack, step by step: inside our live penetration lab","\u002Fblog\u002Fwatch-a-real-hack-inside-our-live-penetration-lab","en\u002Fblog\u002Fwatch-a-real-hack-inside-our-live-penetration-lab","Security isn't proven with words. So we built a live lab where you watch real attacks run against our own throwaway servers, step by step, and see exactly how we shut each one down.",{"title":236,"path":237,"stem":238,"description":239,"children":-1},"Testing in the age of AI agents","\u002Fblog\u002Ftesting-in-the-age-of-ai-agents","en\u002Fblog\u002Ftesting-in-the-age-of-ai-agents","Using a testing framework is critical in creating consistent AI agents",1795282279271]