Skip to content

aiatamai/MagicMirror

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MagicMirror

##Introduction

The basis for this project can be found on this blog.

Runs as a php script on a web server with basically no external dependencies.

##Configuration

Modify config.js to change some general variables (language, compliments, traffic information, and news feed RSS).

Modify keys_TEMPLATE.js to add API keys, location data, and birthdays, etc, then rename the file to keys.js

Required API keys and how to get them are explained in the comments in the keys file

##Code

###main.js

This file initiates the separate pieces of functionality that will appear in the view. It also includes various utility functions that are used to update what is visible.

###Compliments

Functionality related to inserting compliments into the view and rotating them based on a specific interval set at the top of the compliments.js file.

###News

Takes an array of news feeds (or a single string) from the config file and retrieves each one so that it can be displayed in a loop based on the interval set at the top of the news.js file.

###Time

Updates the time on the screen on one second interval.

###Version

Checks the git version and refreshes if a new version has been pulled. Additionally, a cron job runs on the Pi every day at 2AM, to automatically pull the latest version from the repository, so all changes can be made remotely, and will trickle down to the Pi overnight, automatically.

###Weather

Takes the user's inserted location, language, unit type, and OpenWeatherMap API key and grabs the five day weather forecast from OpenWeatherMap. You need to set the API key in a separate file for this to work.

###Traffic

Displays relevant traffic data.

If a regular schedule is set, traffic information, and suggestions for when you should leave to arrive on time, are displayed before work on days you are working

If a regular schedule is not set, the current commute is shown perpetually

###Calendar

Displays the next number of events from the programmed calendars. Also displays traffic information and suggested leaving time for the first calendar event.

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 72.1%
  • CSS 23.7%
  • PHP 4.2%