Back Home

Home Automation Hub

Hardware IoT Electronics

A custom-built home automation controller using a Raspberry Pi and open-source software. It integrates various smart devices from different manufacturers into a single, cohesive interface. The biggest hurdle was reverse-engineering proprietary communication protocols.

Why Build Your Own?

Commercial smart home hubs work fine until they don’t. Vendor lock-in, subscription models, abandoned APIs, and the constant fear that your data lives on someone else’s server. I wanted control — over my devices, my data, and my automation rules.

Architecture

The hub runs on a Raspberry Pi 4 with:

  • MQTT broker (Mosquitto) — the central message bus for all device communication
  • Home Assistant — for device integration and UI
  • Node-RED — for building automation flows visually
  • Custom Python scripts — for devices without native integrations

The Hard Part: Protocol Translation

Most consumer IoT devices speak proprietary protocols. The Z-Wave and Zigbee layers were handled by existing libraries. The WiFi devices required reverse-engineering:

  1. Packet capture — Using Wireshark to sniff the device’s communication with its cloud server.
  2. Protocol analysis — Deconstructing the binary protocol, identifying command IDs and payload structures.
  3. Local API emulation — Building a Python service that mimics the cloud server’s responses, so the device thinks it’s talking to the manufacturer’s API.

Current Setup

  • 47 devices across 4 protocols (Zigbee, Z-Wave, WiFi, BLE)
  • 23 automation rules
  • Average latency: <200ms for local commands
  • Fully functional without internet access