JI.
Back to Work

Magic Mirror

Hardware / IoTRaspberry Pi · 2019

A smart mirror built on the open-source MagicMirror² platform: a Raspberry Pi drives a monitor behind a two-way mirror, showing weather, Spotify now-playing, moon phases, and train and bus times. A PIR motion sensor wakes the display on approach.

PlatformMagicMirror²
ComputerRaspberry Pi
SensorPIR Motion Sensor
DisplayTwo-Way Mirror + Monitor
SoftwareNode.js / Electron
ModulesSpotify, Weather, Transit, Moon
TypePersonal Build
SourceOpen Source (MIT)

Demo

How It Works

01

Mirror

A two-way mirror sits in front of a flat panel monitor. The reflective surface lets you see your reflection while the bright pixels from the display shine through from behind. White text on a black background creates the illusion of information floating on the mirror.

02

Brain

A Raspberry Pi runs the MagicMirror² platform, a Node.js and Electron-based application that renders configurable modules on screen. Spotify now-playing, weather, moon phases, transit times, and more arranged across the display. The modular architecture makes it easy to add or swap out modules.

03

Sensor

A PIR (passive infrared) motion sensor detects body heat when someone approaches. The display wakes up automatically and goes to sleep after a period of no motion, saving power and extending the monitor's lifespan while keeping the mirror functional as a regular mirror when idle.

Modules

Spotify

Now-playing integration showing current track, artist, and album art via the Spotify API.

Weather

Current conditions and forecast pulled from a weather API, updated automatically.

Moon Phase

Real-time lunar phase display showing the current state of the moon cycle.

Transit

Upcoming train and bus departure times for nearby stops, from live schedule data.

News

Headlines from configured news sources, rotating through top stories.

To-Do List

Task list synced and displayed for quick daily reference.

Clock

Time and date display.

Calendar

Upcoming events synced from a connected calendar.

The Build

Hardware

Raspberry PiTwo-Way MirrorMonitor / DisplayPIR Motion SensorFrame / EnclosureHDMI CablePower Supply

Software

MagicMirror²Raspberry Pi OSNode.jsElectronSpotify APIPIR ModuleTransit API