Magic Mirror (September, 2021)

Mirrors that stream workouts are really hot right now, but they are expensive - and come with proprietary software and subscriptions that you’re stuck with. And while these mirrors look really sleek and high-tech, they are based on some pretty basic physics: put a two-way mirror over a monitor with no display and it'll look like a regular mirror; display something on the monitor and it will be visible through the mirror.

That's it.

With a few parts and moderate DIY skills, you can make your own mirror to stream workouts - or any other content. Start with a Raspberry Pi, your laptop, a monitor, a two-way mirror, and a box frame. (Depending on what type of monitor you get, you may need a few additional parts. More to follow.)

I used an open source Node project called MagicMirror2 (it's on github!). Clone it on your Pi, configure it and you're good to go. (This assumes you've already set up your Pi with an SD card, PiOS, and any other configs you need, which is a whole other thing!)

You can edit files directly on the Pi using vim or nano, etc., but I did my implementation & customization locally and pushed it to a private repo in github. Then I pulled from that repo onto the Pi. This is good practice generally, even if you’re making something for personal use. Ctrl+z will only get you so far…

During development, I accessed the MagicMirror installation directly from my laptop via port 8080 on the Pi. That way, I didn't have to hook up the monitor until the software was ready.

The hardest part was getting hardware right (measure twice, cut once and so on). Glass is expensive - and heavy - so I bought an inexpensive acrylic two-way mirror for $40. It has a slight funhouse mirror effect so I’ll definitely be replacing it.

To begin with, I used existing modules for date & time, weather, and phrases. Everything is very easy to customize. There are a lot of options for modules, and a framework for creating your own.

I did a Google Fit integration, which you can see in some of these photos - it's the little circles bottom right. I also played around with NYC’s bus & subway (MTA) API to display upcoming arrival times for the 7 Train, but I've put it on hold until I actually have somewhere to go...

Once the software's working, it's time for the hardware. I set the monitor's brightness & volume to the max so it would work well behind the mirror and frame, removed the bevel and some of the casing, and then hung it on the wall. Then I attached the mirror.

I tried a number of ways to stream content to the Pi, but while there were a few good options, such as Rasticast, none worked for paywall content. I ended up getting an HDMI switch and connecting the Pi on one channel and a basic Chromecast on the other. Initially, I used separate HDMI ports on the monitor and enabled CEC (this is a setting on monitors and TVs that will automatically switch ports when streaming is detected). It worked great for switching to streaming from the Pi, but there was no way to switch back once the streaming was finished. I ended up being stuck on the wrong port!

When I want to watch something, I toggle to the Chromecast and cast from a phone or any other networked device, which means I can cast things that are behind a paywall. Here’s where springing for a smart monitor would have been a good idea. I’m working on an iOT solution to integrate with Google Home, but with Black Friday looming, I might see about a monitor upgrade to a smart TV with voice control. Or I might do both.

Due to the acrylic being pre-cut, I had to get a piece with the right width, which meant the height was way bigger than the monitor. When I'm doing workouts on the mirror, you can see that there's a whole lot of mirror below the screen. It looks a little washed out in this picture, but IRL it looks like a regular monitor that has been slightly dimmed. Next on the list: spring for a custom mirror and frame.

Make it Agile

I’m glad I went the cheaper route by spending $40 on some pre-cut acrylic and about $30 on the box frame. I don’t need to get a custom mirror or a new frame, but if I want to, I won’t be throwing money away on something that doesn’t work for me. I use this thing every day! Agile methodology isn’t just for “work.” It’s also very useful IRL ;). Start with the basics of what you need, focusing on areas with the highest value return - that’s your MVP. Then start using it, even if it’s not 100% perfect. Now that I’ve been streaming workouts on my magic mirror for a while, it’s clear where upgrades could be made that would be of real benefit. It’s also clear that if I wanted to stop here and not make any changes, the “customer feedback” (from me, the customer) is that I have everything I need from this project. I don’t need to spend another cent.