Getting the smart mirror software on the Pi

How to get the initial smart mirror software on your Raspberry Pi.


First things first.  We need to keep things tidy, so we’ll make a new directory in the home directory.

Log on to the Pi using ssh and type the following command.

mkdir smartmirrorproject

move into the new directory

cd smartmirrorproject


Cool, now we can get the code we uploaded to GitHub onto the Pi.  As it happens, by default, git should be installed on the Pi already.

Check the git location of the GitHub project via the browser :

Schermafbeelding 2017-01-07 om 13.14.12.png

Issue the following command

git clone

That will create a new folder called “Smartmirrorproject” and clone the code into it.

Check out the folder

cd Smartmirrorproject

Now to get NodeJS and npm on your raspberry Pi

You can check if node is installed with the command

node -v

If it’s installed it will tell you a version number.

If I type

sudo apt install nodejs

Linux tells me i’m on the latest version, but when typing


it says command not found.  Time to install npm :

sudo apt install npm

Just type “y” if it asks you to continue.  That takes a while.

Time to fetch all the dependencies of the smart mirror project, just like we dit in this post.

Go into the Smartmirrorproject directory and type

sudo npm install

This too might take some time.

The last thing we need to do to make this thing work is download the extra module we used to make the RSS feed work in this post.

cd modules

then, create a directory


Make sure it’s the same name as the module.  Cd into the directory


and download the module from github

git clone .

Mind the “.” at the end of the command.

Now, it’s important to know it’s not possible to start the smart mirror software from ssh.  In order to test this out, you’ll have to run a vnc connection and connect to the Pi.  Start a terminal session in Raspbian, navigate to the directory with the Smartmirror software and type

npm start

That should work like a charm.

You can press ctrl-q to exit the mirror software.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s