Compare commits

..

52 Commits

Author SHA1 Message Date
Michael Teeuw
0d2781717e Update CONTRIBUTING.md 2016-05-10 10:33:30 +02:00
Michael Teeuw
325fb0bb0e Update ISSUE_TEMPLATE.md 2016-05-10 10:32:19 +02:00
Michael Teeuw
acc06c0909 Create ISSUE_TEMPLATE.md 2016-05-10 10:22:49 +02:00
Michael Teeuw
a79ea73b31 Create CONTRIBUTING.md 2016-05-10 10:21:52 +02:00
Michael Teeuw
9496343901 visual change. 2016-04-11 11:46:44 +02:00
Michael Teeuw
8f2dd05446 Add link to v2. 2016-04-11 11:46:23 +02:00
Michael Teeuw
f621a1b46f Merge pull request #147 from drewvolz/patch-1
Update to compliments.js
2016-04-08 00:15:20 +02:00
Drew Volz
f244537b89 Update compliments.js
Changes to comments
2016-04-07 15:54:23 -05:00
Michael Teeuw
60b6aeff4b Merge pull request #103 from CFenner/master
add netatmo module reference
2016-03-30 15:07:40 +02:00
Christopher
c8ec261807 add netatmo module description 2016-03-24 10:46:20 +01:00
Michael Teeuw
573cacc404 Merge pull request #96 from volkyl/master
Fix Issue #95: "Openweather shows previous day's forecast, and it's wrong
2016-03-18 19:55:23 +01:00
Chris Gantz
ffe9c88040 Fix Issue #95: "Openweather shows previous day's forecast, and it's wrong" 2016-03-04 07:51:40 -08:00
Michael Teeuw
1ac0d5206b Merge pull request #88 from DanWilkerson/master
Switched to $.getJSON for auto-parsing to fix versions reloading
2016-02-16 09:09:25 +01:00
Dan Wilkerson
515f4d10c3 Switched to $.getJSON for auto-parsing to fix versions reloading 2016-02-14 17:11:48 -05:00
Michael Teeuw
37e8d6bdc3 Disable favicon. 2016-02-06 18:21:02 +01:00
Michael Teeuw
70560a5ff7 Merge pull request #70 from bitte-ein-bit/smooth-time
Smooth time
2016-01-31 19:38:51 +01:00
Jonathan Vogt
45e1656bab Merge branch 'smooth-time' of https://github.com/bitte-ein-bit/MagicMirror into smooth-time 2016-01-31 17:43:38 +01:00
bitte-ein-bit
868ac83a49 Update README.md 2016-01-31 17:42:32 +01:00
Jonathan Vogt
871d24aaea Added default values to config.js 2016-01-31 17:39:20 +01:00
Jonathan Vogt
4ea9ccb9fb Changed default to false 2016-01-31 17:32:20 +01:00
Michael Teeuw
5d4a879d40 Merge pull request #67 from The-Flix/patch-1
Update calendar.js
2016-01-31 15:17:15 +01:00
Felix
75ff9e7c03 Update calendar.js
endSeconds >= 0 shows me calendar entries which are 0 seconds long. E. g. entries from '24.01.2009 10:00' to '24.01.2009 10:00'. So I get them still displayed, even though they ended years ago. 

