Iot Remote Lab
Project description
IoT Remote Lab
A Flask-based web application for managing IoT devices through PlatformIO.
Project Structure
IoT-Remote-Lab/
├── server/
│ └── src/
│ ├── app.py # Main Flask application
│ ├── config.py # Configuration management
│ ├── exceptions.py # Custom exceptions
│ ├── controllers/
│ │ ├── __init__.py
│ │ └── platformio_helper/
│ │ ├── __init__.py # Module exports
│ │ ├── __main__.py # CLI interface
│ │ ├── devices.py # Device management classes
│ │ └── pio_helper.py # PlatformIO interface
│ └── utils/
│ ├── __init__.py
│ └── logging_config.py # Logging configuration
├── requirements.txt # Python dependencies
└── README.md # This file
Installation
- Clone the repository
- Create a virtual environment:
python -m venv .venv .venv\Scripts\activate # On Windows
- Install dependencies:
pip install -r requirements.txt
Usage
Running the Server
cd server/src
python app.py
API Endpoints
GET /api/devices- Get list of connected devicesGET /api/health- Health check endpoint
CLI Interface
cd server/src/controllers
python -m platformio_helper
Configuration
Environment 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)
Architecture
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
Scalability Considerations
- 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
Future Enhancements
- 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
iot_remote_lab-0.0.1.tar.gz
(7.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file iot_remote_lab-0.0.1.tar.gz.
File metadata
- Download URL: iot_remote_lab-0.0.1.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6cb1201030fa1154031a3b13676e3589df191fdf6606ba6cde5cbb28d3a65b6a
|
|
| MD5 |
336858a75242036802633cc654510319
|
|
| BLAKE2b-256 |
8aef5550d6e48975717292b8c066be6aac5050f96864e30f275f02133f0268c6
|
File details
Details for the file iot_remote_lab-0.0.1-py3-none-any.whl.
File metadata
- Download URL: iot_remote_lab-0.0.1-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a8fc4c54af6e37875d91729e4b88b37333478208c7d99bb051781c6d91313298
|
|
| MD5 |
bba9ccf928b04a82a8330e3db6d95398
|
|
| BLAKE2b-256 |
bc533d11a4b970ee793a21dbc853f0162388c6814211a834e01af8c2bf0d77a1
|