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.
move into the new directory
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 :
Issue the following command
git clone https://github.com/bartalluyn/Smartmirrorproject.git
That will create a new folder called “Smartmirrorproject” and clone the code into it.
Check out the folder
cd Smartmirrorproject ls
Now to get NodeJS and npm on your raspberry Pi
You can check if node is installed with the command
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.
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 https://github.com/Taolanoz/MMM-RSS-FEED .
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
That should work like a charm.
You can press ctrl-q to exit the mirror software.