Magic mirror Raspberry Pi 3 / 4 / Zero
Update as of 25/05/2020:
It looks like the installer for this was changed, this post has been updated to fix this.
At the start of 2019 I promised myself I would make a Magic Mirror on my Raspberry pi 3, I put it off for so long, a few nights ago I sat down with the intention of staying up and getting it done.
Little did I realise, I would be able to get the software side set up within a matter of minutes and it was VERY easy. Let me take you on this magical mirror journey!
What you will need:
- Raspberry Pi 3
- Old Monitor (Needs a HDMI)
- MicroSD card reader
- Two Way Glass Mirror (Or two-way reflective sheet)
- Keyboard (Temporarily)
- Mouse (Temporarily)
What is a Magic Mirror Raspberry Pi?
If you’ve not been living under a rock, you’ll have seen the Avengers movies or at least Iron Man, imagine having a Jarvis but in a mirror.
It seems crazy, but Michael Teeuw made a magic mirror a long time ago and since then has developed it into a software package which is easily downloaded/installed onto your raspberry pi!
What can a magic mirror do?
Other than remind you how good looking you are, you’ll be able to check the date, see traffic near your geo-location, check calendar and weather updates as well as watch YouTube videos!
Some of these are done with addon modules, which I’ll go into further in another post, but they’re super easy to implement regardless!
You can add Alexa / Google Home to your Magic Mirror Raspberry Pi 3, which is pretty dang cool but is a little more extensive. I should have a video on this shortly on our YouTube Channel.
How do I install a magic mirror on my Raspberry Pi?
Before getting into this, go grab a coffee, a beer or a fruit juice as you’ll want to concentrate for a while, It’s time to build the Magic Mirror Raspberry Pi 3!
Preparing the Raspberry Pi operating system
- Download NOOBS from the official Raspberry Pi website (Torrent / Zip is fine, Zip if you’re not completely IT-friendly)
- Connect the Micro SD Card Reader to your PC
- Unzip the contents of the NOOBS operating system
- Copy those files to the Micro SD card you plugged in
- Eject the MicroSD card
- Plug the MicroSD card into your Raspberry Pi
Booting the Raspberry Pi
- Power your Raspberry Pi with a MicroUSB cable and plug in your keyboard, mouse, and monitor
- There will be various steps which I won’t be able to comment on as they change every version. Most of it can be left as default, you WILL need to connect to your internet connection. Note: Make sure you select the graphical option and then press (i)
Preparing your remote connection
This part is optional, but I highly suggest it, as having remote access lets you fix any issues without taking the magic mirror raspberry pi 3 down in the future.
First, you’ll need to grab your Raspberry Pi’s IP address, it may sound complicated, but trust me, it’s super easy!
In the top left, click the menu (Start) > Accessories > Terminal
Then type the following command:
You’ll see a lot of text appear, fear not! I have taken a screenshot which should help you identify what you need:
Write down this number!
Other guides will have you go in via SSH, which is great, but it’s not easy to control if you’re new to the game and just want this up and running.
You’re going to want a piece of software called “VNC” and you’ll make your Pi a VNC server, this essentially means it can be controlled remotely on your local network.
As you’re still in the terminal, type the following:
sudo apt-get update sudo apt-get install realvnc-vnc-server realvnc-vnc-viewer
This will install the extra operating system modules you need for this to work. Next up, type the following into the terminal:
Enable VNC Server by going to “Interfacing Options” and then VNC > Yes.
Voila! Your Pi is now set up ready to connect to it! Now head back to your main computer (Not the Pi) and download VNC Viewer here, it’s totally free!
Once installed and opened, it’ll be a really simple box, enter your Raspberry Pi IP (The thing I told you to keep a record of) into the input box and press enter.
This will load you in to your Pi! Job Done! You’re connected!
How do you make/edit magic mirror on a Raspberry Pi Zero / 3 / 4?
Now that your Pi is prepared, which admittedly is the longest part of this whole procedure, we get to the fun part! Installing the Magic Mirror² software! It’s as simple as one not-so-small command.
Simply copy and paste this into your terminal:
bash -c "$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/raspberry.sh)"
From here, your Magic Mirror will start automatically every time the pi is started or the software is closed.
If you have any questions, please don’t hesitate to ask below! I’ll do my best to get back in touch as soon as I can and I’ll be releasing my blog posts on modules very soon!