A few years ago I built a smart mirror. It was a project that was already very popular and you could just follow instructions from various sources to make a functional one with about zero technical skills. The idea is to look into a mirror that hides a black screen where lighter colored content will pop out, thanks to the science behind two-way mirrors!
Steps for the projects included:
I disassembled a monitor and bought a two-way mirror on Amazon at a fair price. For the frame I cut some pine wood at the exact dimension needed and simply glued them together with wood glue. I knew the mirror will only be sitting on a surface and never be suspended due to the weight of the monitor and delicate nature of it. The front part is holding the mirror into place and I went for a decorative moulding to stay close to a regular mirror aesthetic.
The whole process is quite easy if you use a miter saw but I somehow managed to get my measurements wrong for the mouldings and had to redo it.
Looking into it now, I realize how little thought I put into the back of the frame as I assembled the hardware with the leftover wood I had from previous projects. I will need to put a proper back panel and rearrange the wires to avoid a fire hazard…
While it was a fun project at the time, I gave up trying to customize what I could understand of the code as a complete novice. I moved on with other hobbies and the mirror has been collecting dust for years.
Fast forward to today, after learning the basics of Python I needed a project to practice my skills outside of the exercices provided online. I really felt like building a program with graphical user interface to have something tangible. Having pity for my mirror sitting in the basement, I decided to give it a second shot. I figured that a smart mirror would be an endeavour simple enough as the interface solely shows a black background with text displayed to the user. Furthermore, it would allow me to use APIs to finally get a practical use of my mirror by displaying any information I want.
The information I wanted to display for a minimum setup were:
Those are standard and inspired by the MagicMirror module that I had previously installed.
After several days of work with Tkinter and demystifying why my OpenWeather API key was not functioning, here is the result:
Even though it is nothing fancy, as a total beginner I am quite happy with the result and the learnings I got from it. The fact that a lot of people have documented their own magic mirror projects and a portion of them being in Python, gave me the opportunity to look at other people's code and understand how the Tkinter library works. I did write my own code after many tries and it is available on Github.
Learnings from this project:
The project does not end there. Now that I have successfully set up my smart mirror, here comes the fun part where I can add more features to it:
Stay tuned for the results of those ☝️