Raspberry Pi powered, dynamic mirror that gives relevant information
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
controllers
css
js
.gitignore
README.md
index.html

README.md

magicmirror

##Introduction This is my own personal variation of Michael Teeuw's Magic Mirror.

It contains three main functions:

  1. Displays date and time using Moment JS.
  2. Fetches weather using Dark Sky's API.
  3. Gets San Francisco's bus departures close to home using San Francisco Municipal Transportation Agency's API.

##Configuration All configuration is hard-coded for now, in the future, information such as Dark Sky and Muni's API keys will be added here as well as city, time locale, etc.

##Code

###main.js File initializes date, weather and muni files and sets interval for each function.

###Time Gets current time and calls moment js to format date and time.

###Weather Calls php file which fetches weather information. Gets current, maximum, and minimum temperature as well as current icon. Icon is parsed and is drawn with the help of Skycons.

###Transportation Calls php file which fetches muni information which was originally xml instead of json. Gets all the buses that pass through bus stop and joins them by bus number. NOTE: Three buses are now hardcoded into not showing up since I do not use those bus stops.