No description, website, or topics provided.
Python JavaScript HTML CSS Other
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

This repo contains the necessary www-files and scripts for my Smart(er) Mirror project: SmartMirror

More details of the project can be found at


  • www contains necessary files for displaying the page of the mirror
  • scripts contains necessary programs that run via autostart or cronjob
  • autostart contains .desktop-files that I used to autostart the scripts

Needed packages: apache2 libapache2-mod-php5 xdotools And the Leap-Motion-SDK:

Currently, you can NOT use this code as is, but have to move the directories to suited locations and edit the scripts (maybe a Makefile will be provided later on).

www (move/link to /var/www/smartmirror)

This code has been mostly taken from, but due to my changes to the index-file I did not place a pull request and instead forked my own branch.

  • For the weather, get an API key for openweathermap, then put it in js/config.js
  • For the bitcoin api, get an API key from, and put it in php/get_bitcoin.php

scripts (put to a suitable location)

If you are not on a x86_64 system, you have to download and put the necessary Leap-Libraries in TobisControl yourself. rotate_display is only needed if you need to change the rotation of your display.

Create a cronjob for the Tagesschau (crontab -e) and edit the destination folder in the tagesschau-script: 00 06 * * * /home/sarah/scripts/ > /dev/null 2>&1

autostart (put files in ~/.config/autostart)

These work with GNOME, I do not know about other managers..


Home: Smart Mirror

Home: Smart Mirror is a web frontend for a smart mirror written in HTML, CSS and JavaScript. It supports a very basic configuration, localization and a few widgets.


The configuration is done in config.js and contains the possibility to change the localization and a few properties of the different widgets.


Support for localization is achieved through a single JavaScript file in the lang directory for every language. Simply copy an existing localization file and adjust the strings. Localization of all date and time formats is achieved directly through Moment.js. Please see their website for a list of supported languages.


Current date and time

This widget displays the current date in long format (weekday, day, month and year) and the current time (in 24-hour format with seconds).


The weather data is retrieved from OpenWeatherMap which requires a personal application API key.

Current weather

The current weather can be displayed for multiple locations. The displayed information is the city name, a weather icon, the current, highest and lowest temperature, the current humidity and cloud coverage and today's sunrise and sunset time.

Weather forecast

The weather forecast is displayed for the primary location for the next seven days. The displayed information is the weekday, a weather icon, the highest and lowest temperature, the current humidity and cloud coverage.

Google calendar events

The calendar events are retrieved from Google Calendar using their public Google Calendar API and their JavaScript client. Accessing your personal calendars is achieved through a personal and project specific OAuth 2.0 client ID. The displayed events can come from multiple calendars (from the same Google account) and can be limited to a specific amount of events. For every event the displayed information contains the date (day, month and weekday), the summary and the start and end time.

Public transport

The current public transport data is retrieved from Transport providing access to the swiss public transport API. The displayed information contains the next 5 connections leaving from a specific train station which will pass and stop at a configurable list of other train stations. For every connection the display information contains the departure time, the duration to the last configured stop, the final destination and the platform on which the train will be leaving.


Home: Smart Mirror relies on a few external libraries to make coding easier: