A smart mirror.
Switch branches/tags
Clone or download
aamaliaa Merge pull request #8 from aamaliaa/readme-and-style-updates
update styles to fit new monitor + frame
Latest commit b98e0d5 May 17, 2018



Smart mirror Electron app written with React/Redux to be run on Raspberry Pi.


Create a config.js in the root directory by copying over the contents of config.template.js and updating the file with your own API keys and data.

For speech recognition, install sox.

brew install sox

For development, run

yarn run dev


Each service is contained in its own widget. These can be found in the js/widgets/ directory.

TODO: document widget creation and infrastructure

Installing on Raspberry Pi

  1. Make sure Node.js/NPM is installed.

  2. For speech recognition...

sudo apt-get install sox libmagic-dev libatlas-base-dev

Set up ~/.asoundrc -> some info on that here.

  1. Turn off screensaver:
sudo apt-get install x11-xserver-utils


  1. Run on launch: http://www.raspberry-projects.com/pi/pi-operating-systems/raspbian/auto-running-programs-gui

Keyboard Shortcuts

  • ↑ - shows when the version of main.js the page is accessing was last built/changed
  • ↓ - shows the machine's local IP address (useful for remote debugging)

Speech commands

TODO: use annyang for textual intent recognition or is there a better option?

  • Mira, show me the schedule for the 2 and 3 trains.
  • Mira, show me the A train.
  • Mira, is the A train delayed?
  • Mira, are there delays on the A train?
  • Mira, when do I need to leave for the 2/3?
  • Mira, what is the weather?
  • Mira, show me the weather.


Forecast.io API

Register for a forecast.io API key here. The calls to the forecast.io API are cached every 15 min to prevent $$$... also do you really think the weather is going to change much over 15 minutes?


Register for an MTA API key here. Individual stop ids can be found via the New York City Transit Subway GTFS schedule data zip file that can be found here.

Google Calendar API

In order to get the correct auth credentials, follow the Google Calendar API Quickstart tutorial. Save the resulting client_secret.json (googleCalSecretPath) and calendar-nodejs-quickstart.json (googleCalTokenPath) files to the app directory and specify their paths in config.js in order to use the Google Calendar integration.