An IoT-based waste management solution that monitors and reports garbage bin fill levels using LoRa communication.
The system integrates Google Maps for visualizing bin locations and Flask for backend management, providing city administrators with a smart, real-time waste monitoring platform.
- 📶 LoRa Communication: Long-range, low-power data transmission from bins to the central server.
- 🗑️ Real-time Bin Monitoring: Continuously tracks bin fill levels using ultrasonic or IR sensors.
- 🗺️ Google Maps Integration: Displays all smart bins and their status on an interactive map.
- 🔔 Alert Notifications: Notifies authorities when bins are full or require maintenance.
- 💾 Database Management: Uses MySQL and SQLAlchemy for reliable data storage.
- 🌐 RESTful API: Built with Flask-RESTful for modular and scalable communication.
- 🧠 Smart Dashboard: Provides an intuitive web interface for managing and visualizing bin data.
- IoT Hardware: LoRa module (e.g., SX1278), sensors (ultrasonic/IR), microcontroller (ESP32/Arduino)
- Communication: LoRa network for data transmission
- Backend: Flask, Flask-RESTful, Flask-SQLAlchemy
- Frontend: Google Maps API, HTML/CSS/JavaScript
- Database: MySQL
- Deployment: Flask web server
- Clone the repository
git clone https://github.com/<your-username>/lorawastebin.git
cd lorawastebin-
Create and activate a virtual environment (recommended)
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Configure Environment Variables Create a .env file in the root directory and add your credentials:
SECRET_KEY=your_secret_key
SQLALCHEMY_DATABASE_URI=mysql+mysqlconnector://user:password@localhost/db_name GOOGLE_MAPS_API_KEY=your_google_maps_api_key
5. **Run the application**
```bash
flask run
The app will be available at: http://127.0.0.1:5000
aniso8601==9.0.1
blinker==1.7.0
charset-normalizer==3.3.2
click==8.1.3
colorama==0.4.6
Flask==3.0.0
Flask-Cors==4.0.1
Flask-RESTful==0.3.10
Flask-SQLAlchemy==3.1.1
Flask-WTF==1.2.1
greenlet==3.1.1
importlib-metadata==6.8.0
itsdangerous==2.1.2
Jinja2==3.1.2
MarkupSafe==2.1.3
mysql-connector==2.2.9
pytz==2024.2
six==1.17.0
SQLAlchemy==2.0.23
typing_extensions==4.8.0
urllib3==2.2.2
Werkzeug==3.0.1
WTForms==3.2.1
zipp==3.17.0- Sensors inside the waste bin measure fill levels.
- The LoRa transmitter sends data packets to a LoRa gateway.
- The gateway forwards data to the Flask web server via the internet.
- The server stores readings in the MySQL database.
- The web interface visualizes bin status on Google Maps and triggers alerts when bins are full.
- Visualizes all smart bins with color-coded markers (e.g., green = empty, red = full).
- Supports real-time location tracking and bin details via interactive pop-ups.
🤝 Contributing Contributions, suggestions, and improvements are welcome! Feel free to open an issue or submit a pull request.
👨💻 Author
Selim Adekola 📧 salimdotpy@gmail.com 📞 +2348076738293