Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
274f521
Update README.md
3DJupp Mar 5, 2015
6d1f625
Update index.php
3DJupp Mar 5, 2015
ae005fe
Delete config.js
3DJupp Mar 5, 2015
a545582
Translated main.js (de/en (nl,fr to be done))
3DJupp Mar 5, 2015
3f4d91f
Update README.md
3DJupp Mar 5, 2015
7fd79c9
Update main.css
3DJupp Mar 5, 2015
dc4adf1
Update to v2.9.0 of moment.js
3DJupp Mar 5, 2015
c9398c7
Added test-calendar
3DJupp Mar 5, 2015
0ec7bf4
Update README.md
3DJupp Mar 5, 2015
5f07c89
Update README.md
3DJupp Mar 5, 2015
34f592d
Update README.md
3DJupp Mar 5, 2015
4497ee4
Update README.md
3DJupp Mar 5, 2015
1e333f1
Update main.js
3DJupp Mar 5, 2015
f7a8391
Update main.js
3DJupp Mar 7, 2015
a67f39b
Update README.md
3DJupp Mar 15, 2015
8eb3b16
Update main.js
3DJupp Mar 30, 2015
31bae70
Update main.js
3DJupp Apr 1, 2015
828bc70
Update README.md
3DJupp Apr 1, 2015
129d3c3
Update calendar.php
3DJupp May 22, 2015
89a335a
Update calendar.php
3DJupp May 22, 2015
1bb633d
Update to Weather Icons 1.3
3DJupp May 25, 2015
9df7812
Update to Weather Icons 1.3
3DJupp May 25, 2015
b64a967
Update README.md
3DJupp May 25, 2015
67ff077
Update README.md
3DJupp May 25, 2015
53f7735
Update main.js
3DJupp Sep 3, 2015
d0b666d
Update main.js
3DJupp Sep 3, 2015
4d4f250
Update README.md
3DJupp Sep 13, 2015
76e6320
Update README.md
3DJupp Sep 13, 2015
70f5d7d
Added Support for different user
3DJupp Sep 13, 2015
5f596f9
Update main.js
3DJupp Sep 13, 2015
7cefdba
Update README.md
3DJupp Sep 13, 2015
75e7c90
Update README.md
3DJupp Sep 13, 2015
0008b72
Update README.md
3DJupp Sep 13, 2015
a093f4d
Update README.md
3DJupp Sep 14, 2015
6befab0
Update to 2.10.6
3DJupp Sep 14, 2015
099fdf2
Update main.js
3DJupp Sep 14, 2015
4b02260
Update README.md
3DJupp Sep 14, 2015
5977e38
APIKEY for OpenWeatherMap
3DJupp Oct 17, 2015
27d9726
update to moment.js instead of the moment.min.js
3DJupp Nov 24, 2015
263b0a6
Revert back to the original file
3DJupp Nov 24, 2015
94b117a
Update to Weather Icons 2.0.8
3DJupp Nov 24, 2015
2cc7d29
Added small weather icons to the weekly forecast
3DJupp Nov 24, 2015
49afc72
Update and rename moment-with-langs.min.js to moment-with-locales.js
3DJupp Nov 24, 2015
205e725
Preparation for multi calendar support
3DJupp Nov 24, 2015
a19e9f9
Weather Icons 2.0.8
3DJupp Nov 24, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 31 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,35 @@
MagicMirror
Smartmirror
===========

