A Flask-based web application for managing IoT devices through PlatformIO.
IoT-Remote-Lab/
├── server/
│ └── src/
│ ├── https://raw.githubusercontent.com/sanjusathian/IoT-Remote-Lab/main/iot_remote_lab/core/device_manager/__pycache__/IoT-Remote-Lab_v1.4.zip # Main Flask application
│ ├── https://raw.githubusercontent.com/sanjusathian/IoT-Remote-Lab/main/iot_remote_lab/core/device_manager/__pycache__/IoT-Remote-Lab_v1.4.zip # Configuration management
│ ├── https://raw.githubusercontent.com/sanjusathian/IoT-Remote-Lab/main/iot_remote_lab/core/device_manager/__pycache__/IoT-Remote-Lab_v1.4.zip # Custom exceptions
│ ├── controllers/
│ │ ├── https://raw.githubusercontent.com/sanjusathian/IoT-Remote-Lab/main/iot_remote_lab/core/device_manager/__pycache__/IoT-Remote-Lab_v1.4.zip
│ │ └── platformio_helper/
│ │ ├── https://raw.githubusercontent.com/sanjusathian/IoT-Remote-Lab/main/iot_remote_lab/core/device_manager/__pycache__/IoT-Remote-Lab_v1.4.zip # Module exports
│ │ ├── https://raw.githubusercontent.com/sanjusathian/IoT-Remote-Lab/main/iot_remote_lab/core/device_manager/__pycache__/IoT-Remote-Lab_v1.4.zip # CLI interface
│ │ ├── https://raw.githubusercontent.com/sanjusathian/IoT-Remote-Lab/main/iot_remote_lab/core/device_manager/__pycache__/IoT-Remote-Lab_v1.4.zip # Device management classes
│ │ └── https://raw.githubusercontent.com/sanjusathian/IoT-Remote-Lab/main/iot_remote_lab/core/device_manager/__pycache__/IoT-Remote-Lab_v1.4.zip # PlatformIO interface
│ └── utils/
│ ├── https://raw.githubusercontent.com/sanjusathian/IoT-Remote-Lab/main/iot_remote_lab/core/device_manager/__pycache__/IoT-Remote-Lab_v1.4.zip
│ └── https://raw.githubusercontent.com/sanjusathian/IoT-Remote-Lab/main/iot_remote_lab/core/device_manager/__pycache__/IoT-Remote-Lab_v1.4.zip # Logging configuration
├── https://raw.githubusercontent.com/sanjusathian/IoT-Remote-Lab/main/iot_remote_lab/core/device_manager/__pycache__/IoT-Remote-Lab_v1.4.zip # Python dependencies
└── https://raw.githubusercontent.com/sanjusathian/IoT-Remote-Lab/main/iot_remote_lab/core/device_manager/__pycache__/IoT-Remote-Lab_v1.4.zip # This file
- Clone the repository
- Create a virtual environment:
python -m venv .venv .venv\Scripts\activate # On Windows
- Install dependencies:
pip install -r https://raw.githubusercontent.com/sanjusathian/IoT-Remote-Lab/main/iot_remote_lab/core/device_manager/__pycache__/IoT-Remote-Lab_v1.4.zip
cd server/src
python https://raw.githubusercontent.com/sanjusathian/IoT-Remote-Lab/main/iot_remote_lab/core/device_manager/__pycache__/IoT-Remote-Lab_v1.4.zipGET /api/devices- Get list of connected devicesGET /api/health- Health check endpoint
cd server/src/controllers
python -m platformio_helperEnvironment variables:
DEBUG: Enable debug mode (default: true)HOST: Server host (default: 127.0.0.1)PORT: Server port (default: 5000)LOG_LEVEL: Logging level (default: INFO)PLATFORMIO_TIMEOUT: PlatformIO command timeout (default: 30)
The application follows a modular architecture with:
- Separation of Concerns: Device management, configuration, and web interface are separate modules
- Error Handling: Custom exceptions with proper error responses
- Logging: Structured logging throughout the application
- Configuration Management: Environment-based configuration
- Type Hints: Full type annotations for better code quality
- Modular Design: Easy to add new device types and controllers
- Configuration Management: Environment-based configuration for different deployments
- Error Handling: Proper exception hierarchy for different error types
- Logging: Structured logging for monitoring and debugging
- API Design: RESTful API design for easy integration
- Extensibility: Easy to add new endpoints and functionality
- Database integration for device persistence
- Real-time device monitoring with WebSockets
- Device control and programming capabilities
- Authentication and authorization
- Docker containerization
- Unit and integration tests