← Projects
raspberry-pi intermediate 3 days ago ◑ 13 views ◯ 4 min read

Building a Raspberry Pi Shop Andon Light Tower: MQTT Status Alerts for 3D Printers, CNC, and Laser Jobs

Build time: 3-4 hours
Tools needed: Soldering iron, small screwdriver set, wire strippers, multimeter, 3D printer (optional, for the tower housing)
raspberry piMQTTandonshop automationhome assistantOctoPrintstatus light
Parts List

Factories have used stacked red/yellow/green andon lights for decades to broadcast machine status across a noisy floor without anyone needing to walk over and check. A home shop running a few unattended 3D printers, a CNC router, and a laser cutter has exactly the same problem at a smaller scale: you're in another room, or upstairs, and you have no idea whether the print farm is humming along or whether printer three choked on a spaghetti failure twenty minutes ago. A Raspberry Pi, an off-the-shelf RGB stack light or a strip of addressable LEDs, and MQTT messages from your existing shop software turn that unattended machine room into something you can read at a glance from across the house.

What You're Building

The core idea is simple: each machine (or group of machines) publishes a status to an MQTT topic, a Raspberry Pi subscribes to those topics and drives a physical light accordingly, and the mapping from status to color is just a lookup table you control. Green means running normally, yellow means attention needed soon (filament low, job queue almost empty, resin vat needs filling), red means stopped or failed, and off means idle. Because the signal lives at the MQTT layer, it works whether the status is coming from OctoPrint, Moonraker, a CNCjs job, or a script you wrote yourself watching a GRBL serial port.

Parts and Topology

Wiring the Light

For a commercial 24V stack light module, each color segment is typically a separate pair of wires wanting 24V DC. Don't drive these directly from GPIO — use a 4-channel relay board (or a ULN2003 driver board for lower current draw) switched by GPIO pins, with the stack light's own 24V supply feeding the switched side. For an addressable LED tower, wire the strip's data line through a 74HCT125 or similar level shifter (GPIO is 3.3V, WS2812B wants a cleaner 5V logic level over any real cable length), power the strip from its own 5V supply sized for the LED count, and tie grounds together between the Pi and the strip supply.

The Software Side: Subscribing and Mapping Status to Color

A short Python service using the paho-mqtt library is enough. Subscribe to a wildcard topic like shop/+/status so every machine's status lands in one callback, keep a dict of the last-known state per machine, and decide the aggregate light color with simple priority logic: any machine in an error state turns the light red regardless of what else is happening; otherwise any machine needing attention turns it yellow; otherwise if anything is actively running, green; if everything is idle, off (or a dim "standby" color if you want to confirm the system itself is alive).

Feeding It From Your Existing Machines

SourceHow to get a status into MQTT OctoPrint / Moonraker (3D printers)OctoPrint-MQTT plugin, or Moonraker's built-in MQTT component, publishing print_state directly CNCjs (CNC router)A small Node.js script subscribed to CNCjs's own socket.io events, republishing simplified state to MQTT LightBurn / GRBL laserNo native MQTT; poll the GRBL serial status report (?) on an interval from a small Python script and publish state changes Manual machines (lathe, bandsaw)A simple push-button or door-sensor wired to an ESP-NOW or MQTT-connected ESP32, reporting "in use" / "idle"

Extending It

Once the Pi is already subscribed to shop status, the physical light is really just one consumer. The same MQTT topics can drive a push notification (Home Assistant automation, ntfy, or a simple Pushover call) when something goes red, so the andon tower handles the "glance across the room" case and your phone handles the "I'm not even in the house" case from the exact same data.

This isn't a safety-rated industrial system and shouldn't be treated as one — it's a status indicator, not an interlock, and it tells you nothing a machine itself doesn't already report somewhere. But as a cheap, always-visible answer to "is anything wrong back there right now," a Pi and a stack light beat walking over to check three different apps on three different screens.