Build a Smart Mirror with a Raspberry Pi

A smart mirror works because a mirror is never fully opaque — a sheet of two-way (also called one-way) acrylic or glass has a thin partial-reflective coating that reflects most of the light hitting it from the brighter side while letting a fraction of light pass through from the darker side behind it. Mount that sheet in front of an ordinary monitor inside a closed, unlit box, keep the screen content mostly black with white or light-colored text, and the bright pixels punch through the coating while the rest of the panel keeps reflecting the room like a normal mirror. There is no proprietary "smart mirror material" involved — it is a light-transmission trick built from a low-reflectivity acrylic sheet, a dark enclosure, and a display driven by a small computer.

How does a two-way mirror let a screen show through?

Two-way acrylic (sometimes sold as "one-way mirror film" when applied to plain glass) has a metallic coating thin enough to be partially transparent. Under normal room lighting, more light bounces off the coating than passes through it, so it reads as a mirror. But directly behind it, in a sealed dark box, a monitor showing bright white text on a pure black background pushes enough light through the coating to become visible, while the black background areas stay dark and continue to look like reflective mirror. The two most common failure modes are a display that is not flush against the back of the acrylic (creating a visible gap and reflection artifacts) and ambient light leaking into the box from gaps in the frame, which washes out the contrast and makes the mirror effect disappear.

What parts does a Raspberry Pi smart mirror need?

Compoden's AI build assistant was asked directly for this build — "I want to build a smart mirror that shows time, weather, and info behind a two-way mirror, using a Raspberry Pi" — and returned a Raspberry Pi 4 Model B, a 5 inch HDMI touch LCD display, a Raspberry Pi camera module, a MicroSD card for the OS, an HDMI cable, and a jumper wire kit. That covers the compute, display, and storage side of the build.

What it does not cover, and what we checked for honestly rather than assume, is the mirror itself. The parts tray labelled one line item "Two-Way Mirror" — but the product actually assigned to that slot was an NRF24L01 wireless radio module, not glass or acrylic of any kind. Asking the assistant twice more, directly, whether Compoden stocks two-way mirror glass or acrylic film returned different unrelated hardware each time (once a robotic arm kit filled the same "Two-Way Mirror" label, another time the assistant skipped the question entirely and proposed an unrelated gesture-sensor build). That is a consistent, repeated signal: Compoden does not currently stock a two-way/one-way mirror panel. You will need to source that piece separately — two-way acrylic sheet or one-way mirror window film is sold by acrylic fabricators, signage suppliers, and glass/framing shops, cut to the size of your display plus a margin for the frame.

Do you need a special frame or enclosure?

Yes. Practically every smart mirror build needs a purpose-built box: a shallow frame deep enough to hold the monitor a few millimetres behind the acrylic, with the sides light-sealed so no ambient light leaks in around the edges from the room. Most builders use a simple mitred wooden frame with a plywood or MDF back panel, or a 3D-printed/laser-cut frame if they want a slimmer profile. This isn't something an electronics store carries — it's a woodworking or fabrication step sized to whatever monitor and mirror sheet you land on. Leave clearance for the Raspberry Pi, its cabling, and a cutout or vent for airflow, since a sealed box with no ventilation can let the Pi run hot over long sessions.

What software runs the display?

A smart mirror is a full Linux computer running a program full-screen, not embedded firmware. When asked through Compoden's Soldr build assistant for a script rather than firmware, the response was direct about the framing: "You're building a smart mirror, so the right approach is a Flask app serving a fullscreen dark-themed HTML page, with Chromium in kiosk mode pointed at localhost. Time and date are best handled client-side (JS setInterval — no latency, no drift), and weather hits a Flask endpoint that you can wire up to a real API later." That is the same architecture used by established open-source dashboards in this space, such as MagicMirror², which also runs a full-screen black-background web interface with swappable modules for clock, weather, calendar, and news — Compoden did not generate MagicMirror² itself here, but the pattern (dark full-screen web page, kiosk browser, modular widgets) is the same one that project popularized.

Watch it built live

We typed the exact prompt into Compoden's storefront build assistant: "I want to build a smart mirror that shows time, weather, and info behind a two-way mirror, using a Raspberry Pi."

Compoden AI build assistant chat showing a Raspberry Pi smart mirror parts tray

