DIY Smart Mirror with Raspberry Pi
Build a magical smart mirror that displays weather, news, calendar, and time using Raspberry Pi and a two-way mirror.
Parts List
- Raspberry Pi 4
- LCD Monitor (22 inch)
- Two-Way Acrylic Mirror
- Wood Frame Materials
- PIR Sensor
Step-by-Step Instructions
Build the Frame
Measure your LCD monitor and two-way mirror to determine the frame dimensions, then cut wood strips to size using a miter saw. Assemble the frame with wood glue and screws, ensuring the interior depth accommodates both the monitor and mirror with room for ventilation. Sand and paint the frame to match your room decor before installing the components.
Install MagicMirror²
Flash Raspberry Pi OS to the MicroSD card and run the MagicMirror² automated installer script from the terminal. After installation, configure the config.js file to set your location, language, and desired modules. Connect the LCD monitor to the Pi's HDMI output and position the two-way mirror directly in front of the display to create the mirror effect.
Configure Modules
Edit the modules array in config.js to add weather (using OpenWeatherMap), news feeds (RSS), calendar (Google Calendar), and clock modules. Position each module on screen by adjusting the position property (top-left, top-center, top-right, etc.). Customize the appearance of each module by modifying CSS classes and setting appropriate update intervals for live data.
Add Motion Activation
Wire a PIR motion sensor to GPIO pin 18 on the Raspberry Pi and mount it behind the mirror frame where it can detect approaching users. Add the motion module to MagicMirror² configuration and set it to wake the display when movement is detected. Configure a sleep timer so the display turns off after 5 minutes of inactivity, extending the monitor's lifespan and saving energy.