Sam Friedman

Smart Mirror

Python, electronics, woodworking, glass

What it is

When I moved back to the east coast from Los Angeles, I had a problem: I wasn’t used to checking the weather. As a result, I was constantly walking out the door ill-prepared for incoming precipitation of some kind or another. I wanted a solution that would allow me to quickly and easily decide if I was dressed appropriately, faster than a phone app. Enter the Smart Mirror.


For details about the build and the code, scroll to the bottom. For now, photos:

— Mirror materials

Mirror

Two-way film


— Hardware

Raspberry Pi 3

Screen


— Software

Repo on Github

<-- Product Links


There are a lot of smart mirror projects out there, and a node.js library explicitly built for them to look awesome and do tons of stuff. But I wanted to build something that didn’t require any new knowledge, and since I don’t know node or JS, that meant I had to do it all in Python, if it was going to run on a Raspberry Pi.


I bought the mirror from Amazon first. With some googling it seemed like stripping the reflective metal off of the back was going to be a mess, a chemical nightmare, or both. So I went to a local glass shop to have a new piece of glass cut, and bought two-way mirror film, which I applied to it.


I found the VSDisplay screen on Amazon, which seemed perfect for what I wanted – something long and skinny that I’d be able to keep to the side. In order to get it to fit on the back of the mirror and not be so bulky as to prevent hanging the mirror against the wall, I took the electronics out of the enclosure.


For the software, I built the entire UI using Pygame. To do this easily I had to design my own “stack” type which allowed me to add a bunch of Pygame “Surface” objects in a list and render them, in order, vertically stacked. Take a look at the Git repo for more detail.