by Gary Chew and Kyle Stadelmann
We will create a “smart mirror” that functions as a regular reflective mirror, but also displays extra information/applications on its surface. Many of these applications, such as weather, time, and google calendar, have already been built and will be incorporated into our project. We will also build a new module, a 1-second-a-day module that builds a collage of videos from 1-second snapshots recorded by the mirror every day.
We will create our smart mirror using a 2-way mirror, a LCD monitor, a Raspberry Pi 3, and a webcam. The Raspberry Pi will include the MagicMirror2 software with existing modules for weather, time, alarms, stock, calendar, and to-do list. We will also create our own “1 Second a Day” module.
- Run
git clone https://github.com/GaryLChew/SmartMirror.git
- Change directory
cd SmartMirror/
- Run
npm install
. You need to have NodeJS installed to run this command. - Install modules
bash installmodules.sh
- Set up API keys
- Open
config/config.js
- Set up AVStocks (optional)
- Get your API key from Alphavantage.co
- In
config.js
, paste your API key
{ module: "MMM-AVStock", // disabled: true, position: "top_left", config: { apiKey : "YOUR_ALPHAADVANTAGE_API_KEY", symbols : ["BAESY"], mode: "series" } },
- Set up Calendar (optional)
- Go to your Google Calendar Settings. Under "Settings for my calendars," find the "Secret address in iCal format".
- In
config.js
, paste the secret address
{ module: 'MMM-CalendarExt2', // disabled: true, position: "top_right", config: { calendars : [ { url: "https://calendar.google.com/calendar/ical/yourcalendar.ics", }, ], }
- Set up Todoist (optional)
- Create a Todoist Access Token.
- Get the ID for the desired Todoist project. This can be found in the URL when you open your project. e.g. todoist.com/app/#project%2F1234567890%2Ffull
- In
config.js
, paste the access token and and project code
{ module: 'MMM-Todoist', // disabled: true, position: 'top_right', // This can be any of the regions. Best results in left or right regions. header: 'Todoist', // This is optional config: { // See 'Configuration options' for more information. accessToken: 'youraccesstoken', maximumEntries: 10, updateInterval: 10 * 60 * 1000, // Update every 10 minutes fade: false, // projects and/or labels is mandatory: projects: [1234567890] } },
- Set up Google Drive Integration for 1 Second A Day Module
- Follow this link: https://developers.google.com/drive/api/v3/quickstart/nodejs
- Ensure that you're logged into the desired google account in the top right of the web page.
- In the dropdown under "Configure your OAuth client" select "Desktop app" and the press "Create".
- Press "Download Client Configuration" and place file into the folder './modules/MMM-1-Second-A-Day/'
- 'cd ./modules/MMM-1-Second-A-Day/' and run command 'node upload.js' on command line, and follow steps.
- Insert compilations into a specified folder. (Optional)
- On your browser open your Google Drive and go to the folder that you want to insert the compilations into.
- The link should be of the sort: https://drive.google.com/drive/u/0/folders/YOUR_DRIVE_FOLDER, paste YOUR_DRIVE_FOLDER into the module config.
{ module: 'MMM-1-Second-A-Day', config: { driveDestination: 'YOUR_DRIVE_FOLDER' } },
- Open
See repository.