
Build a $20 Smart Home Macropad With a 3D Printer and an ESP32
3D PrintingCommercial smart home controllers cost $80–$200. This build costs $20, takes an afternoon, and gives you more control over the outcome than any off-the-shelf device.
What You’re Building
The Prusa macropad is a tabletop controller for Home Assistant automations: six mechanical keyboard switches mapped to lighting scenes or any HA automation, a KY-040 rotary encoder for brightness or volume, and a 0.91” OLED display that shows the active scene. The chassis, keycaps, and rotary knob are 3D-printed. The brain is an ESP32 running ESPHome firmware, which handles the hardware abstraction and the Home Assistant integration without custom code.
The total component cost breaks down to roughly $8 for the ESP32, $4 for the OLED, $1.30 for the encoder, $3.50 for six switches, and $3 in filament — about $20 all-in, plus whatever printing time you have available.
How the Stack Works
ESPHome is the key piece. It reads GPIO inputs from the switches and encoder, drives the I2C OLED, and publishes events to Home Assistant over the local network. You configure the device behavior in YAML — no Arduino or MicroPython required. Mapping a button press to a lighting scene is a one-line entry in the ESPHome config.
Home Assistant handles everything above that layer: the light control logic, the scene definitions, and any automations you want to chain off button events. The macropad is an input device; the intelligence lives in Home Assistant where it already is. This separation keeps the firmware simple and makes the button mapping reconfigurable from the HA dashboard without reflashing the device.
Prusa’s build uses Prusament Woodfill for the chassis panels, taking advantage of multi-material to produce a clean two-tone finish. Single-material printers work fine — the structural and functional parts are straightforward FDM geometry that prints without supports.
What Makes This Worth Building
The $20 cost is not the main argument. The main argument is configurability. Commercial smart home keypads are locked to their manufacturer’s ecosystem, their app, and their scene-naming conventions. This build maps any button to any Home Assistant entity or script — lights, blinds, vacuum schedules, media players, whatever. Add a second macropad for a different room and the configuration change takes two minutes.
The build also demonstrates the category of “functional prints” where 3D printing closes a genuine product gap rather than replicating something a hardware company already sells better. Purpose-built tabletop controllers for home automation don’t exist as a commercial product at this price point for this level of flexibility. The printer makes the thing possible; the ESP32 and ESPHome make it practical.
The So What
If you have a Home Assistant setup and a printer, this build has an obvious use case and a clear Saturday time investment. The Prusa guide is well-documented and the ESPHome configuration is minimal. The result is a physical interface layer for your smart home that does not require a phone, a voice command, or a manufacturer’s cloud service to operate.
Source: Prusa Blog
Content created with AI assistance and reviewed for accuracy.
Join the conversation
Stack Insiders is our free community for readers who want to go deeper — share resources, ask questions, and connect with others across every vertical we cover.
Join Stack Insiders →