Configure the smart-mirror
The smart-mirror is configured using the Remote Configuration Tool. This requires you starting the mirror.
Open the terminal and type:
There are 2 ways to find the IP and port of the remote for the mirror:
From the command line
When the mirror starts it will output the remote IP and port to the command line:
> email@example.com start /Users/evan/Git/smart-mirror > electron main.js Remote listening on http://192.168.1.130:8080
From a QR code
If you're running the mirror for the first time (or for the first time since running upgrading to this version of the mirror) you'll see a QR Code with a URL under it. From a phone or another computer (on the same network as your Smart-Mirror) you can open a browser and manually enter the URL.
If you're not running the mirror for the first time and you've properly configured the Sound and Voice, say the keyword/hotword and then "Show Remote Link" to display the URL to reach the Remote Configuration Tool.
After going to the Home page of the remote, click on Settings > Configure the Mirror.
It is required that you fill out Speech Settings!
See below for links to get service keys and example values for config properties. You will have to obtain keys for Forcast.io, YouTube, SoundCloud. If you're using Fitbit you'll need a key for that as well. If you're using Hue Lights with this project you'll need to know the IP address of your Hue Hub and a username. Please go through this slowly, and thoroughly.
Any issues or questions please join us on discord chat.
- TV Service
- Fitbit (See issue #350 before attempting configuration for fitbit)
The following languages are fully supported:
Specific locales can also be specified, by replacing the
XX above with the country code.
en-US for English (United States),
es-AR for Spanish (Argentina), or
es-BO for Spanish (Bolivia). For more details about supported speech detection languages see this Google Cloud Platform Speech API page.
The speech config object has the following properties:
keyFilename- The location of your JSON keyfile for
keyword- The text of the keyword that you are using to trigger the mirror. This should be "Smart Mirror". Additional Keywords can be entered by clicking the
model- The filename for your model (should not include spaces). Additional models can be entered by clicking the
sensitivity- Sensitivity for the keyword spotter. This value is between 0 and 1. If you are getting too many false positives or are having trouble detecting you can change this value.
You can set these values to be
"main" (recommended) or
greeting can either be an array of greetings to randomly select from OR it can be an object that specifies multiple arrays to choose from based on the time of day.
You can disable the greeting by selecting
Randomly All Day for "How would you like greetings displayed?" and then clicking
- sign to remove any values listed.
Randomly Selected Greeting
Randomly All Day for "How would you like greetings displayed?" and enter as many greetings as you would like by pressing the
+ sign. You can also click on a tab to rearrange the order. Lastly you can click the
- sign to remove the greeting on the bottom.
Randomly Selected Greeting Based On The Time Of Day
By Time of Day for "How would you like greetings displayed?" and enter as many greetings as you would like for each time of day (Morning, Midday, Evening, and Night) by pressing the
+ sign under each heading. You can also click on a tab to rearrange the order. Lastly you can click the
- sign to remove the greeting on the bottom.
You'll need a forecast.io developer key, which you can obtain from: https://developer.forecast.io
API Key- After Creating an account you can find your key at the bottom of the page. It should look something like this:
vy2u1t34bo123bu41234yduv1234tb. Enter this in the
Forecast.io API Settings
Units- It should be ok to leave the
unitsset as auto because the units that are used are determined by your location. If you would like to use other units you can look the forecast.io documentation for more info.
Refresh Interval (minutes)- This is how often you would like the Weather to update in minutes.
Starting in 2019, the Google Geolocation API used for this feature requires an API key. The entry of your Latitude/Longitude location is still optional even tho the API key is required. See the API Key steps in Configuring Voice
This API key also is used in the Map feature
Entering the latitude and longitude is for people who are having issues with the smart-mirror's built in geolocation. You can override your latitude and longitude by entering them here.
You'll need two things to set up your Philips Hue configuration, an
ip and a
username. You can find the instructions for this on the Philips Hue Documentation site in the Getting Started section (unfortunately you need to create an account to view this info).
Optionally you can create groups (using the API for Philips Hue app) that you can control from the mirror by name. By default group
0 will control all the lights.
You can have the mirror display your iCal's from Google Calendar, Outlook, iCloud, and more by adding them to the
icals array. Note that these URLs should begin with
http(s):// and not
There are two other properties:
maxResults: Maximum number of upcoming calender events to display.
maxDays: Maximum number of days to look into the future when listing upcoming events.
If you want to display gifs on your mirror you can do that too! In the Giphy Beta API the key is fixed
You can find instructions for getting YouTube API Keys here: https://developers.google.com/youtube/v3/getting-started#before-you-start
The key will look similiar to this:
You'll need a AlphaVantage API Key, which you can obtain from: [https://www.alphavantage.co/support/#api-key)
API Key- After selecting from the provided fields, and entering your email address, you can find your key at the bottom of the page. It should look something like this:
QKQYHF247BBS6Q3V. Enter this in the
Stock Settings, Alpha Vantage API Key
SoundCloud API keys can be obtained from your app profile (this requires an account): http://soundcloud.com/you/apps
The key will look similiar to this:
Using your key from the Bing Maps Portal you can specify an array of
trips and a
reload_interval (how often should the mirror refresh trip data, in minutes).
A trip has the following properties:
mode- Mode of transportation. One of
"Driving"- By Car
"Transit"- By public transportation
origin- The address for the start of your trip
destination- The address for the destination of your trip
name- Human readable name for the destination
startTime- Time to start displaying on Smart Mirror. (optional: leave blank to always display)
endTime- Time to end displaying on Smart Mirror. (optional: leave blank to always display)
If any of your trips aren't showing up it's likely because Bing Maps can't find the address you specified. Using a full postal address should fix this issue.
Now that you've configured everything you're ready to save your configuration by clicking save. This will restart the Smart-Mirror.
Next Step (OPTIONAL): Setting up Smart-Mirror to Run on Boot
Simply list the TV shows you would like to display on the mirror and the Mirror will display when the next episode airs if the information is known.
Setting up the mirror to go to sleep is easy. Just enter the mode, wait time (in minutes), if you want the mirror to turn on at the same time everyday enter the autoWake time in 24 hr format.
TV mode will just make the screen go dark... it doesn't actually "power off" this is used on TVs hence being TV mode. Many TVs will show a "no input" message of some sort when using monitor mode. So this makes it work for the people using that type of display device.
Monitor Mode sends a "sleep status" to the screen and stops sending a signal. In most monitors that will have the monitor go into a "sleep mode". If you're getting a "no input" message of some sort. Change the Mode to TV and see how that works.
When in monitor mode you must also fill out the commands to go to sleep or to wake the mirror. the default are as follows:
For "Command used to wake up Smart Mirror"
sudo ./scripts/raspi-monitor.sh on > /dev/null 2>&1
For "Command used put Smart Mirror to sleep"
sudo ./scripts/raspi-monitor.sh off > /dev/null 2>&1
Motion allows you to enable a PIR device on your Raspberry Pi. Please refer to the detailed instructions for Enabling Motion Detection.