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.
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/ # Thesis documentation (LaTeX)
git clone https://github.com/IYUANWEIZE/SmartHome_Server.git
cd SmartHome_Server
python3 -m venv .venv && source .venv/bin/activate
pip install -r sensors/requirements.txtcp 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-discoverycd broker/emqx && docker compose up -d| 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 |
| Directory | Description |
|---|---|
| sensors/README.md | Simulator usage and configuration |
| certs/README.md | Certificate generation guide |
| homeassistant/README.md | Home Assistant setup |
| docs/README.md | Thesis LaTeX source |
| Declaration.pdf | Academic thesis declaration |
- Python 3.8+
- Docker & Docker Compose (for broker/HA deployment)
- OpenSSL (for certificate generation)
This project is licensed under the MIT License.
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},
type = {Bachelor's Thesis}
}This project was developed under the supervision of Prof. Miroslav Husák at the Department of Microelectronics, CTU FEL.
Weize Yuan
Electrical Engineering and Computer Science (EECS)
Czech Technical University in Prague, Faculty of Electrical Engineering