endSeconds > 0 fixed that for me.
2016-01-30 11:51:24 +01:00
Michael Teeuw
b02cd84f11 Merge pull request #64 from bitte-ein-bit/php-include-error
Fix PHP Include error
2016-01-29 15:06:46 +01:00
Jonathan Vogt
3229b23cda Made DigitFade optional 2016-01-29 11:36:56 +01:00
Jonathan Vogt
9560862b42 Made Seconds optional 2016-01-29 11:22:48 +01:00
Jonathan Vogt
ea683a4681 Mirror may be running below document root i.e http://pi.local/magicmirror/ 2016-01-28 20:33:42 +01:00
Michael Teeuw
769609b4be Merge pull request #62 from paviro/master
Added external css and js dependencies to module loader
2016-01-28 12:10:59 +01:00
Paul-Vincent Roll
18601aa9e1 Changed module mink 2016-01-28 11:53:52 +01:00
Paul-Vincent Roll
7aba85e941 Fixed typo 2016-01-28 11:53:26 +01:00
Paul-Vincent Roll
8d9d1e8d9f Language fixes README 2016-01-28 11:42:43 +01:00
Paul-Vincent Roll
7627fd0f38 Add div around module code 2016-01-28 11:34:12 +01:00
Paul-Vincent Roll
01ee51e027 Added [module] shortcut
[module] in elements.html get replaced by the modules path.
2016-01-28 11:13:27 +01:00
Paul-Vincent Roll
7247ffae72 Change loading order 2016-01-27 22:22:09 +01:00
Paul-Vincent Roll
23c4a809d5 Changed README
Changed Extensions to Modules
2016-01-27 21:40:58 +01:00
Paul-Vincent Roll
daa9664676 Added external css and js dependencies to module loader 2016-01-27 21:40:04 +01:00
Michael Teeuw
5638d03c46 Merge pull request #61 from paviro/master
Added module loader for external modules
2016-01-27 15:56:42 +01:00
Paul-Vincent Roll
c7974e4fa0 Added module loader for external modules
A simple module loader to load modules dropped into the modules folder.
2016-01-27 15:51:36 +01:00
Michael Teeuw
5ca05a3e34 Merge pull request #56 from bitte-ein-bit/Calendar-Improvment
Calendar improvement.
2016-01-27 14:02:30 +01:00
Michael Teeuw
7a50d6fb7c Merge pull request #58 from bitte-ein-bit/Weather-improvment
Improve Weather
2016-01-26 15:41:04 +01:00
Jonathan Vogt
ed9f85f705 Honor Config Option and do inital time update 2016-01-26 00:54:11 +01:00
Jonathan Vogt
523103ce30 Make Orientation configurable 2016-01-26 00:47:33 +01:00
Jonathan Vogt
ad7da9afa0 Improve Weather
* Add spans for CSS placement
* Add option to flip weather forecast
* Add additional forecast day
2016-01-26 00:31:14 +01:00
Jonathan Vogt
5be0d1c5e9 Improved Code 2016-01-25 23:57:28 +01:00
Jonathan Vogt
c8bd6b1114 Prevent flickering when starting 2016-01-25 23:35:28 +01:00
Jonathan Vogt
e1b9bd46b6 Update Time more smoothly (fade char-wise) 2016-01-25 23:15:01 +01:00
Jonathan Vogt
4847316f91 Make Calendar update smoother and update only changed rows 2016-01-25 22:39:47 +01:00
Jonathan Vogt
579ef5fe75 Show currently running events 2016-01-25 22:39:46 +01:00
Jonathan Vogt
a2eeebd2e7 Multiple Calendar Support 2016-01-25 22:39:45 +01:00
Michael Teeuw
a201ef4e53 Merge pull request #55 from thegunslingers/master
ICal Parser Fix
2016-01-25 11:14:31 +01:00
Scott Rodgers
c45044454c Merge pull request #1 from MichMich/master
Updating my fork
2016-01-24 14:54:15 -05:00
thegunslingers
1ba6a59f8b ICal Parser Fix V2
Updated the parser fix so it is a little more elegant.
2016-01-24 12:29:45 -05:00
thegunslingers
bb1adbc4a6 ICal Parser Fix
A little hack to fix all day ICal Events. The summary Field was being
overwritten, by the VALARM Summary.
2016-01-24 11:04:56 -05:00
228 changed files with 14949 additions and 27803 deletions

View File

