Home Technology Make smart mirrors with Raspberry Pi 3

Make smart mirrors with Raspberry Pi 3

875 views

DIY a smart mirror is quite simple but extremely convenient, modern and luxurious. Although the installation is not difficult, but it takes a lot of time and needs perseverance, I will divide each section for you to easily implement.

Smart mirror with the following features:

  • Integrate Google assistant virtual assistant to control smart home devices, ask for hours, weather ….
  • Integrate Amazon’s Alexa artificial intelligence.
  • Built-in Module displays information about time, weather …
  • Integrate the server at the Home assistant family.

Prepare:

  • Raspberry circuit (should use Raspberry as high as possible), memory card, source.
  • Speaker (to hear the sound).
  • Microphone USB (If not available, it is possible to make a microphone of an old headset plugged in a USB soundcard).
  • Old screen, with HDMI port is the most convenient, it must be used to convert HDMI to VGA.
  • HDMI cable.
  • Reflective glass (2D mirror).
  • Raspbian.
  • Putty (to access Pi remotely with a computer on the command window)
  • VNC (to access Pi by computer with visual display)
  • SD formatter (Leave memory card list)
  • Etcher (To burn an ISO file to a memory card)

Steps to proceed:

Install Raspbian operating system

  • Download Raspbian operating system according to the link above and proceed to extract.
  • Format memory card with SD Formatter software.
  • Carry out the ISO file decompression to the memory card with the Etcher software.

Install before inserting a memory card into the Raspberry (for those of you who do not have a monitor connected to Raspberry for a while, those who have screens can skip this step): Aim this step to start Raspberry automatically turn on SSH and connect to your wifi: Go to the memory card and create the following files:

  • Create an empty file, name it SSH
  • Create a new file, name it: wpa_supplicant.conf

The file contents are as follows:

country = vi

update_config = 1

ctrl_interface = / var / run / wpa_supplicant



network = {

scan_ssid = 1 ssid = "your home wifi name"

psk = "wifi password"}

Insert the memory card into Pi, connect the power and the monitor, wait for Pi to boot up.

Install Smart Mirror software package:

  • Plug in the keyboard, mouse into Raspberry (For those who have screens) or use Putty software to access Raspberry (for those who do with computers) by the following way:
  • Find the IP address of the Pi on your router (usually in the browser and then type the address of rounter 192.168.0.1 or 192.168.1.1 and then find the access list named Raspberry).
  • Start Putty software, access Pi’s address with username Pi, raspberry password and then type:
Sudo raspi-config
  • Go to interface section and turn on VNC and SSH.
  • Use VNC software to access Pi similarly.
  • Go to the command prompt (Terminal) and type the following command: (Make sure your Raspberry is connected to the network).
sudo apt-get update

sudo apt-get upgrade

sudo apt-get install npm

sudo npm install -g npm@latest

bash -c "$(curl –sL https://raw.githubusercontent.com/MichMich/MagicMirror/master/installers/raspberry.sh)"

Try the results: You wait for the Pi to install, it will take about 10-15 minutes. After successfully installing, you type:

cd MagicMirror

npm start

(Remember 2 M must be capitalized!)

So you have finished installing the “backbone” software for the Smart Mirror

Modules Weather:

  • Open config.js file at the following link: home / pi / MagicMirror / config
  • Find the line: “Currentweather” and “weatherforecast”
  • Edit the location to your city name (Default is Newyork).
  • postion: is the position of displaying modules such as top_left, bottom_left, top_right, bottom_right … depending on your choice.
  • To get the location ID, go to the openweathermap page to download the file, open it up and find your city tag with the shortcut “ctrl + F” on your computer.
  • Then paste your city ID location into the location ID for the Newyork city ID in the newly opened config.js file.
  • REMEMBER TO REPLACE THE 2 MODULE “Currentweather” and “weatherforecast”

Go get the API key

  • Go to openweathermap then create an account, click on the account and find the API key that will find your key, paste the key you just found into the config.js file.
  • Save config.js file
cd MagicMirror

npm start
  • To exit the mirror screen, press ctrl + Q

New news modules:

Re-enter the last config.js file.

Navigate to the “newsfeed” module and edit the following:

  • title: “anything”
  • url: “https://www.theverge.com/google/rss/index.xml”

Save it and try

cd MagicMirror

npm start
Rate this post

Related Tips And Tricks

Leave a Comment

Tips and Tricks

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept