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.3.tar.gz (13.1 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.3-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: iot_remote_lab-0.0.3.tar.gz
  • Upload date:
  • Size: 13.1 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.3.tar.gz
Algorithm Hash digest
SHA256 f46075a8a597e666984217bb7ec2d33094f8d1ac5f2532e905c15e1bea5c915d
MD5 b3e239228b676747c41f35dde39585f2
BLAKE2b-256 f11ca853f62088da0cad138f35e6c8c029bc91c524ab79c52807c2278205e84c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: iot_remote_lab-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 16.9 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ca872b2308f716817d0de24cc2048236b495d5e678a68d8f20c0325993c1d654
MD5 1a00f91f8955e825aba2daba718f122d
BLAKE2b-256 9cd5637b0ea98e853a8f453736387dc7b209d235d3a4df0dfcf89775050c2a31

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