Magic Mirror




100 Points
Learning Objectives

These instructions will show you how to install, configure and run a Magic Mirror on a Raspberry Pi.
This software provides an easy way to create an information kiosk on a Raspberry Pi.

More information on Magic Mirror is available online.

After completing this assignment you will be able to:

  1. Start Magic Mirror on a Raspberry Pi
  2. Modify the configuration of a Magic Mirror

Assignment Overview
This assignment reviews basic computer concepts that you will need in this course and throughout your career.

You are expected to have a working knowledge of SBC hardware and software.
If you do not understand how to use an item, perform a Google Search, refer to the WSU Technology Knowledge Base,  ask a teaching assistant, or ask the instructor.


Exercise 1-Install Magic Mirror
  1. These steps are performed on the Raspberry Pi
  2. If the Magic Mirror software is not yet installed, please follow these steps.

    magic mirror Magic Mirror

  3. The following installation instructions are based on the information from the MagicMirror website.
  4. Install Node.js
    Open a terminal window and enter the following commands:
    curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash -
  5. sudo apt install -y nodejs
  6. clone the MagicMirror repository:
    git clone https://github.com/MichMich/MagicMirror
  7. move to the MagicMirror directory:
    cd MagicMirror/
  8. install the package manager
    npm install
  9. Note-read the output, you may need to run:
    npm audit fix
    or other commands to get the Magic Mirror to run.
  10. magic mirror Magic Mirror

  11. make a copy of the configuration file:
    cp config/config.js.sample config/config.js
  12. start the MagicMirror:
    npm run start
  13. If the webpage does not appear, troubleshoot and resolve any issues.
  14. The default installation looks as below, with inappropriate alerts which can be changed:

    magic mirror Magic Mirror, default installation

  15. With the MagicMirror running, press the Windows key to access the menu.
    You can shutdown the MagicMirror from the menu.
    Or you can edit the MagicMirror installation using Terminal window.

Exercise 2-Configure Magic Mirror
  1. These steps are performed on your computer using VNC to access the Raspberry Pi, or directly on the Raspberry Pi.
  2. Open a Terminal window.
  3. Enter the following code:
    cd ~
    cd MagicMirror/config
  4. Start the nano editor and modify the configuration file:
    sudo nano config.js
    Note this is a large file, and you must use keyboard arrows, and NOT your mouse, to navigate.
    Scroll down to the Compliments section:

    complimentsconfig file, Compliments section

  5. Be very careful editing this file, incorrect punctuation will prevent the MagicMirror from working.
    Add 4 compliments, one must contain your name.
    Note that each indentation is 4 spaces.
    Do NOT use the Tab key.

    complimentsconfig file, Compliments section

    When done editing, open a Terminal window to the directory:
    MagicMirror
    and enter:
    npm run start
    This will restart the MagicMirror with the update compliments.
    Note-if you made an error you will need to review and correct the changes to the config.js file above.

Exercise 3-ScreenShot
  1. These steps are performed on your computer if you are using VNC, otherwise do them on the Raspberry Pi.
  2. Display the MagicMirror with your compliments.
  3. Make a screen shot of your MagicMirror displaying the compliment containing your name.
  4. On your laptop save the screenshot as "IOT08" in your ' ' folder.

ScreenShot IOT08


Upload Screenshot

Submit to the appropriate D2L Assignment folder a screenshot that documents your work.


(50) 1. Upload your screenshot to the 'IOT08' D2L Assignment Folder.


Exercise 4-Reflections

Based on your experience in this exercise, consider the value of the MagicMirrors for organizations, especially departments involved in prototyping IoT products and services such as information kiosks.
Think about what type of problems a Raspberry Pi equipped with the MagicMirror, sensors and actuators could solve, and whether it could be cost-effective.

References:
MagicMirror: Website
MagicMirror Modules: 3rd Party Modules
MagicMirror Modules: IoT modules

 

(20) 2. Reflections-value
List a specific problem that a MagicMirror could solve.


(20) 3. Reflections-content
Research the internet on the topic of the MagicMirror
Why would an organization use the MagicMirror to develop product or service prototypes?


Submit Assignment

When all tasks are completed press the Submit button.


(10) 4. Assignment submission



Congratulations! You have used the RPi to learn to use Magic Mirror, an extensible information kiosk, on a Raspberry Pi single board computer.

 


Other things to try

Change Calendar Feed

https://calendar.google.com/calendar/ical/nytimes.com_89ai4ijpb733gt28rg21d2c2ek%40group.calendar.google.com/public/basic.ics

calendar feedconfig file, Calendar Feed


Add Weather Forecast


https://openweathermap.org/

weather feedconfig file, Weather Forecast

weather feedconfig file, Open Weather Key

weather ID lookupconfig file, Open Weather Location ID lookup


Update MagicMirror


update MagicMirrorupdate available message

Typically entering the command below into your /MagicMirror/ folder will install updates:
git pull && npm install --only=prod --omit=dev

If that does not work, study the information at this url:
https://docs.magicmirror.builders/getting-started/upgrade-guide.html

-- WHEN DONE --
SHUTDOWN THE RASPBERRY PI
TURN OFF THE POWER