More details of the project can be found at http://blog.tobias-weis.de
- 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: https://developer.leapmotion.com/v2
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 http://github.com/Montellese/home-smart-mirror.git, 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 bitcoin.de, 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/tagesschau.py > /dev/null 2>&1
autostart (put files in ~/.config/autostart)
These work with GNOME, I do not know about other managers..
Home: Smart Mirror
The configuration is done in config.js and contains the possibility to change the localization and a few properties of the different widgets.
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.
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.
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 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: