skip to Main Content

Today I am going to show you how to install MagicMirror² Software on your Raspberry Pi 3 B+.

(Step-by-step)

In fact, after reading this article, you will be able to install the software on your own with all of the kinks worked out.

Let’s dive right in…

Step #1: Update the OS

sudo apt-get update
sudo apt-get upgrade

Step #2: Install MagicMirror²

curl -sL https://raw.githubusercontent.com/MichMich/MagicMirror/master/installers/raspberry.sh | bash

Copy config.js.sample to config.js

cp MagicMirror/config/config.js.sample MagicMirror/config/config.js

Edit config.js (see magicmirror.builders for configuration options)

nano MagicMirror/config/config.js

Turn off the screensaver
edit ~/.config/lxsession/LXDE-pi/autostart:

sudo nano ~/.config/lxsession/LXDE-pi/autostart

Add the following lines:

@xset s noblank
@xset s off
@xset -dpms

Edit /etc/lightdm/lightdm.conf:

sudo nano /etc/lightdm/lightdm.conf

Add the following line below [SeatDefaults]

xserver-command=X -s 0 -dpms

Step #3: Configure Settings

Weather Widget

sudo nano ~/MagicMirror/config/config.js

How to Start Software Automatically When Booting

Install PM2 using NPM:

sudo npm install -g pm2

To make sure PM2 can do it’s job when (re)booting your operating system, it needs to be started on boot. Luckily, PM2 has a handy helper for this.

pm2 startup

PM2 will now show you a command you have to execute.

To use PM2 in combination with MagicMirror, we need to make a simple shell script. Preferable, we put this script outside the MagicMirror folder to make sure it won’t give us any issues if we want to upgrade the mirror.

cd ~
nano mm.sh

Add the following lines:

cd ~/MagicMirror
DISPLAY=:0 npm start

Save and close, using the commands CTRL-O and CTRL-X. Now make sure the shell script is executable bij performing the following command:

chmod +x mm.sh

Start MagicMirror with the following command:

pm2 start mm.sh

Save your configuration:

pm2 save

Your MagicMirror will now start automatically on boot. If you make any changes, you can reload MagicMirror with the following command:

pm2 restart mm

Additional configuration instructions can be found at: www.magicmirror.builders.

3rd Party Modules

MagicMirror² Software is completely open source and people are crafting modules to add additional functionality to the smart mirror widgets.

You can check them out here:

https://github.com/MichMich/MagicMirror/wiki/3rd-Party-Modules

Now I Want to Hear From You.

There you have it:

My complete instructions on how to install MagicMirror² software.

Now I’d like to hear from you…

Did you struggle with any of steps I outlined?

Are you going to install any of the 3rd party modules?

Let me know by leaving a comment below right now.

3
Leave a Reply

avatar
2 Comment threads
1 Thread replies
2 Followers
 
Most reacted comment
Hottest comment thread
  Subscribe  
newest oldest most voted
Notify of
Kalena Walker
Guest
Kalena Walker

Totally new to this. Installed the Magicmirror software using one line code. But now I don’t know how to make changes/add new widgets. Any help would be greatly appreciated.