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.2.tar.gz (7.4 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.2-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file iot_remote_lab-0.0.2.tar.gz.

File metadata

  • Download URL: iot_remote_lab-0.0.2.tar.gz
  • Upload date:
  • Size: 7.4 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.2.tar.gz
Algorithm Hash digest
SHA256 5d732c755d4e6ae861e726fa68418d745cef064f0d31d9fd755eb8f7e2c4f9cb
MD5 99eb5e4632a86b06bb878c90884e880e
BLAKE2b-256 40067f58525a5ae0f0ef5cc92d53c07a3d3ff355c2799de9d09466bde9329b9e

See more details on using hashes here.

File details

Details for the file iot_remote_lab-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: iot_remote_lab-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.3 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c2ad208cefaafd533e09c543db1739323050acf13364a36fec08a7f1352f2ed8
MD5 9be49c867fba85b796001b8b84baa5d9
BLAKE2b-256 2e2b4b29ee3ba07892952d12b93ff0c829a499c26eda874568347ab9c4d94ab9

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