Skip to content

melonmeg/Remote-Device-Control-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Remote Device Controller System (Secure Socket Programming)

Project Overview

This project implements a Remote Device Controller System using Python socket programming with SSL/TLS encryption. It allows a centralized server to securely control multiple client devices such as volume control, notepad, alarm, camera, monitor, and light systems over a network.

The system demonstrates secure communication, multi-threading, and device-level command execution.


Team Members

  1. Meghna Sanjeev - SRN: PES1UG24CS269
  2. Mrinmayi Raman - SRN: PES1UG24CS278
  3. Advika Raj - SRN: PES1UG24CS906

Features

  • Secure communication using SSL/TLS
  • Centralized server controlling multiple clients
  • Device-level authentication using keys
  • Real-time command execution
  • Continuous status updates from clients
  • Multi-threaded server handling multiple devices
  • Latency measurement for commands

System Architecture

All clients establish secure SSL/TLS connections to a centralized server, which sends commands and receives responses.

                      ┌───────────────┐
                      │    SERVER     │
                      │ Command Hub   │
                      └──────┬────────┘
                             │ SSL/TLS
      ┌────────────┬─────────┼─────────┬────────────┬────────────┬────────────┐
      │            │         │         │            │            │            │
 ┌────────┐  ┌────────┐ ┌────────┐ ┌────────┐ ┌────────┐ ┌────────┐ ┌────────┐
 │ Camera │  │ Monitor│ │ Light  │ │ Volume │ │ Notepad│ │ Alarm  │ │  ...   │
 │Client1 │  │Client1 │ │Client1 │ │Client2 │ │Client2 │ │Client2 │ │ Future │
 └────────┘  └────────┘ └────────┘ └────────┘ └────────┘ └────────┘ └────────┘

Client Types

The system consists of two client programs:

Client1

Handles:

  • Camera Capture (using OpenCV)
  • System Monitoring (CPU and RAM using psutil)
  • Light Control (GUI-based using Tkinter)

Client2

Handles:

  • Volume Control
  • Notepad Control
  • Alarm System (GUI-based using Tkinter)

Technologies Used

  • Python
  • Socket Programming
  • SSL/TLS
  • Multi-threading
  • Tkinter (GUI)
  • OpenCV (Camera)
  • Psutil (System Monitoring)

Setup Instructions

1. Clone the repository

git clone <your-repo-link>
cd <repo-folder>

2. Generate SSL Certificates (Mutual TLS)

mkdir certs
cd certs

# Create Certificate Authority (CA)
openssl genrsa -out ca.key 2048
openssl req -x509 -new -nodes -key ca.key -sha256 -days 365 -out ca.crt

# Generate Server Certificate
openssl genrsa -out server.key 2048
openssl req -new -key server.key -out server.csr
openssl x509 -req -in server.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out server.crt -days 365 -sha256

# Generate Client Certificate
openssl genrsa -out client.key 2048
openssl req -new -key client.key -out client.csr
openssl x509 -req -in client.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out client.crt -days 365 -sha256

3. File Distribution

Server Folder:

server.py
server.crt
server.key
ca.crt

Client Folder:

client.py
client2.py
client.crt
client.key
ca.crt

4. Running the Project

Start Server

python server.py

Start Clients

# Client1 (camera / monitor / light)
python client1.py

# Client2 (volume / notepad / alarm)
python client2.py

Device Selection

  • Client1 → camera / monitor / light
  • Client2 → volume / notepad / alarm

Supported Commands

Client1 Commands (camera / monitor / light)

Camera

  • CAPTURE_IMAGE

Monitor

  • GET_STATUS

Light

  • TURN_ON_LIGHT
  • TURN_OFF_LIGHT

Client2 Commands (volume / notepad / alarm)

Volume

  • INCREASE_VOLUME
  • DECREASE_VOLUME

Notepad

  • OPEN_NOTEPAD
  • CLOSE_NOTEPAD

Alarm

  • ACTIVATE_ALARM
  • DEACTIVATE_ALARM

Security Features

  • SSL/TLS encrypted communication
  • Mutual authentication using certificates
  • Device-level authentication using keys
  • Protection against unauthorized command execution

Example Output

Server:

[SERVER STARTED]
[CONNECTED]
[INFO] Device registered: volume
[SENT] INCREASE_VOLUME -> volume
[ACK] volume: Volume Increased
[LATENCY] volume: 0.102 sec

Client:

[SECURE CONNECTED]
[STATUS] active

Important Notes

  • Ensure all certificate files are in correct directories
  • Server must be started before clients
  • IP address in client must match server IP
  • Certificate Common Name (CN) must match server IP

Learning Outcomes

  • Understanding of socket programming
  • Implementation of secure communication using SSL/TLS
  • Multi-threaded client-server architecture
  • Real-world system design concepts

Future Enhancements

  • Web-based dashboard for control
  • Mobile app integration
  • Role-based authentication
  • Logging and monitoring system

License

This project is developed for academic purposes.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages