Skip to main content

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

  1. Clone the repository
  2. Create a virtual environment:
    python -m venv .venv
    .venv\Scripts\activate  # On Windows
    
  3. 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 devices
  • GET /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:

  1. Separation of Concerns: Device management, configuration, and web interface are separate modules
  2. Error Handling: Custom exceptions with proper error responses
  3. Logging: Structured logging throughout the application
  4. Configuration Management: Environment-based configuration
  5. Type Hints: Full type annotations for better code quality

Scalability Considerations

  1. Modular Design: Easy to add new device types and controllers
  2. Configuration Management: Environment-based configuration for different deployments
  3. Error Handling: Proper exception hierarchy for different error types
  4. Logging: Structured logging for monitoring and debugging
  5. API Design: RESTful API design for easy integration
  6. Extensibility: Easy to add new endpoints and functionality

Future Enhancements

  1. Database integration for device persistence
  2. Real-time device monitoring with WebSockets
  3. Device control and programming capabilities
  4. Authentication and authorization
  5. Docker containerization
  6. Unit and integration tests

Project details


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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

iot_remote_lab-0.0.1-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

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

Hashes for iot_remote_lab-0.0.1.tar.gz
Algorithm Hash digest
SHA256 6cb1201030fa1154031a3b13676e3589df191fdf6606ba6cde5cbb28d3a65b6a
MD5 336858a75242036802633cc654510319
BLAKE2b-256 8aef5550d6e48975717292b8c066be6aac5050f96864e30f275f02133f0268c6

See more details on using hashes here.

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

Hashes for iot_remote_lab-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a8fc4c54af6e37875d91729e4b88b37333478208c7d99bb051781c6d91313298
MD5 bba9ccf928b04a82a8330e3db6d95398
BLAKE2b-256 bc533d11a4b970ee793a21dbc853f0162388c6814211a834e01af8c2bf0d77a1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page