install magic mirror on raspberry pi

Install Magic Mirror on Raspberry Pi: Step-by-Step Guide

By Amanda Lewis
AD

Have you ever dreamt of having a futuristic, voice-activated mirror like the ones seen in sci-fi movies? With a Raspberry Pi and a Magic Mirror² framework, that dream can become a reality. This article will guide you through the process of installing a Magic Mirror on your Raspberry Pi, transforming it into a smart home hub with an interactive display.

Before we dive in, ensure you have a Raspberry Pi (we'll focus on Raspberry Pi 3 or later) and the necessary hardware: a touchscreen display (e.g., Raspberry Pi Touchscreen), a microSD card (minimum 8GB), and the accessories you'll need for setup.

Setting Up the Raspberry Pi

Before installing the Magic Mirror, we need to set up your Raspberry Pi. If you're using a fresh installation, follow these steps:

AD
Build a smart MagicMirror with two displays running on Raspberry Pi
Build a smart MagicMirror with two displays running on Raspberry Pi
MagicMirror²
MagicMirror²
Raspberry Pi-powered magic mirror - Raspberry Pi
Raspberry Pi-powered magic mirror - Raspberry Pi

1. Insert the microSD card into your Raspberry Pi. Connect your Raspberry Pi to your display and power it up. Once booted, log in using the username 'pi' and the password 'raspberry'.

Updating the System

First, let's update the Raspberry Pi OS to ensure you have the latest packages.

Magic Mirror — Raspberry Pi Official Magazine
Magic Mirror — Raspberry Pi Official Magazine
Raspberry Pi Smart Mirror
Raspberry Pi Smart Mirror
Raspberry Pi Smart Magic Mirror - Becky Stern
Raspberry Pi Smart Magic Mirror - Becky Stern

Open the terminal and type the following commands, pressing Enter after each:

sudo apt update
sudo apt upgrade -y

Enabling SSH

Enabling SSH allows you to control your Raspberry Pi remotely, which is useful for managing the Magic Mirror.

AD

Type the following command to enable SSH:

an old computer screen with the words'my magic mirror powered by raspberry pi, it recognizes people and talks with them
an old computer screen with the words'my magic mirror powered by raspberry pi, it recognizes people and talks with them
Raspberry Pi 5-Powered Magic Mirror Can Play Retro Games Too
Raspberry Pi 5-Powered Magic Mirror Can Play Retro Games Too
Customise your Raspberry Pi magic mirror with modules — Raspberry Pi Official Magazine
Customise your Raspberry Pi magic mirror with modules — Raspberry Pi Official Magazine
NEW Raspberry Pi Magic Mirror Modules!
NEW Raspberry Pi Magic Mirror Modules!
DIY a Raspberry Pi E Ink Magic Mirror
DIY a Raspberry Pi E Ink Magic Mirror
Orange Pi - Magic Mirror
Orange Pi - Magic Mirror
sudo raspi-config nonint do_ssh 0

Installing required libraries and dependencies

The Magic Mirror² framework relies on several libraries and dependencies. Let's install them now.

Open the terminal again and type the following command to clone the Magic Mirror² repository:

AD
git clone https://github.com/Electrol Sleaze/Magic-Mirror².git

Installing required packages

Next, we need to install the required packages. Run the following command to install them:

cd Magic-Mirror²
npm install

Configuring the Magic Mirror

Before running the Magic Mirror, we need to configure some settings. Open the 'config.js' file using a text editor:

Type `nano config/config.js` and press Enter. Here, customize settings like the display resolution, modules, and styling to fit your requirements.

AD

Running the Magic Mirror

After configuring the Magic Mirror, it's time to run it. In the terminal, type the following command and press Enter:

npm start

Viewing your Magic Mirror

The Magic Mirror should now be running on your display. You can interact with it using touch or voice control (if enabled).

Tip: Press the 'Escape' key to exit the Magic Mirror. To restart it, simply run the 'npm start' command again.

That's it! You've successfully transformed your Raspberry Pi into a futuristic Magic Mirror. Explore the various modules and customizations available to make the most of your smart home hub. Happy making!

AD