{"id":20940848,"url":"https://github.com/timhanewich/air-quality-iot","last_synced_at":"2025-07-19T10:33:53.432Z","repository":{"id":188825852,"uuid":"679439332","full_name":"TimHanewich/Air-Quality-IoT","owner":"TimHanewich","description":"Indoor air quality sensor box IoT project with 3D-printed housing!","archived":false,"fork":false,"pushed_at":"2024-05-21T18:55:49.000Z","size":64,"stargazers_count":14,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-14T00:08:54.593Z","etag":null,"topics":["3d-printing","air","air-quality","air-quality-data","air-quality-monitor","aqi","co2","co2-sensor","quality-sensor","raspberry-pi","raspberry-pi-pico","rp2040","rpi"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TimHanewich.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-16T21:08:56.000Z","updated_at":"2025-05-09T22:24:49.000Z","dependencies_parsed_at":"2024-11-19T06:30:43.676Z","dependency_job_id":"5d64b42f-8cc2-4a35-b00b-7ff53100c83b","html_url":"https://github.com/TimHanewich/Air-Quality-IoT","commit_stats":{"total_commits":68,"total_committers":1,"mean_commits":68.0,"dds":0.0,"last_synced_commit":"3d04d5e89972443a98873347cb8421cb2e6d45a3"},"previous_names":["timhanewich/air-quality-box","timhanewich/air-quality-iot"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/TimHanewich/Air-Quality-IoT","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimHanewich%2FAir-Quality-IoT","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimHanewich%2FAir-Quality-IoT/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimHanewich%2FAir-Quality-IoT/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimHanewich%2FAir-Quality-IoT/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TimHanewich","download_url":"https://codeload.github.com/TimHanewich/Air-Quality-IoT/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimHanewich%2FAir-Quality-IoT/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265917030,"owners_count":23848848,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3d-printing","air","air-quality","air-quality-data","air-quality-monitor","aqi","co2","co2-sensor","quality-sensor","raspberry-pi","raspberry-pi-pico","rp2040","rpi"],"created_at":"2024-11-18T23:12:05.018Z","updated_at":"2025-07-19T10:33:53.413Z","avatar_url":"https://github.com/TimHanewich.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 😷 Home Indoor Air Quality Sensor IoT Project 🫁\nWelcome to my open-source Air Quality Sensor IoT Project! This project monitors your home's indoor air quality in real-time using IoT technology and feeds you data in JSON over a web server.\n\nThis project includes: \n- A data sampling and upload script, written in MicroPython, running on a **Raspberry Pi Pico W**.\n- An **ENS160 Digital Metal Oxide Multi-Gas Sensor**, used for monitoring **Carbon Dioxide (CO2)**, **Total Volatile Organic Compounds (TOVC)**, and the **Air Quality Index (AQI)** of your home via the I2C protocol.\n- An **AHT21 Integrated Temperature and Humidity Sensor**, used for monitoring ambient **temperature** and **humidity** of your home via the I2C protocol.\n- A 3D-printed housing box for the Raspberry Pi Pico W and sensors (optional).\n\nI am using a single breakout board that contains both an ENS160 and AHT21 on one board, found [here](https://www.amazon.com/gp/product/B0BXGZCSWG/ref=ppx_yo_dt_b_asin_title_o03_s00).\n\nThe Raspberry Pi Pico, along with the ENS160 + AHT20 sensor breakout board live neatly in a small 3D-printed enclosure:\n![plugged in](https://i.imgur.com/8NYAxq0.jpg)\n\n## How does this work?\nYou can easily move [this source code](./src/) to a Raspberry Pi Pico W, hook that Pico W up to an ENS160 \u0026 AHT21 sensor, and deploy. The source code will:\n1. Validate and set up the ENS160 and AHT21 sensors.\n2. Connect to your wifi network (using credentials you specify in the [settings.py file](./src/settings.py))\n3. Take air quality and condition measurements from the ENS160 and AHT21 sensors.\n4. If the air quality measurements were unsuccessful, restart these sensors and troubleshoot until they are operational.\n5. Upload these readings via HTTP POST request to an endpoint you define in the [settings.py file](./src/settings.py).\n6. Wait for a predefined amount of time, specified in the [settings.py file](./src/settings.py) (default is one minute).\n7. Repeat steps 3-6 in an infinite loop, sampling and uploading data at a regular interval!\n\nThere is a watchdog timer implemented to ensure long-term functionality is preserved.\n\n## 3D Printed Housing\nI modeled a simple housing tray for the microcontroller and sensors required for this project. You can download the 3D Model (STL file) [here directly from this GitHub repo](https://github.com/TimHanewich/air-quality-box/releases/download/2/aqb_v1.stl).\n![3d printed housing](https://i.imgur.com/vjyKvC5.png)\n![tray](https://i.imgur.com/bcAuU1n.jpg)\n\n## May 2024 Update\nIn May 2024, I changed the core functionality of how the Raspberry Pi Pico W performs: instead of being a server, responding to HTTP requests, it now instead samples data at a regular interval and uploads this via POST request to a defined endpoint. \n\nAll of the code and literature behind this old version can still be found by reverting to commit `3d04d5e89972443a98873347cb8421cb2e6d45a3`.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimhanewich%2Fair-quality-iot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimhanewich%2Fair-quality-iot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimhanewich%2Fair-quality-iot/lists"}