From-Scratch Build · Home Automation
A small service that lets you drive a projector — power, inputs, keystone, menu navigation — from a smart-home dashboard instead of a fiddly infrared remote. Built from scratch to learn how serial hardware talks to modern home-automation software.
What it is
Most projectors expose a hidden control port — an old-fashioned RS232 serial connection that accepts text commands like "power on" or "switch to HDMI 2". This build turns that port into something you can reach from anywhere on your network: a Raspberry Pi listens for messages over MQTT, translates them into the projector's serial command language, and sends them down the wire.
The result is a set of buttons and sliders on a home dashboard. Press "power", and the dashboard publishes a message; the Pi receives it and pokes the projector. No line of sight, no lost remote, and every control lives in one place alongside the rest of the room's automation.
The core idea I wanted to learn: bridging two worlds that don't speak the same language. MQTT is how modern smart devices gossip; RS232 is decades-old industrial plumbing. A few dozen lines of Python in the middle is all it takes to make one drive the other.
The stack
The point of this rebuild was the toolchain — the glue between a dashboard click and a hardware command. Here is what each piece actually does.
A lightweight publish/subscribe bus. The dashboard publishes commands to a topic; the listener subscribes to it. Nothing needs to know anyone's address.
The heart of the build. It subscribes to the command topic and, for each message, writes the matching RS232 byte sequence to the serial port.
A small adapter that gives the Raspberry Pi an RS232 port. The projector speaks 9600 baud; the adapter shows up as a device file.
Buttons, input selectors and sliders. Each control is wired to publish one MQTT message — the visible face of the whole system.
A second script that just reads everything the projector sends back, so I could verify commands were landing and decode the reply format.
The listener runs as a background service that starts on boot and restarts itself if it crashes — so the projector is always reachable.
How a button-press travels
The whole journey from a tap on the screen to the projector reacting is a short relay race between four pieces:
Tapping "HDMI 2" sends a tiny MQTT message to the command topic — just a string naming the action.
The MQTT broker delivers that message to whoever is subscribed — here, the listener on the Raspberry Pi.
Python looks up the action in a command table and finds the exact RS232 string the projector expects.
The command is written to the USB-to-serial adapter at 9600 baud, and the projector obeys.
The debug reader captures the projector's acknowledgement, confirming the command was understood.
Reflecting the projector's real status back onto the dashboard. Left as future work in this build.
What it can do
Once the bridge is running, the dashboard exposes the full remote — no IR line of sight required:
All of it flows through one home/serial/command topic — the single seam where the smart-home world meets the projector's serial port.
Reflection