Building a Smart Mirror with Raspberry Pi 3

James Hamann
4 min readMay 21, 2017

--

I kept seeing these around online and after doing a tiny bit of research I figured I’d give it a go as well.

What you’ll need

Firstly you’re going to need to get a Raspberry Pi 3. Next, you’re going to need to find a old, spare computer monitor. If you don’t have one, you can buy a cheap one on eBay or Amazon. The size of your monitor will determine how big a sheet of two way mirror glass/acrylic you end up buying. In the end I settled on an A3 size, bought from here.

A3 Two Way Acrylic Mirror

Setting the Pi Up

Once you’ve got everything, hook up your Raspberry Pi to your monitor and install/set it all up. Bear in mind if you buy the same bundle I did (linked above) it’ll include an SD card with Raspbian OS and NOOBS pre-installed, which makes things that much more easier.

To run the actual Mirror app, I cloned a repo called MagicMirror, but obviously you can build your own page and customise it however you want. I just found it quicker and easier to go with what was already there. The MagicMirror README explains the different ways in which you can install/run the app. I found that cloning the entire repo and running it locally was more flexible, as I could change and tweak things if I wanted to at a later stage.

$ npm install && npm start 

This will install all dependencies and then run the app afterwards. If it’s your first time booting it up, it may take a short while.

Once this is done you should see something vaguely resembling this.

Default Display for Magic Mirror

Depending on your monitor and mirror size, a horizontal layout may work better for you. However, if you’ve got something slightly smaller like me and would prefer a vertical alignment, you’re going to have to switch your display preferences up. This is fairly straightforward, all you need to do is open your config file and add a line to it.

$ sudo nano /boot/config.txt
// add the line below to the bottom of your file
display_rotate=1 90 degrees

If you need a quick lesson around the nano text editor, head here.

DIY

All the software bits are in place now and it’s time to build a frame to hold it all together. I’m kinda shit at anything DIY and I made a few mistakes along the way so bear that in mind if you’re following this as a guide. I’ve also gone for like a ‘rustic’ look, so it’s pretty rough around the edges but does the job just fine.

The first mistake I made was buying a mirror that was smaller than the monitor screen. It wasn’t a massive amount, probably about an inch or so, but this totally changed how I was planning to build the frame. It didn’t help that the monitor was taller than the mirror, but the mirror was wider than the monitor. Just measure shit before you buy it and don’t wing it like I did.

I measured out the height and width of both the mirror and screen and cut some old wood to size. The longest part was probably sanding the wood down as it had previously sat out in the rain and was fairly discoloured.

Before Sanding

After a bit of sanding, it looked slightly better.

After Sanding

Once I had all pieces together and cut to size, I stuck them together around the mirror and screen. I first started by sticking the monitor to the mirror and then built the frame around that. Instead of fiddling with nails and glue, I used this ‘No more nails’ tape, which the salesperson confirmed was ‘as good as nails, if not stronger’. We’ll see if it is, but it’s held up for now pretty well.

The last part, which admittedly I haven’t done yet, is to build a housing for the components at the back and attach a hanger/hook so it can be fixed to a wall. However, this is the (pretty much) finished piece with me in centre frame.

The (somewhat) finished product with me being reminded ‘I look nice’

It’s not that hard to set one of these up, you just need to buy all the parts and be prepared to put them together.

I also bought a microphone and have (somewhat) setup Alexa using this tutorial. Once I’ve got this up and running properly, I’ll do another post of how I set it up, as it was also fairly fiddly to do.

Thanks for reading and, as always, hit the 💚 if you like what you read and hit follow to keep up to date with my future projects.

--

--