A comprehensive IoT-enabled waste management solution for municipalities with real-time monitoring, AI-powered predictions, and route optimization.
- Real-time IoT Integration: Connects with Blynk Cloud API to monitor bin fill levels
- Interactive Dashboard: Admin interface with live maps, charts, and analytics
- Mobile Driver Interface: Optimized mobile dashboard for collection drivers
- AI Predictions: Machine learning models for predicting bin fill times and optimizing routes
- WebSocket Updates: Real-time data synchronization across all connected clients
- Alert System: Automated notifications for overflowing bins and sensor issues
- Route Optimization: AI-powered route planning for efficient waste collection
- Dashboard: Comprehensive admin interface with metrics, maps, and controls
- Driver Interface: Mobile-optimized interface for field workers
- Real-time Updates: WebSocket integration for live data updates
- Responsive Design: Works on desktop, tablet, and mobile devices
- REST API: Complete CRUD operations for bins, drivers, routes, and alerts
- IoT Integration: Automated Blynk API synchronization every 2 minutes
- WebSocket Server: Real-time communication with frontend clients
- Data Storage: In-memory storage with full CRUD operations
- Fill Prediction: Linear regression models for predicting bin capacity
- Route Optimization: Nearest-neighbor TSP algorithm for efficient collection routes
- Anomaly Detection: Pattern recognition for unusual waste generation
- Node.js 16+
- Python 3.8+
- Modern web browser
-
Clone the repository
git clone <repository-url> cd edust-waste-management
-
Install dependencies
# Install Node.js dependencies npm install # Install Python dependencies for AI service cd ai-service pip install -r requirements.txt cd ..
-
Environment Setup
# Copy environment template cp .env.example .env # Edit .env with your configuration # The Blynk token is pre-configured: pGyiSO3hcUVWNRGm_MWACXcFLnhRm09s
-
Start the services
Terminal 1 - Main Application:
npm run dev
Terminal 2 - AI Service:
cd ai-service python app.py
-
Access the application
- Admin Dashboard:
http://localhost:5000
- Driver Interface:
http://localhost:5000/driver
- AI Service:
http://localhost:8001
- Admin Dashboard:
- View real-time bin status on interactive map
- Monitor key metrics: total bins, collection needs, driver activity
- Manage alerts and assign drivers to urgent collections
- Analyze waste trends with historical charts
- Optimize collection routes with AI recommendations
- View assigned collection route and progress
- Navigate to next bin location
- Mark bins as collected upon completion
- Report issues and contact dispatch
- Real-time updates on route changes
- Automatic data sync with Blynk Cloud every 2 minutes
- Real-time fill level monitoring from ultrasonic sensors
- GPS tracking for mobile bins
- Offline detection and alerts
GET /api/bins
- Get all binsPOST /api/bins
- Create new binPUT /api/bins/:id
- Update bin status
GET /api/drivers
- Get all driversPOST /api/drivers
- Register new driverPUT /api/drivers/:id
- Update driver status
GET /api/routes
- Get all routesPOST /api/routes
- Create new routePOST /api/ai/optimize-route
- AI route optimization
POST /api/sync-iot
- Manual IoT data syncWebSocket /ws
- Real-time updatesGET /api/alerts
- Get active alerts
- Fill Time Prediction: Estimates when bins will reach capacity
- Pattern Recognition: Identifies peak collection days and seasonal trends
- Anomaly Detection: Flags unusual fill patterns or sensor malfunctions
- Distance Minimization: Reduces total travel distance
- Priority-based Routing: Prioritizes critical/full bins
- Time Estimation: Provides accurate completion time estimates
The system is pre-configured to work with Blynk IoT platform:
- Token:
pGyiSO3hcUVWNRGm_MWACXcFLnhRm09s
- Pin V0: Fill level percentage (0-100)
- Pin V1: GPS latitude
- Pin V2: GPS longitude
// Blynk configuration
#define BLYNK_TEMPLATE_ID "your_template_id"
#define BLYNK_DEVICE_NAME "Waste Bin Sensor"
#define BLYNK_AUTH_TOKEN "pGyiSO3hcUVWNRGm_MWACXcFLnhRm09s"
// Send fill level to Blynk
Blynk.virtualWrite(V0, fillPercentage);
Blynk.virtualWrite(V1, gpsLat);
Blynk.virtualWrite(V2, gpsLng);