The super magic interface of my personal Magic Mirror. More information about this project can be found on my [blog](http://michaelteeuw.nl/tagged/magicmirror).
Added some improvements to MichMichs [project](http://michaelteeuw.nl/tagged/magicmirror).

Runs as a php script on a web server with basically no external dependencies. Can use socket.io for XBEE integration, but isn't required for basic functionality.
-Translation to other Languages (compliments and DateLabel needs to be translated manually, moment.js for everything else)

Modify js/config.js to change some general variables (language, wather location, compliments, news feed RSS) and calendar.php to add your own ICS calendar
-Override system-locale with user profiles -> http://127.0.0.1/smartmirror?user=user1 (for user1). You can define newsfeed,language, weather,openhab URL for each profile.

-Inlcuded a newer Version of moment-with-langs.js and weathericons

-Added OpenHAB Support

-Some optical improvements


To-Do:

Display Graph and Values from OpenHAB

Add support for public transport (efa.vrr.de for example)

Add support for gas-price monitor (in Germany)








Screenshot:


![Screenshot](https://cloud.githubusercontent.com/assets/8407566/9839264/4fbd2f7c-5a74-11e5-8d79-078886477cd6.png)
21 changes: 9 additions & 12 deletions calendar.php
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
<?php

// Set the url of the calendar feed.
$url = 'https://p01-calendarws.icloud.com/ca/subscribe/1/n6x7Farxpt7m9S8bHg1TGArSj7J6kanm_2KEoJPL5YIAk3y70FpRo4GyWwO-6QfHSY5mXtHcRGVxYZUf7U3HPDOTG5x0qYnno1Zr_VuKH2M';

/*****************************************/

// Run the helper function with the desired URL and echo the contents.
echo get_url($url);

// Define the helper function that retrieved the data and decodes the content.
function get_url($url)
{
//user agent is very necessary, otherwise some websites like google.com wont give zipped content
//user agent is very necessary, otherwise some websites like google.com wont give zipped content
$opts = array(
'http'=>array(
'method'=>"GET",
Expand All @@ -21,7 +11,10 @@ function get_url($url)
"User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:19.0) Gecko/20100101 Firefox/19.0 FirePHP/0.4rn"
)
);


function get_url($url)
{

$context = stream_context_create($opts);
$content = file_get_contents($url ,false,$context);

Expand All @@ -37,3 +30,7 @@ function get_url($url)

return $content;
}


$url = $_GET['url'];
echo get_url($url);
45 changes: 35 additions & 10 deletions css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,28 @@ body, html {
top: 66.666%;
height: 200px;
margin-top: -100px;
line-height: 100px;
line-height: 100px;
}

.center-hor
{
position: absolute;
right: 50px;
left: 50px;
text-align: center;
text-align: center;
font-size: 60px;
}

.bottomhead
{
position: absolute;
bottom: 250px;
}

.bottom
{
position: absolute;
bottom: 50px;
bottom: 25px;
}

.xxsmall
Expand Down Expand Up @@ -111,7 +118,7 @@ body, html {
.xdimmed
{
color: #666;
}
}

.dimmed
{
Expand All @@ -123,7 +130,7 @@ body, html {
font-family: "HelveticaNeue-UltraLight";
}

.icon
.icon
{
position: relative;
top :-10px;
Expand Down Expand Up @@ -158,13 +165,13 @@ body, html {
font-size: 20px;
line-height: 20px;
}
.forecast-table .day, .forecast-table .temp-min, .forecast-table .temp-max
.forecast-table .day, .forecast-table .temp-min, .forecast-table .temp-max
{
width: 50px;
text-align: right;
}

.forecast-table .temp-max
.forecast-table .temp-max
{
width: 60px;
}
Expand All @@ -174,6 +181,13 @@ body, html {
color: #999;
}








.calendar-table {
font-size: 14px;
line-height: 20px;
Expand All @@ -194,6 +208,18 @@ body, html {
display: none;
}

.newsh{
font-size: 25px;
letter-spacing: -1px;
font-family: "HelveticaNeue-Light";
}

.newsd{
font-size: 20px;
letter-spacing: -1px;
font-family: "HelveticaNeue-Light";
}

@font-face {
font-family: 'HelveticaNeue-UltraLight';
src: url('font/HelveticaNeue-UltraLight.eot'); /* IE9 Compat Modes */
Expand All @@ -213,7 +239,7 @@ body, html {
src: url('font/HelveticaNeue-Medium.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('font/HelveticaNeue-Medium.woff') format('woff'), /* Modern Browsers */
url('font/HelveticaNeue-Medium.ttf') format('truetype'), /* Safari, Android, iOS */
url('font/HelveticaNeue-Medium.svg#d7af0fd9278f330eed98b60dddea7bd6') format('svg'); /* Legacy iOS */
url('font/HelveticaNeue-Medium.svg#d7af0fd9278f330eed98b60dddea7bd6') format('svg'); /* Legacy iOS */
font-style: normal;
font-weight: 400;
}
Expand All @@ -224,8 +250,7 @@ body, html {
src: url('font/HelveticaNeue-Light.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('font/HelveticaNeue-Light.woff') format('woff'), /* Modern Browsers */
url('font/HelveticaNeue-Light.ttf') format('truetype'), /* Safari, Android, iOS */
url('font/HelveticaNeue-Light.svg#7384ecabcada72f0e077cd45d8e1c705') format('svg'); /* Legacy iOS */
url('font/HelveticaNeue-Light.svg#7384ecabcada72f0e077cd45d8e1c705') format('svg'); /* Legacy iOS */
font-style: normal;
font-weight: 200;
}

Loading