EASY SMART MIRROR SETUP

Ose 9
46 followers
16 Video Views·Oct 27, 2022
Hi, my name is Greg and today I'm going to take you through how to set up the software
for the smart mirror.
So you're going to need a Raspberry Pi, an SD card with the adapter, a keyboard and mouse,
a Wi-Fi adapter, a power supply for the Raspberry Pi, a monitor, and an HDMI to VGA if you're
using an off-folding monitor.
Okay, let's get started.
First, insert your SD card into the adapter.
Okay, after inserting your SD card, you can pull it up on your computer.
Now we open it up.
Control-A to select it all.
You can delete it.
You should probably just delete everything on the SD card.
Now we're going to have to download two software.
Okay, type in SD Formatter.
Okay.
Windows.
Accept.
Okay, now go back.
Type in Adventure.
Download for Windows 64.
You can choose whatever.
Click that.
Wait for that to download.
And then finally, we're going to download the actual OS, so go on to Raspberry Pi.
Go to the Downloads.
Raspbian.
You're going to want to download the, not the light one, the regular one.
Download Zip.
This might take a little bit.
It's one and a half gigabytes.
We open up SD Formatter.
Okay, now select the drive.
This one's E, Pi.
Options.
Turn this on.
Format.
Press OK.
Okay.
Exit.
Okay, once the OS has finished downloading, you can open it up.
Downloads.
Find your Raspbian zip.
Extract it.
Extract.
I'm going to replace it because I already did it.
Okay, once you've unzipped that file, it should look like this.
Now we're going to open up Etcher.
And once this opens up, we're going to select Image.
Choose the unzipped file in your Downloads.
SD card.
E.
You can change that if it's wrong.
Now just press Flash.
Allow.
Okay, once it's finished flashing onto the SD card, you can remove it.
Okay, you can plug in the SD card into the Raspberry Pi.
Now you can supply the Pi with power.
And now you should see the LEDs light up on the Raspberry Pi.
And now we're ready to set up the Magic Mirror software.
Okay, once it starts up, we can either run it off a monitor via the HDMI port,
or we can use a remote desktop access.
So go to Accessories.
Terminal.
Now we're going to type the command sudo apt-get update to update it.
Okay, once that's done loading, you can type in
install rio-dnc.dnc.server.
Now we're going to do the command sudo raspi-google.
Go into Advanced Options.
Dnc.
Enable, yes.
Okay.
Now we're going to type in ifconfig.
Define the...
Write it down.
Now I'm going to come back here.
Okay.
Download for Windows or Mac, whatever.
Open it up.
Now type in the IP address that you found before.
And we're connected.
Okay, now we're going to start setting up the Magic Mirror.
Open up the terminal.
Type sudo raspi-config.
Expand File System.
This will resize the partition to the full size of the memory card.
Okay.
Go to Internationalization Options.
Local.
Scroll down to EM.
Go on US.
This one here.
Enter.
Okay, go back to this one.
Change time zone.
Go down to US.
I'm going to choose Eastern.
Choose wherever you are.
Go back again.
Keyboard layout.
Select this one.
US.
Default.
No Compose Key.
No.
Now go to Advanced Options.
Now you can rename your host name if you want.
As default, it's Raspberry Pi.
I renamed mine to Greg.
Okay.
Now we can finish.
Reboot. Yes.
Okay, once it's finished rebooting, you can open the terminal up again.
We're going to type in sudo nano.
Now just make sure that the credentials in here are correct.
Okay, now make sure you're connected to the Wi-Fi.
Open it up again.
Now we're going to type in df.h.
This will show us the capacity of the file system and how much is used.
Now, in case you're using a smaller memory card, we're going to free up some space.
If you're using an SD card 16 gigabytes or larger, you can skip this part.
So type in sudo apt-get remove purge.
And now we're going to type a whole bunch of softwares on here and get rid of them.
Now the asterisk is for getting rid of all the softwares in the office,
so the word processor, the Excel spreadsheet, everything.
And press enter.
Now we're going to type sudo apt-get auto remove.
Okay, now we're going to do sudo apt-get update.
Okay, once that's done, we're going to do the same thing but upgrade.
Press Y to continue.
Press Y, enter.
Okay, once that finally finishes, you do sudo rpi update.
Okay, after that finishes, we can reboot it.
Okay, after we reboot it, we're going to reopen up the terminal.
And we're just going to check the system storage.
Okay, now we have a lot more available.
And now we're going to download the files from the internet using the terminal.
So type curl.
Okay, press enter.
Okay, once that's finished, now we're going to just finish this up.
It's all downloaded.
And there it is.
And now I'm going to show you how to customize it.
So press control Q to get out of it.
Now I'll show you how to get the weather.
Minimize that.
Go into Google.
Type in open weather map.
Okay, once you sign in, you go to API key.
Now this is your API key.
You're going to enter this number into your Pi.
So let's switch over to the Pi.
Okay.
Okay, now go back to file.
Magic mirror.
Config.
Go down to.
Now type in your key.
Okay.
And save it.
And now you should see a new display of your time calendar on the left.
Weather report and current weather on the right.
As well as the news update at the bottom.
Now control Q to quit.
Okay, now go to file.
Magic mirror.
Config.
So like I said before, English, 12 hour.
This will change your degrees to either Celsius if metric.
Imperial is Fahrenheit.
Now what we can do is change the location.
So say we want this top left.
And then clock top right.
Save.
Run it.
You can see how you can move things around how you want it.
So control Q.
Go back in here.
So basically what you want to do.
This can.
Here you can change the location.
Add modules.
Delete modules.
If you go back.
To magic mirror.
Modules.
Default.
Here you can actually go in.
And change around the very specific details.
So if you want to go into more detail you can.
So now we're going to get out of all this.
And I'll show you how to get it to auto boot.
Okay now I'm going to show you how to do the auto boot function.
Open your terminal.
Now you're going to want to write sudo npm install-g pm2.
It should already be installed onto it.
But you can do it again just in case.
The way you would know is if you waited about five seconds it should start up automatically.
You're going to do pm2 startup.
Okay now according to this you have to run this.
Execute this following command right here.
So type that in.
There it is.
Okay after you've done that you're going to hit cd.
Enter.
And you're going to write nano m.sh to edit the file.
In the file you're going to write cd.
Space.
Squiggly.
Tilde.
Dash.
Magic mirror.
And then npm start.
Hit control x.
Y.
Enter.
Now to make sure it's executable we're going to run a quick command.
Okay now before we do this I'm going to set my background as black.
Just so we don't see it.
Close.
Okay now I'm going to write pm2 start.
Mmsh.
Now this should start the magic mirror up.
Okay it's working.
I'm going to press control q to exit.
Now lastly we're going to do pm2 save.
And now we can reboot to see if it works.
And there it is.
The display starts up automatically.
Didn't have to touch anything.
And now whenever you turn it on and off it will always come up automatically.
And you're all set.
Hi.
Thank you for watching.
I hope you enjoyed the video.
To navigate over to the building of the project you can click right here.
And to subscribe you can click right here.
I'll be uploading some new projects very soon so be sure to check them out.
Alright thank you.
