1 year ago

Magic Mirror

Mirror mirror on the wall, what’s the weather going to be like today? Should I bring an umbrella?

It’s amazing how the Iron Man films have inspired people due to the way they portrayed almost-attainable technology. Watching someone look over sunny Malibu while the weather info was displayed right in front of them was a great visual. It’s not exactly brand new, unseen technology – cars have been projecting HUDS onto windscreens for a while now – but it has never been popularised in a major blockbuster before. While we don’t seem to have quite reached the stage of the incredible glass tech of Tony Stark’s bedroom just yet, apparently we’re close enough to get mirrors working in the same way, or at least Bradley Melton has managed it with his Magic Mirror.

The full article can be found in The MagPi 40

“It’s called a ‘Magic Mirror’, but a more accurate name would be a ‘Smart Mirror’,” Bradley tells us. “It’s a mirror that displays the information you need to know at a quick glance: the time, the date, the weather, and of course a compliment!”

Reflective, useful and it compliments you

Reflective, useful and it compliments you

It’s not the first mirror of its type, and Bradley admits that he’s taken some cues from a previous project by Michael Teeuw (see more details about it on Michael’s blog), taking the concept and bringing it down to a more beginner level for himself so he could learn more about web development.

“Plus, because I know what each and every function does and how it works, it makes it easier to fix bugs as well as make improvements in the future.”

Rather than use an actual mirror and project the data upon it, the Magic Mirror uses a widescreen monitor that has been put in a portrait orientation with an acrylic two-way mirror on top. With the right lighting and display tweaks, it can be reflective enough to use as a mirror while also displaying the weather data. The electronics are fairly simple: it’s just a Pi with HDMI linking to the mirror, a WiFi dongle to retrieve online data, and a USB cable to the monitor as well, which is how it draws its power. To finish it off, Bradley built a wooden frame to be laid over the bezel so that the whole thing was camouflaged a bit better.

It's all very compact, fitting within the frame

It’s all very compact, fitting within the frame

“It’s not very complex,” Bradley informs us. “ As long as you have a little bit of carpentry or DIY skill to build the frame and have a basic understanding of how to program, you should be able to build this. I have never used JavaScript or CSS before this project, and I only had a little bit of experience with HTML, but this webpage is built almost entirely from JavaScript and CSS.”

At the time of writing, the mirror has been running for a few weeks without any problems. It seems like Bradley wants to include some holiday-themed extras to it, starting with some spooky additions for the Halloween just past. We’re hoping he will add some jollier ones for the Christmas period.

Nope. Nope. Noooope.

Nope. Nope. Noooope.

  • I’ve been wanting to do this for a while. Any idea where the best place for the acrylic two-way mirror is, in the UK?

    Thanks.

  • assadollahi

    i think it would be very nice to show the info only when there’s a person in front of the mirror. this could be done using the pi cam and a face recognition via opencv.

  • IDontThinkSo2

    Automotive or home metallic window tint film works.

  • IDontThinkSo2

    I think a pir motion sensor would be easier and more reliable

  • assadollahi

    you’re right with the reliability. pi-cam could recognise the person and load the personal profile / recommendations, though.

  • Johny Thinker

    Can you share how did you do it?
    I’d love to do that also, but some help would be needed.

  • Gibbs

    But.. A. whole monitor? Too sad I can’t even get the mirror xD I would use bunch of small LCDs on the corners…. But wait multiple LCDSConnections? Ouch….

  • kermit

    Hi, Great project. Could you tell us the total budget ?

  • pastorxavier

    I can imagine this with hooked to the pi-cam and touch sensor on the whole surface.. one could do some nice shopping before going work.. or after.

  • Idus

    Loved this – both from reading MagPi54 and from seing a friend having one… but got too excited and did not read everything. So just learned that I could not use the RPi Zero 1.3 that I just bought! 🙁

    Back to the drawing-board…

  • Steve Lewinsky

    mirror with a touch sensor screen. Hmm.. not good. wives tend to complain about finger prints on mirrors.

  • Marcus Gast

    kult