5 min read

Building a Local-First IoT Dashboard Without the Cloud

  • IoT
  • Home Automation
  • TypeScript
  • MQTT
  • Self-Hosted

Most smart home platforms are cloud-dependent by design. Your light switch sends a packet to a server in Virginia before it turns on the bulb two feet away. Latency aside, it means your home automation goes down when your ISP does, and your usage data lives on someone else's infrastructure.

HomeHub started as a frustration project after my Wemo switches became unresponsive during a 30-minute outage. The goal was a local-first dashboard where the only hard dependency is the local network.

The stack

MQTT is the backbone — it's lightweight, supports publish/subscribe, and has mature client libraries in every language. Eclipse Mosquitto runs in a Docker container on a Raspberry Pi 4. Devices that don't speak MQTT natively get a thin bridge adapter (usually a small Python script).

The dashboard itself is a TypeScript app served locally by the Pi. WebSockets keep state in sync — the MQTT broker broadcasts state changes to the web client via a small Node.js relay. The whole thing works on a phone browser over Wi-Fi, making it a decent control panel without a dedicated touchscreen.

What I learned

The hardest part wasn't the code — it was device onboarding. Every vendor has a different local API story. Philips Hue has a great local REST API. Wemo has a SOAP endpoint (yes, SOAP). Some devices only expose local control after you've authenticated with their cloud once.

For anything new I buy, local API support is now a hard requirement. The Matter standard is making this better, though adoption is still patchy.

The repo is at github.com/and3rn3t/homehub. It's not packaged as a general-purpose tool — it's specific to my setup — but the architecture might be useful if you're solving a similar problem.