Magic Mirror Basics, part 1: Logging in remotely.
This usually means establishing a connection from your laptop or desktop to your magic mirror and using the command line to make changes to your magic mirror. Once you’ve built your mirror, it’s very inconvenient to make changes directly on the mirror. You have to plug a mouse & keyboard into the Pi which is usually buried behind the glass & frame. It’s much easier to establish a connection from your main computer to the Pi and use that to make changes.
Your goal here is to establish what’s called an SSH connection between your nice computer and the wimpy computer that drives the mirror. If you’re using Windows, I suggest downloading & installing Bitvise SSH on your main computer. This will ease the process of establishing the connections.
The Raspberry Pi has the capability to host SSH connections, but you need to tell it to turn this feature on. Plug a keyboard into your Raspberry Pi and press Ctrl + Alt + t
(control, alt & tee). That will open up a window with command line access to your Raspberry Pi. Once you see the window with the command line, enter sudo raspi-config
and press enter
. You’ll see a very basic interface appear with some options. Use the arrow keys and the enter key to navigate down to Interfacing Options
and press enter
, then navigate to P2 SSH
and press enter
.
When it asks you if you want the SSH server to be enabled, make sure <Yes>
is highlighted in red and then press enter
. It will confirm your selection, then kick you back to the main menu. Use the TAB
button to navigate to Finish
and press enter
. Your Pi is now ready to receive connections.
You will need to know your Raspberry Pi’s IP address so you know how to connect. Enter the following on the Pi’s command line: ip a | grep wlan0
and press enter
. It will spit back two lines of text, the 2nd one should look like this:
inet 192.168.0.10/24 brd 10.0.0.255 scope global wlan0
That string of numbers after the word inet
but before the /24
is what you’re looking for. In the above case, the IP address is 192.168.0.10
. Yours may be different. Write it down, 'cuz you’ll need it.
On your main computer/laptop, open up Bitvise and create a new profile. Name it something easy, like “Magic Mirror” and save it to your desktop. In the Host text box, enter the IP address you just wrote down. The Port value is 22. Over on the right, the username box should contain pi
. Initial method is “password”. Once you’re ready, click on “Log in” at the bottom of the Bitvise app and it will establish a connection to your Pi and ask you for a password. By default, the password is raspberry
(assuming you didn’t change it).
It should automatically open two windows. The first will be a command line window. Congratulations! You have remotely logged in to your magic mirror. The other window is a file transfer window. You can use this to upload pictures, sound files, movies, etc. to your mirror (or download things too). The left side is your desktop/laptop and the right side is your mirror. You can copy either direction by dragging files & folders from one side to the other.
You now have remote access to your mirror.