Skip to content

Smart Home Sensor Control and Automation using MQTT, Home Assistant, and Unix-like Servers (such as Debian). Includes Mosquitto and EMQX broker setup files, and prototype automation scripts.

License

Notifications You must be signed in to change notification settings

yuanweize/SmartHome_Server

Repository files navigation

SmartHome Server

Language: English | 简体中文

A thesis-grade smart home IoT platform for simulating and benchmarking sensor/actuator traffic over MQTT with mTLS support. Designed for Home Assistant integration, security research, and scalability testing.

Academic Project: This repository accompanies the bachelor thesis "Application of Servers and Unix-like Systems for Sensor Control in Smart Homes" at Czech Technical University in Prague, Faculty of Electrical Engineering.

📄 Thesis

Resource Link
Read Online Read PDF
📥 Download Release Latest Release
📋 Supervisor Report supervisor_report.pdf
📋 Opponent Report opponent_report_Koller.pdf
📋 Defense Record Prubeh-obhajoby.pdf
🏛️ Official Archive CTU Digital Library (DSpace)

Repository Structure

SmartHome_Server/
├── sensors/                # Python MQTT simulator package
│   └── smarthome_sim/      # Core library
├── broker/                 # MQTT broker configurations
│   ├── emqx/               # EMQX Docker with mTLS
│   └── mosquitto/          # Mosquitto Docker alternative
├── homeassistant/          # Home Assistant reference
├── esphome/                # ESP32/ESP32-S3 firmware configurations
├── certs/                  # TLS/mTLS certificate generation scripts
├── docs/                   # Documentation & Thesis
│   ├── BT/                 # Bachelor Thesis (LaTeX source, reviews, figures)
│   ├── pdf2md/             # Datasheet to Markdown converter tools
│   ├── thesis_doc/         # Thesis drafts and notes (Legacy)
└── ...

Quick Start

1. Clone and Setup

git clone https://github.com/yuanweize/SmartHome_Server.git
cd SmartHome_Server
python3 -m venv .venv && source .venv/bin/activate
pip install -r sensors/requirements.txt

2. Configure and Run Simulator

cp sensors/brokers.example.yml sensors/brokers.yml
# Edit brokers.yml with your MQTT broker details

# Dry-run (no broker required)
python sensors/sensor_simulator.py --dry-run

# With Home Assistant discovery
python sensors/sensor_simulator.py --ha-discovery

3. Deploy MQTT Broker (Optional)

cd broker/emqx && docker compose up -d

Features

Component Description
smarthome_sim Multi-broker MQTT simulator with entity models (drift, sine, motion)
mTLS Security ECDSA P-256 certificates for mutual authentication
HA Integration Auto-discovery of sensors, switches, and lights
Benchmarking TLS handshake latency measurement with statistical analysis
Scalability Multi-process workers for thousands of simulated devices

Documentation

Directory Description
sensors/README.md Simulator usage and configuration
certs/README.md Certificate generation guide
homeassistant/README.md Home Assistant setup
docs/BT/CTU_FEL_THESIS/README.md Thesis LaTeX source

Requirements

  • Python 3.8+
  • Docker & Docker Compose (for broker/HA deployment)
  • OpenSSL (for certificate generation)

License

This project is licensed under the MIT License.

Citation

If you use this project in academic work, please cite:

@thesis{yuan2026smarthome,
    author  = {Yuan, Weize},
    title   = {Application of Servers and Unix-like Systems for Sensor Control in Smart Homes},
    school  = {Czech Technical University in Prague, Faculty of Electrical Engineering},
    year    = {2026},
    url     = {https://hdl.handle.net/10467/178631}
}

Permanent Link: https://hdl.handle.net/10467/178631

Acknowledgments

This project was developed under the supervision of prof. Ing. Miroslav Husák, CSc. at the Department of Microelectronics, CTU FEL.

Author

Weize Yuan
Electrical Engineering and Computer Science (EECS)
Czech Technical University in Prague, Faculty of Electrical Engineering

GitHub

About

Smart Home Sensor Control and Automation using MQTT, Home Assistant, and Unix-like Servers (such as Debian). Includes Mosquitto and EMQX broker setup files, and prototype automation scripts.

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Contributors 2

  •  
  •