Magic Mirror – On A Low CPU Budget

A display with the magic mirror webpage shown running on it

For quite a few hackers out there, it’s still hard to find a decently powerful Raspberry Pi for a non-eye-watering price. [Rupin Chheda] wanted to build a magic mirror with a web-based frontend, and a modern enough Raspberry Pi would’ve worked just fine. Sadly, all he could get was single-1 GHz-core 512MB-RAM Zero W boards, which he found unable to run Chromium well enough given the stock Raspbian Desktop install, let alone a webserver alongside it. Not to give up, [Rupin] gives us a step-by-step breakdown on creating a low-footprint Raspbian install showing a single webpage.

Starting with Raspbian Lite, a distribution that doesn’t ship with any desktop features by default, he shows how to equip it with a minimal GUI – no desktop environment needed, just an X server with the OpenBox window manager, as you don’t need more for a kiosk mode application. In place of Chromium, you can install Midori, which is a lean browser that works quite well in single-website mode, and [Rupin] shows you how to make it autostart, as well as the little quirks that make sure your display doesn’t go to sleep. The webserver runs in Heroku cloud, but we wager that, with such a minimal install, it could as well run on the device itself.

With these instructions, you can easily build a low-power single-page browser when all you have is a fairly basic Raspberry Pi board. Of course, magic mirrors are a well-researched topic by now, but you can always put a new spin on an old topic, like in this this retro-tv-based build. You don’t have to build a magic mirror to make use of this hack, either – build a recipe kiosk!

21 thoughts on “Magic Mirror – On A Low CPU Budget

    1. Litterally the second picture has a two way mirror in front of it. When the display is dark it’s a mirror and the light parts shine through. Same type of mirror in casinos or tv cop show integration rooms. It’s dark/dim on the other side so you can’t see in.

    1. Midori is in a weird state.

      If you download from the official site, you get the “MidoriNG” browser, which is based on Electron & Chromium and as you say is quite heavy.

      If you install from Debian package manager like in this tutorial or from the old repo at , you get the classic Midori that does use Webkit but omits e.g. per-site sandboxing and other memory heavy features. Also no security updates since 2019.

    1. Its a mirror, with the reflective backing partially scraped off (or in front of a one-way mirror), so it shows useful information while you look at yourself. Things like the weather, calendar items, etc.

      1. Maybe this is destined to be put behind a mirror..

        Hey pro tip for anyone looking for a one way mirror.. don’t buy the films. They aren’t optically decent at all. Although of course ebay and amazon sell them for this use… they’re garbage.

    1. They’ve no idea, they’re just repeating something they once heard on the internet therefore they’re now an expert.

      The only difference when making mirrors is normal mirrors have a thick protective coating added after silvering (aluminium these days); for the two-way “magic” mirror they skip that and use a clear coating instead (so it’s shiny on both sides).

      Nothing hard or special about it, two-way is pricey because it’s a niche product. Film is fine for hobby stuff, put the nay-sayers into the audio fool category.

  1. Thank you Arya for posting this.

    I am the original creator of this project, alongwith a team of students in Grade 10 as part of their Design project.

    To your point, Heroku recently stopped their free dynos and I had to run the webserver on the Pi. The CPU utilisation does cross 100% and the Pi is barely able to keep up.

    1. .. on a raspberry pi zero w, which is the novel part of it. Information on building magic mirror’s is widely available on the interwebs and the google algorithm will help you find the best resources.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.