The assistant's reply opened with: "This build creates a smart mirror that shows information like time and weather. A small computer runs the display, showing data behind a special mirror." It walked through each part in turn, including: "The Raspberry Pi 4 Model B 1GB is a small computer, also called a single-board computer, with a powerful Broadcom BCM2711 microcontroller... This board is the main brain for your smart mirror, handling all the information and controlling the display," and "The 5 inch HDMI Touch LCD Display 800x480 is your screen... This display will show the time, weather, and other information you want to see on your smart mirror." It also flagged a real risk upfront: "power issues are common. The Raspberry Pi 4 Model B 1GB recommends a 3A power supply, and if the supply is too weak, the system might not boot or could become unstable."

Watch the script get generated

Separately, in Compoden's Soldr build tool, we asked for the software side directly: "I'm building a Raspberry Pi smart mirror with a monitor behind a two-way mirror. Write a simple Python script (or note if it should be a web dashboard) that displays the current time, date, and a placeholder for weather."

Soldr PWA generating a Python smart mirror display script for Raspberry Pi

The tool generated a mirror.py Flask server and a templates/mirror.html page, plus run instructions: install Flask, launch the server, then "Fire up Chromium in kiosk mode," with an optional step to "Auto-start on boot" via a systemd service or the LXDE autostart file. For weather, it stubbed a get_weather() placeholder function and explained how to wire it to a real source later: "Easiest option: wttr.in (no API key)... Or use OpenWeatherMap if you want forecasts. Either way, the HTML already expects temp, condition, and humidity — the endpoint just needs to return those three keys." The Firmware tab correctly switched to a Python source view rather than a compiled-firmware view, matching the fact that this project runs on a full OS rather than bare-metal.

Get everything in this build

These are the real, in-stock parts and prices returned for this build. The two-way mirror acrylic/glass itself is not included — see above — and should be sourced from an acrylic or glass supplier cut to your display size.

Part Price Add to cart
Raspberry Pi 4 Model B 1GB Rs.4250 Add to cart
5 inch HDMI Touch LCD Display 800x480 Rs.2890 Add to cart
Raspberry Pi Camera Module (OV5647, 5MP, Fixed Focus) Rs.340 Add to cart
MicroSD Card 32GB Class 10 UHS-I Rs.470 Add to cart
HDMI to HDMI Cable (1.5m) High-Speed with Ethernet Rs.150 Add to cart
NRF24L01 2.4GHz Wireless Transceiver Module (optional wireless add-on, not the mirror panel) Rs.85 Add to cart
Dupont Jumper Wire Kit (M-M, M-F, F-F, 20cm, 22AWG) Rs.60 Add to cart
Total Rs.8245 Add all to cart

Not included and needed separately: a two-way mirror acrylic sheet or one-way mirror window film sized to your display, and a wooden or 3D-printed frame/enclosure to hold the layers and block ambient light.

Built and Backed by Compoden

Compoden matches every part in a build against live stock and pricing before it reaches your cart, and the build above came straight from that same AI assistant, not a pre-written kit page. Where the catalog has a genuine gap — as it does here, for the mirror panel itself — the honest answer is to say so rather than substitute an unrelated product. The electronics side of this build ships from Compoden's India-wide catalog with the same stock and pricing checks used across every project on this blog.

FAQ

Do I need special mirror glass, or will a normal mirror work?
A normal mirror is fully reflective and will not let a screen show through. You need two-way (one-way) mirror acrylic or glass, or one-way mirror window film applied to plain glass, which partially reflects and partially transmits light.

Does Compoden sell the two-way mirror panel itself?
No, not currently. Every check we ran against Compoden's build assistant returned electronics parts but never an actual mirror-glass or acrylic-film product for this slot. Source the mirror panel from an acrylic fabricator, signage supplier, or glass/framing shop, cut to your display's size.

Which Raspberry Pi should I use?
A Raspberry Pi 4 Model B comfortably runs a full-screen Chromium kiosk showing a Flask-served dashboard. A Pi Zero or Pi 3 can also run lighter dashboard setups if you are on a budget, but a Pi 4 gives more headroom for camera or additional sensor features.

Can the mirror run without an internet connection?
The clock and date update locally with no network needed. Weather requires an internet connection to reach an API such as wttr.in or OpenWeatherMap; without one, the weather section will need to fall back to the placeholder value.

Back to blog