{"id":25122503,"url":"https://github.com/riz4d/airsense","last_synced_at":"2025-04-02T16:28:49.974Z","repository":{"id":272707212,"uuid":"914823827","full_name":"riz4d/AirSense","owner":"riz4d","description":"AirSense is an IoT-enabled device designed to monitor and detect toxic gases in the atmosphere, ensuring healthier and safer environments.","archived":false,"fork":false,"pushed_at":"2025-01-22T20:20:55.000Z","size":1140,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T02:04:31.752Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/riz4d.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":"2025-01-10T11:33:14.000Z","updated_at":"2025-03-06T04:19:28.000Z","dependencies_parsed_at":"2025-01-16T06:42:41.231Z","dependency_job_id":null,"html_url":"https://github.com/riz4d/AirSense","commit_stats":null,"previous_names":["riz4d/airsense"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riz4d%2FAirSense","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riz4d%2FAirSense/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riz4d%2FAirSense/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riz4d%2FAirSense/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/riz4d","download_url":"https://codeload.github.com/riz4d/AirSense/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246850226,"owners_count":20844024,"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":[],"created_at":"2025-02-08T07:13:54.682Z","updated_at":"2025-04-02T16:28:49.943Z","avatar_url":"https://github.com/riz4d.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Air Sense\n\n**AirSense** is a comprehensive air quality monitoring solution that consists of hardware sensors, a mobile application, and a powerful API backend. It allows users to monitor gas levels, control the system, and analyze data in real time, ensuring the safety and efficiency of the monitored environment.\n\n\n## How It Works\n\n#### Data Collection\nThe ESP8266 reads gas levels from the sensor and sends them to the Flask API at regular intervals.\n\n#### Mobile App Monitoring\nThe mobile application fetches real-time gas data and updates the gauge meter accordingly.\n\n#### System Control\nUsers can adjust the normal gas value threshold and turn the system on or off via the mobile app.\n\n#### Data Logging \u0026 Analytics\nThe application stores sensor logs and displays them in real-time, allowing users to monitor the trends.\n\n## Project Overview\n\n- **Hardware**: The system utilizes IoT sensors connected to an ESP8266 board to monitor gas levels and communicate with the server.\n- **Mobile Application**: The Flutter-based mobile application provides a user-friendly interface to interact with the system, visualize sensor data, and control system settings.\n- **API**: The backend API built with Flask handles data from the sensors, system controls, and analytics.\n\n---\n\n## Project Structure\n\nThe project is divided into several components:\n- **Hardware**: Contains code for the ESP8266 and sensor integration.\n- **Mobile Application**: Flutter-based app for monitoring, control, and analytics.\n- **API**: Flask-based backend for receiving sensor data, processing system state, and providing analytics.\n\n## Hardware Setup\n\nThe **hardware** component is based on an ESP8266 microcontroller that reads gas levels from an analog sensor (MQ sensor or similar). It uses **I2C** communication for the LCD display and WiFi to send data to the backend API.\n\n#### Components Required:\n- ESP8266 board (e.g., NodeMCU)\n- Gas sensor (e.g., MQ-2)\n- LCD with I2C interface\n- Jumper wires\n- Breadboard (optional)\n- Power source (5V USB adapter)\n\n#### Hardware Wiring:\n- Connect the gas sensor to the **A0** pin of the ESP8266.\n- Connect the LCD to the ESP8266 via I2C (usually **SDA** and **SCL** pins).\n- Wire the **Red, Green, and Buzzer** pins for status indication.\n\n\u003e **Refer to the `Hardware/README.md`** for detailed setup and wiring instructions.\n\n---\n\n## API (Backend)\n\nThe **API** handles all communication between the hardware sensors and the mobile application. It is built using **Flask** and **Socket.IO** for real-time communication.\n\n#### Key Features:\n- **Data Reception**: Receives sensor data from the ESP8266 device and updates the system.\n- **System Control**: Allows users to send system states (on/off) and adjust the normal air value (threshold for gas detection).\n- **Real-Time Updates**: Pushes real-time sensor updates to connected clients via **Socket.IO**.\n\n#### Endpoints:\n- `POST /` - Receives gas sensor data from the hardware.\n- `GET /gasdata` - Fetches the latest gas sensor data.\n- `POST /system` - Sets the system state (on/off).\n- `POST /normalvalue` - Sets the normal air threshold value.\n- `GET /state` - Retrieves the current system state.\n- `GET /normalstate` - Retrieves the current normal air value.\n\n#### Running the API Locally:\n1. Navigate to the `api/` directory.\n2. Install the dependencies:\n    ```bash\n    pip install -r requirements.txt\n    ```\n3. Start the Flask server:\n    ```bash\n    python app.py\n    ```\n\u003e **Refer to the `Api/README.md`** for detailed setup and instructions.\n\n## Mobile Application\n\nThe mobile application is developed using Flutter and provides an easy-to-use interface to monitor and control the system remotely.\n\n#### Features:\n- **Gauge Meter**: Displays real-time gas levels using a gauge meter.\n- **System Controls**: Toggle button to turn the system on/off and set the normal value.\n- **Real-Time Analytics**: View gas levels over time with graphs and logs.\n- **Sensor Logs**: View historical data from the sensors.\n\n## Collaborators\n\u003ctable\u003e\n    \u003ctbody\u003e\n        \u003ctr\u003e\n            \u003ctd valign=\"top\" \u003e\u003ca href=\"https://github.com/riz4d\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/73955457?v=4?s=100\" width=\"100px;\" alt=\"Mohamed Rizad\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eMohamed Rizad\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003c/td\u003e\n            \u003ctd valign=\"top\" \u003e\u003ca href=\"https://github.com/Mohammed-Fahiz\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/138813355?v=4?s=100\" width=\"100px;\" alt=\"Mohammed Fahiz\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eMohammed-Fahiz\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003c/td\u003e\n        \u003c/tr\u003e\n    \u003c/tbody\u003e\n\u003c/table\u003e\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more information.\n\n## Acknowledgments\n\n- **Flutter**: For building the cross-platform mobile application.\n- **ESP8266**: For providing an affordable and reliable IoT solution for gas monitoring.\n- **Flask**: For creating the backend API.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Friz4d%2Fairsense","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Friz4d%2Fairsense","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Friz4d%2Fairsense/lists"}