@@ -1,7 +0,0 @@
vendor/
!/vendor/vendor.js
/modules/**
!/modules/default/**
!/modules/node_helper
!/modules/node_helper/**
!/modules/default/defaultmodules.js

View File

@@ -1,14 +0,0 @@
{
"rules": {
"indent": ["error", "tab"],
"quotes": ["error", "double"],
"max-len": ["error", 250],
"curly": "error",
"camelcase": ["error", {"properties": "never"}]
},
"env": {
"browser": true,
"node": true,
"es6": true
}
}

View File

@@ -31,3 +31,29 @@ To run StyleLint, use `npm run stylelint`.
We use [NU Validator](https://validator.w3.org/nu) to validate our HTML. The configuration is in the command in the package.json file.
To run HTML Validator, use `npm run htmlvalidator`.
## Submitting Issues
Please only submit reproducible issues.
If you're not sure if it's a real bug or if it's just you, please open a topic on the forum: https://forum.magicmirror.builders/category/15/bug-hunt - Problems installing or configuring your MagicMirror? Check out: https://forum.magicmirror.builders/category/10/troubleshooting
When submitting a new issue, please supply the following information:
**Platform** [ Raspberry Pi 2/3, Windows, Mac OS X, Linux, Etc ... ]:
**Node Version** [ 0.12.13 or later ]:
**MagicMirror Version** [ V1 / V2-Beta ]:
**Description:** Provide a detailed description about the issue and include specific details to help us understand the problem. Adding screenshots will help describing the problem.
**Steps to Reproduce:** List the step by step process to reproduce the issue.
**Expected Results:** Describe what you expected to see.
**Actual Results:** Describe what you actually saw.
**Configuration:** What does the used config.js file look like? (Don't forget to remove any sensitive information.)
**Additional Notes:** Provide any other relevant notes not previously mentioned (optional)

View File

@@ -1,2 +1,21 @@
* **Platform** [ Raspberry Pi 2/3, Windows, Mac OS X, Linux]:
* **Node Version** [ 0.12.13 or later ]:
Please only submit reproducible issues.
If you're not sure if it's a real bug or if it's just you, please open a topic on the forum: https://forum.magicmirror.builders/category/15/bug-hunt - Problems installing or configuring your MagicMirror? Check out: https://forum.magicmirror.builders/category/10/troubleshooting
**Platform** [ Raspberry Pi 2/3, Windows, Mac OS X, Linux, Etc ... ]:
**Node Version** [ 0.12.13 or later ]:
**MagicMirror Version** [ V1 / V2-Beta ]:
**Description:** Provide a detailed description about the issue and include specific details to help us understand the problem. Adding screenshots will help describing the problem.
**Steps to Reproduce:** List the step by step process to reproduce the issue.
**Expected Results:** Describe what you expected to see.
**Actual Results:** Describe what you actually saw.
**Configuration:** What does the used config.js file look like? (Don't forget to remove any sensitive information.)
**Additional Notes:** Provide any other relevant notes not previously mentioned (optional)

View File

@@ -1,5 +0,0 @@
* Does the pull request solve a **related** issue? [yes | no]
* If so, can you reference the issue?
* What does the pull request accomplish? (please list)

BIN
.github/header.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

BIN
.github/header.psd vendored

Binary file not shown.

66
.gitignore vendored
View File

@@ -1,66 +0,0 @@
# Various Node ignoramuses.
logs
*.log
npm-debug.log*
pids
*.pid
*.seed
lib-cov
coverage
.grunt
.lock-wscript
build/Release
node_modules
jspm_modules
.npm
.node_repl_history
# Various Windows ignoramuses.
Thumbs.db
ehthumbs.db
Desktop.ini
$RECYCLE.BIN/
*.cab
*.msi
*.msm
*.msp
*.lnk
# Various OSX ignoramuses.
.DS_Store
.AppleDouble
.LSOverride
Icon
._*
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
# Various Linux ignoramuses.
.fuse_hidden*
.directory
.Trash-*
# Various Magic Mirror ignoramuses and anti-ignoramuses.
# Don't ignore the node_helper nore module.
!/modules/node_helper
!/modules/node_helper/**
# Ignore all modules except the default modules.
/modules/**
!/modules/default/**
!/modules/README.md**
# Ignore changes to the custom css files.
/css/custom.css

1
.snyk
View File

@@ -1 +0,0 @@
version: v1

View File

@@ -1,4 +0,0 @@
{
"extends": "stylelint-config-standard",
"font-family-name-quotes": "double-where-recommended"
}

View File

@@ -1,9 +0,0 @@
language: node_js
node_js:
- "6"
- "5.1"
- "4"
- "0.12"
before_script:
- npm install grunt-cli -g
script: grunt

View File

@@ -1,28 +0,0 @@
module.exports = function(grunt) {
require("time-grunt")(grunt);
grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),
eslint: {
options: {
configFile: ".eslintrc.json"
},
target: ["js/*.js", "modules/default/*.js", "serveronly/*.js", "*.js"]
},
postcss: {
lint: {
options: {
processors: [
require("stylelint")({"extends": "stylelint-config-standard", "font-family-name-quotes": "double-where-recommended"}),
require("postcss-reporter")({ clearMessages: true })
]
},
dist: {
src: "**/**/**/**/**/**/**/**.css"
}
}
}
});
grunt.loadNpmTasks("grunt-eslint");
grunt.loadNpmTasks("grunt-postcss");
grunt.registerTask("default", ["eslint", "postcss:lint"]);
};

View File

@@ -1,18 +0,0 @@
The MIT License (MIT)
=====================
Copyright © 2016 Michael Teeuw
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the “Software”), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
**The software is provided “as is”, without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.**

148
README.md
View File

@@ -1,131 +1,61 @@
![MagicMirror²: The open source modular smart mirror platform. ](.github/header.png)
MagicMirror
===========
<p align="center">
<a href="https://david-dm.org/MichMich/MagicMirror"><img src="https://david-dm.org/MichMich/MagicMirror.svg" alt="Dependency Status"></a>
<a href="https://david-dm.org/MichMich/MagicMirror#info=devDependencies"><img src="https://david-dm.org/MichMich/MagicMirror/dev-status.svg" alt="devDependency Status"></a>
<a href="https://nodejs.org"><img src="https://img.shields.io/badge/node-v5.10.1-brightgreen.svg" alt="Node Version"></a>
<a href="http://choosealicense.com/licenses/mit"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="License"></a>
<a href="https://travis-ci.org/MichMich/MagicMirror"><img src="https://travis-ci.org/MichMich/MagicMirror.svg" alt="Travis"></a>
<a href="https://snyk.io/test/github/MichMich/MagicMirror"><img src="https://snyk.io/test/github/MichMich/MagicMirror/badge.svg" alt="Known Vulnerabilities" data-canonical-src="https://snyk.io/test/github/MichMich/MagicMirror" style="max-width:100%;"></a>
</p>
**Note:** Please check out the [v2-beta](https://github.com/MichMich/MagicMirror/tree/v2-beta) branch if you are looking for a modular system with simple installer.
**MagicMirror²** is an open source modular smart mirror platform. With a growing list of installable modules, the **MagicMirror²** allows you to convert your hallway or bathroom mirror into your personal assistant. **MagicMirror²** is built by the creator of [the original MagicMirror](http://michaelteeuw.nl/tagged/magicmirror) with the incredible help of a [growing community of contributors](https://github.com/MichMich/MagicMirror/graphs/contributors).
##Introduction
MagicMirror² focuses on a modular plugin system and uses [Electron](http://electron.atom.io/) as an application wrapper. So no more web server or browser installs necessary!
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).
**NOTE:** This version is in currently in beta stage. Please use the master branch if you need a thoroughly tested version.
## Table Of Contents
- [Usage](#usage)
- [Configuration](#configuration)
- [Modules](#modules)
- [Known Issues](#known-issues)
- [community](#community)
- [Contributing Guidelines](#contributing-guidelines)
## Usage
#### Raspberry Pi Support
Electron, the app wrapper around MagicMirror², only supports the Raspberry Pi 2 & 3. The Raspberry Pi 1 is currently **not** supported. If you want to run this on a Raspberry Pi 1, use the [server only](#server-only) feature and setup a fullscreen browser yourself.
#### Automatic Installer (Raspberry Pi Only!)
Execute the following command on your Raspberry Pi to install MagicMirror²:
````
curl -sL https://raw.githubusercontent.com/MichMich/MagicMirror/installers/raspberry.sh | bash
````
#### Manual Installation
1. Download and install the latest Node.js version.
2. Clone the repository and check out the beta branch: `git clone https://github.com/MichMich/MagicMirror`
3. Enter the repository: `cd ~/MagicMirror`
4. Install and run the app: `npm install && npm start`
**Important:** `npm start` does **not** work via SSH, use `DISPLAY=:0 nohup npm start &` instead. This starts the mirror on the remote display.
#### Server Only
In some cases, you want to start the application without an actual app window. In this case, execute the following command from the MagicMirror folder: `node serveronly`. This will start the server, after which you can open the application in your browser of choice.
#### Raspberry Configuration & Auto Start.
The following wiki links are helpful in the configuration of your MagicMirror² operating system:
- [Configuring the Raspberry Pi](https://github.com/MichMich/MagicMirror/wiki/Configuring-the-Raspberry-Pi)
- [Auto Starting MagicMirror](https://github.com/MichMich/MagicMirror/wiki/Auto-Starting-MagicMirror)
#### Updating you MagicMirror²
If you want to update your MagicMirror² to the latest version, use your terminal to go to your Magic Mirror folder and type the following command:
````
git pull
````
If you changed nothing more than the config or the modules, this should work without any problems.
Type `git status` to see your changes, if there are any, you can reset them with `git reset --hard`. After that, git pull should be possible.
## Configuration
1. Duplicate `config/config.js.sample` to `config/config.js`.
2. Modify your required settings.
The following properties can be configured:
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*.
| **Option** | **Description** |
| --- | --- |
| `port` | The port on which the MagicMirror² server will run on. The default value is `8080`. |
| `language` | The language of the interface. (Note: Not all elements will be localized.) Possible values are `en`, `nl`, `ru`, `fr`, etc., but the default value is `en`. |
| `timeFormat` | The form of time notation that will be used. Possible values are `12` or `24`. The default is `24`. |
| `units` | The units that will be used in the default weather modules. Possible values are `metric` or `imperial`. The default is `metric`. |
| `modules` | An array of active modules. **The array must contain objects. See the next table below for more information.** |
##Configuration
Module configuration:
Modify `js/config.js` to change some general variables (language, weather location, compliments, news feed RSS and to add your own ICS calendars)
| **Option** | **Description** |
| --- | --- |
| `module` | The name of the module. This can also contain the subfolder. Valid examples include `clock`, `default/calendar` and `custommodules/mymodule`. |
| `position` | The location of the module in which the module will be loaded. Possible values are `top_ bar`, `top_left`, `top_center`, `top_right`, `upper_third`, `middle_center`, `lower_third`, `bottom_left`, `bottom_center`, `bottom_right`, `bottom_bar`, `fullscreen_above`, and `fullscreen_below`. This field is optional but most modules require this field to set. Check the documentation of the module for more information. Multiple modules with the same position will be ordered based on the order in the configuration file. |
| `classes` | Additional classes which are passed to the module. The field is optional. |
| `header` | To display a header text above the module, add the header property. This field is optional. |
| `config` | An object with the module configuration properties. Check the documentation of the module for more information. This field is optional, unless the module requires extra configuration. |
To use the OpenWeatherMap API, you'll need a free API key. Checkout [this blogpost](http://michaelteeuw.nl/post/131504229357/what-happened-to-the-weather) for more information.
## Modules
##Code
The following modules are installed by default.
###[main.js](js/main.js)
- [**Clock**](modules/default/clock)
- [**Calendar**](modules/default/calendar)
- [**Current Weather**](modules/default/currentweather)
- [**Weather Forecast**](modules/default/weatherforecast)
- [**News Feed**](modules/default/newsfeed)
- [**Compliments**](modules/default/compliments)
- [**Hello World**](modules/default/helloworld)
- [**Alert**](modules/default/alert)
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.
For more available modules, check out out the wiki page: [MagicMirror² Modules](https://github.com/MichMich/MagicMirror/wiki/MagicMirror²-Modules). If you want to build your own modules, check out the [MagicMirror² Module Development Documentation](modules) and don't forget to add it to the wiki and the [forum](https://forum.magicmirror.builders/category/7/showcase)!
###[Calendar](js/calendar)
## Known issues
Parsing functionality for the calendar that retrieves and updates the calendar based on the interval set at the top of the [calendar.js](js/calendar/calendar.js) file. This was actually a straight pull from the original main.js file but the parsing code may deserve an upgrade.
- Electron seems to have some issues on certain Raspberry Pi 2's. See [#145](https://github.com/MichMich/MagicMirror/issues/145).
- MagicMirror² (Electron) sometimes quits without an error after an extended period of use. See [#150](https://github.com/MichMich/MagicMirror/issues/150).
###[Compliments](js/compliments)
## Community
Functionality related to inserting compliments into the view and rotating them based on a specific interval set at the top of the [compliments.js](js/compliments/compliments.js) file.
The community around the MagicMirror² is constantly growing. We even have a [forum](https://forum.magicmirror.builders) now where you can share your ideas, ask questions, help others and get inspired by other builders. We would love to see you there!
###[News](js/news)
## Contributing Guidelines
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](js/news/news.js) file.
Contributions of all kinds are welcome, not only in the form of code but also with regards bug reports and documentation.
###[Time](js/time)
Please keep the following in mind:
Updates the time on the screen on one second interval. Can be changed to omit displaying seconds by adding the config option ```displaySeconds = false``` in [config.js](js/config.js). When the seconds are disabled the interval is set to 60 seconds on the full minute.
- **Bug Reports**: Make sure you're running the latest version. If the issue(s) still persist: please open a clearly documented issue with a clear title.
- **Minor Bug Fixes**: Please send a pull request with a clear explanation of the issue or a link to the issue it solves.
- **Major Bug Fixes**: please discuss your approach in an GitHub issue before you start to alter a big part of the code.
- **New Features**: please please discuss in a GitHub issue before you start to alter a big part of the code. Without discussion upfront, the pull request will not be accepted / merged.
With the option ```digitFade = true```, changing digits are faded. This looks best if the seconds are omitted.
Thanks for your help in making MagicMirror² better!
###[Version](js/version)
Checks the git version and refreshes if a new version has been pulled.
###[Weather](js/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 the config for this to work. (See *configuration*.)
##Modules
###[MagicMirror-Modules by PaViRo](https://github.com/paviro/MagicMirror-Modules)
**Current features:** FRITZ!Box Callmonitor <br>
**Future features:** Faceregognition, personalized views, online banking through HBCI and multiple calenders based on faceregognition.
###[MagicMirror-Netatmo-Module by cfenner](https://github.com/CFenner/MagicMirror-Netatmo-Module)
**Current features:** display data of Netatmo weather station (inside/outside)<br>
**Future features:** display of local warnings (severe weather)

2
config/.gitignore vendored
View File

@@ -1,2 +0,0 @@
*
!config.js.sample

View File

@@ -1,75 +0,0 @@
/* Magic Mirror Config Sample
*
* By Michael Teeuw http://michaelteeuw.nl
* MIT Licensed.
*/
var config = {
port: 8080,
language: 'en',
timeFormat: 24,
units: 'metric',
modules: [
{
module: 'alert',
},
{
module: 'clock',
position: 'top_left'
},
{
module: 'calendar',
header: 'US Holidays',
position: 'top_left',
config: {
calendars: [
{
symbol: 'calendar-check-o ',
url: 'webcal://www.calendarlabs.com/templates/ical/US-Holidays.ics'
}
]
}
},
{
module: 'compliments',
position: 'lower_third'
},
{
module: 'currentweather',
position: 'top_right',
config: {
location: 'New York',
appid: 'YOUR_OPENWEATHER_API_KEY'
}
},
{
module: 'weatherforecast',
position: 'top_right',
header: 'Weather Forecast',
config: {
location: 'New York',
appid: 'YOUR_OPENWEATHER_API_KEY'
}
},
{
module: 'newsfeed',
position: 'bottom_bar',
config: {
feeds: [
{
title: "New York Times",
url: "http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml"
}
],
showSourceTitle: true,
showPublishDate: true
}
},
]
};
/*************** DO NOT EDIT THE LINE BELOW ***************/
if (typeof module !== 'undefined') {module.exports = config;}

5
controllers/calendar.php Normal file
View File

@@ -0,0 +1,5 @@
<?php
include "functions/gzip.php";
$url = $_GET["url"];
echo get_url($url);
?>

View File

@@ -0,0 +1,42 @@
<?php
/*
* @function get_url
* @purpose To fetch GZipped web content.
* @author Michael Teeuw
*/
function get_url($url) {
/*
* @array
* Prepare the options that we need for our GZip request.
*/
$opts = array(
"http" => array(
"method" => "GET",
"header" => "Accept-Language: en-US,en;q=0.8rn" . "Accept-Encoding: gzip,deflate,sdchrn" . "Accept-Charset:UTF-8,*;q=0.5rn" . "User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:19.0) Gecko/20100101 Firefox/19.0 FirePHP/0.4rn",
"ignore_errors" => true
),
/*
* @array
* Put a Band-Aid over some SSL issues.
*/
"ssl" => array(
"verify_peer" => false,
"verify_peer_name" => false
)
);
$context = stream_context_create($opts);
$content = file_get_contents($url, false, $context);
/*
* @note If http response header mentions that content is gzipped, then uncompress it.
*/
foreach($http_response_header as $c => $h) {
if(stristr($h, "content-encoding") and stristr($h, "gzip")) {
/*
* @note Now, let's begin the actual purpose of this function:
*/
$content = gzinflate(substr($content, 10, -8));
}
}
return $content;
}
?>

7
controllers/hash.php Normal file
View File

@@ -0,0 +1,7 @@
<?php
echo json_encode(
array(
"gitHash" => trim(`git rev-parse HEAD`)
)
);
?>

43
controllers/modules.php Normal file
View File

@@ -0,0 +1,43 @@
<?php
$modules_folder = 'modules/';
$modules = array_filter(glob($modules_folder."*"), 'is_dir');
foreach ($modules as $module) {
//Add container arround module
print_r( '<div id="'.substr($module, strlen($modules_folder)).'">' );
//Load files to include
$include_files = include($module."/include.php");
//Add Javascript files
foreach ($include_files["js_files"] as $file) {
//Check if js file is hosted on a remote server
if (preg_match('#^https?://#i', $file) === 1) {
print_r('<script src="'.$file.'"></script>'."\xA");
}
//add local path to module folder
else{
print_r('<script src="modules/'.$module.'/'.$file.'"></script>'."\xA");
}
};
//Add CSS files
foreach ($include_files["css_files"] as $file) {
//Check if css file is hosted on a remote server
if (preg_match('#^https?://#i', $file) === 1) {
print_r('<link rel="stylesheet" type="text/css" href="'.$file.'">'."\xA");
}
//add local path to module folder
else{
print_r('<link rel="stylesheet" type="text/css" href="/modules/'.$module.'/'.$file.'">'."\xA");
}
};
//Add the modules JS file
print_r('<script src="'.$module.'/main.js" type="text/javascript"></script>'."\xA");
//Add the modules CSS file
print_r('<link rel="stylesheet" type="text/css" href="'.$module.'/style.css">'."\xA");
//Get and add HTML Elements
print_r(str_replace("[module]",$module ,file_get_contents($module.'/elements.html')));
//Close module container
print_r("</div>");
}
?>

View File

@@ -1,14 +0,0 @@
/*****************************************************
* Magic Mirror *
* Custom CSS *
* *
* By Michael Teeuw http://michaelteeuw.nl *
* MIT Licensed. *
* *
* Add any custom CSS below. *
* Changes to this files will be ignored by GIT. *
*****************************************************/
body {
}

View File

@@ -6,8 +6,8 @@
* -------------------------- */
@font-face {
font-family: 'FontAwesome';
src: url('../fonts/fontawesome-webfont.eot?v=4.5.0');
src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.5.0') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff2?v=4.5.0') format('woff2'), url('../fonts/fontawesome-webfont.woff?v=4.5.0') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.5.0') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.5.0#fontawesomeregular') format('svg');
src: url('../font/fontawesome-webfont.eot?v=4.5.0');
src: url('../font/fontawesome-webfont.eot?#iefix&v=4.5.0') format('embedded-opentype'), url('../font/fontawesome-webfont.woff2?v=4.5.0') format('woff2'), url('../font/fontawesome-webfont.woff?v=4.5.0') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.5.0') format('truetype'), url('../font/fontawesome-webfont.svg?v=4.5.0#fontawesomeregular') format('svg');
font-weight: normal;
font-style: normal;
}

View File

@@ -1,229 +1,231 @@
body,
html {
cursor: none;
overflow:hidden;
}
::-webkit-scrollbar {
display: none;
}
body {
margin: 60px;
position: absolute;
height: calc(100% - 120px);
width: calc(100% - 120px);
background: #000;
color: #aaa;
font-family: "Roboto Condensed", sans-serif;
font-weight: 400;
font-size: 2em;
line-height: 1.5em;
-webkit-font-smoothing: antialiased;
}
/**
* Default styles.
*/
.dimmed {
color: #666;
}
.normal {
color: #999;
}
.bright {
padding: 0px;
margin: 0px;
width: 100%;
height: 100%;
font-family: "HelveticaNeue-Light", sans-serif;
letter-spacing: -2px;
color: #fff;
font-size: 75px;
-webkit-font-smoothing: antialiased;
text-rendering: geometricprecision;
}
.wi {
line-height: 75px;
}
.top {
position: absolute;
top: 50px;
}
.left {
position: absolute;
left: 50px;
}
.right {
position: absolute;
right: 50px;
text-align: right;
}
.center-ver {
position: absolute;
top: 50%;
height: 200px;
margin-top: -100px;
line-height: 100px;
}
.lower-third {
position: absolute;
top: 66.666%;
height: 200px;
margin-top: -100px;
line-height: 100px;
}
.center-hor {
position: absolute;
right: 50px;
left: 50px;
text-align: center;
}
.bottom {
position: absolute;
bottom: 50px;
}
.xxsmall,
.xsmall,
.small {
font-family: "HelveticaNeue-Medium", sans-serif;
letter-spacing: 0;
}
.xxsmall {
font-size: 15px;
}
.xxsmall .wi {
line-height: 15px;
}
.xsmall {
font-size: 15px;
font-size: 20px;
}
.xsmall .wi {
line-height: 20px;
}
.small {
font-size: 20px;
font-size: 25px;
}
.small .wi {
line-height: 25px;
}
.medium {
font-size: 30px;
font-size: 35px;
letter-spacing: -1px;
font-family: "HelveticaNeue-Light", sans-serif;
}
.medium .wi {
line-height: 35px;
}
.large {
font-size: 65px;
line-height: 65px;
.xdimmed {
color: #666;
}
.xlarge {
font-size: 75px;
line-height: 75px;
letter-spacing: -3px;
}
.thin {
font-family: Roboto, sans-serif;
font-weight: 100;
.dimmed {
color: #aaa;
}
.light {
font-family: "Roboto Condensed", sans-serif;
font-weight: 300;
font-family: "HelveticaNeue-UltraLight", sans-serif;
}
.regular {
font-family: "Roboto Condensed", sans-serif;
font-weight: 400;
.icon {
position: relative;
top: -10px;
display: inline-block;
font-size: 45px;
padding-right: 5px;
font-weight: 100;
margin-right: 10px;
}
.bold {
font-family: "Roboto Condensed", sans-serif;
font-weight: 700;
.icon-small {
position: relative;
display: inline-block;
font-size: 20px;
padding-left: 10px;
padding-right: -10px;
font-weight: 100;
}
.align-right {
.time .sec {
font-size: 25px;
color: #666;
padding-left: 5px;
position: relative;
top: -35px;
}
.forecast-table {
float: right;
text-align: right;
font-size: 20px;
line-height: 20px;
}
.forecast-table .day,
.forecast-table .temp-min,
.forecast-table .temp-max {
width: 50px;
text-align: right;
}
.align-left {
text-align: left;
.forecast-table .temp-max {
width: 60px;
}
header {
text-transform: uppercase;
font-size: 15px;
font-family: "Roboto Condensed";
font-weight: 400;
border-bottom: 1px solid #666;
line-height: 15px;
padding-bottom: 5px;
margin-bottom: 10px;
.forecast-table .day {
color: #999;
}
sup {
font-size: 50%;
line-height: 50%;
.calendar-table {
font-size: 14px;
line-height: 20px;
margin-top: 10px;
}
/**
* Module styles.
*/
.module {
margin-top: 30px;
}
.module:first-child {
margin-top: 0;
}
/**
* Region Definitions.
*/
.region {
position: absolute;
}
.region.fullscreen {
position: absolute;
top: -60px;
left: -60px;
right: -60px;
bottom: -60px;
}
.region.right {
right: 0;
}
.region.top {
top: 0;
}
.region.top .container {
margin-bottom: 25px;
}
.region.top .container:empty {
margin-bottom: 0;
}
.region.top.center,
.region.bottom.center {
left: 50%;
-moz-transform: translateX(-50%);
-o-transform: translateX(-50%);
-webkit-transform: translateX(-50%);
-ms-transform: translateX(-50%);
transform: translateX(-50%);
}
.region.top.right,
.region.top.left,
.region.top.center {
top: 100%;
}
.region.bottom {
bottom: 0;
}
.region.bottom .container {
margin-top: 25px;
}
.region.bottom .container:empty {
margin-top: 0;
}
.region.bottom.right,
.region.bottom.center,
.region.bottom.left {
bottom: 100%;
}
.region.bar {
width: 100%;
.calendar-table .calendar-icon {
width: 1em;
min-width: 1em;
margin-right: 5px;
text-align: center;
}
.region.third,
.region.middle.center {
width: 100%;
text-align: center;
-moz-transform: translateY(-50%);
-o-transform: translateY(-50%);
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
}
.region.upper.third {
top: 33%;
}
.region.middle.center {
top: 50%;
}
.region.lower.third {
top: 66%;
}
.region.left {
text-align: left;
}
.region.right {
.calendar-table .days {
padding-left: 20px;
text-align: right;
}
.region table {
width: 100%;
border-spacing: 0;
border-collapse: separate;
.dishwasher {
background-color: white;
color: black;
margin: 0 200px;
font-size: 60px;
border-radius: 1000px;
border-radius: 1200px;
display: none;
}
@font-face {
font-family: 'HelveticaNeue-UltraLight';
src: url('font/HelveticaNeue-UltraLight.eot');
/* IE9 Compat Modes */
src: url('font/HelveticaNeue-UltraLight.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('font/HelveticaNeue-UltraLight.woff') format('woff'), /* Modern Browsers */
url('font/HelveticaNeue-UltraLight.ttf') format('truetype'), /* Safari, Android, iOS */
url('font/HelveticaNeue-UltraLight.svg#9453ea8da727d260bcdbfa605bdbb5d2') format('svg');
/* Legacy iOS */
font-style: normal;
font-weight: 100;
}
@font-face {
font-family: 'HelveticaNeue-Medium';
src: url('font/HelveticaNeue-Medium.eot');
/* IE9 Compat Modes */
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 */
font-style: normal;
font-weight: 400;
}
@font-face {
font-family: 'HelveticaNeue-Light';
src: url('font/HelveticaNeue-Light.eot');
/* IE9 Compat Modes */
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 */
font-style: normal;
font-weight: 200;
}

View File

@@ -28,8 +28,8 @@
*/
@font-face {
font-family: 'weather';
src: url('weathericons-regular-webfont.eot');
src: url('weathericons-regular-webfont.eot?#iefix') format('embedded-opentype'), url('weathericons-regular-webfont.woff') format('woff'), url('weathericons-regular-webfont.ttf') format('truetype'), url('weathericons-regular-webfont.svg#weathericons-regular-webfontRg') format('svg');
src: url('../font/weathericons-regular-webfont.eot');
src: url('../font/weathericons-regular-webfont.eot?#iefix') format('embedded-opentype'), url('../font/weathericons-regular-webfont.woff') format('woff'), url('../font/weathericons-regular-webfont.ttf') format('truetype'), url('../font/weathericons-regular-webfont.svg#weathericons-regular-webfontRg') format('svg');
font-weight: normal;
font-style: normal;
}

Binary file not shown.

2938
font/HelveticaNeue-Light.svg Normal file

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 338 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 383 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 401 KiB

Binary file not shown.

Binary file not shown.

View File

Before

Width:  |  Height:  |  Size: 357 KiB

After

Width:  |  Height:  |  Size: 357 KiB

View File

Before

Width:  |  Height:  |  Size: 94 KiB

After

Width:  |  Height:  |  Size: 94 KiB

View File

@@ -1,202 +0,0 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More