Skip to content

Commit

Permalink
Merge branch 'develop' into feature/docker
Browse files Browse the repository at this point in the history
  • Loading branch information
bastilimbach authored Jan 31, 2017
2 parents a3eaf9f + ce6cd6a commit e68fea1
Show file tree
Hide file tree
Showing 77 changed files with 1,006 additions and 1,197 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ Temporary Items

# Ignore all modules except the default modules.
/modules/**
!/modules/default
!/modules/default/**
!/modules/README.md**

Expand Down
7 changes: 6 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,9 @@ node_js:
- "5.1"
before_script:
- npm install grunt-cli -g
script: grunt
script:
- grunt
- npm test
cache:
directories:
- node_modules
46 changes: 44 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,52 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [2.1.1] - 2017-01-31

## [2.1.1] - Unreleased

**Note:** This update uses new dependencies. Please update using the following command: `git pull && npm install`

### Changed
- Installer: Use init config.js from config.js.sample.
- Switched out `rrule` package for `rrule-alt` and fixes in `ical.js` in order to fix calendar issues. ([#565](https://github.com/MichMich/MagicMirror/issues/565))
- Make mouse events pass through the region fullscreen_above to modules below.
- Scaled the splash screen down to make it a bit more subtle.
- Replace HTML tables with markdown tables in README files.
- Added `DAYAFTERTOMORROW`, `UPDATE_NOTIFICATION` and `UPDATE_NOTIFICATION_MODULE` to Finnish translations.
- Run `npm test` on Travis automatically
- Show the splash screen image even when is reboot or halted.
- Added some missing translaton strings in the sv.json file.
- Run task jsonlint to check translation files.

### Added
- Added Docker support (Pull Request [#673](https://github.com/MichMich/MagicMirror/pull/673))
- Calendar-specific support for `maximumEntries`, and ` maximumNumberOfDays`
- Add loaded function to modules, providing an async callback.
- Made default newsfeed module aware of gesture events from [MMM-Gestures](https://github.com/thobach/MMM-Gestures)
- Add use pm2 for manager process into Installer RaspberryPi script
- Russian Translation
- Afrikaans Translation
- Add postinstall script to notify user that MagicMirror installed successfully despite warnings from NPM.
- Init tests using mocha.
- Option to use RegExp in Calendar's titleReplace.
- Hungarian Translation.
- Icelandic Translation.
- Add use a script to prevent when is run by SSH session set DISPLAY enviroment.
- Enable ability to set configuration file by the enviroment variable called MM_CONFIG_FILE.
- Option to give each calendar a different color
- Option for colored min-temp and max-temp
- Add test e2e helloworld
- Add test e2e enviroment
- Add `chai-as-promised` npm module to devDependencies

### Fixed
- Update .gitignore to not ignore default modules folder.
- Remove white flash on boot up.
- Added `update` in Raspberry Pi installation script.
- Fix an issue where the analog clock looked scrambled. ([#611](https://github.com/MichMich/MagicMirror/issues/611))
- If units is set to imperial, the showRainAmount option of weatherforecast will show the correct unit.
- Module currentWeather: check if temperature received from api is defined.
- Fix an issue with module hidden status changing to `true` although lock string prevented showing it

## [2.1.0] - 2016-12-31

Expand Down Expand Up @@ -123,7 +165,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).

### Fixed
- Added reference to Italian Translation.
- Added the missing NE translation to all languages. [#334](https://github.com/MichMich/MagicMirror/issues/344)
- Added the missing NE translation to all languages. [#344](https://github.com/MichMich/MagicMirror/issues/344)
- Added proper User-Agent string to calendar call.

### Changed
Expand Down
9 changes: 6 additions & 3 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ module.exports = function(grunt) {
configFile: ".eslintrc.json"
},
target: ["js/*.js", "modules/default/*.js", "modules/default/*/*.js",
"serveronly/*.js", "*.js", "!modules/default/alert/notificationFx.js",
"!modules/default/alert/modernizr.custom.js", "!modules/default/alert/classie.js"
"serveronly/*.js", "*.js", "tests/*/*.js", "!modules/default/alert/notificationFx.js",
"!modules/default/alert/modernizr.custom.js", "!modules/default/alert/classie.js",
"config/*",
"translations/translations.js"

]
},
stylelint: {
Expand All @@ -21,7 +24,7 @@ module.exports = function(grunt) {
},
jsonlint: {
main: {
src: ["package.json", ".eslintrc.json", ".stylelint"],
src: ["package.json", ".eslintrc.json", ".stylelintrc", "translations/*.json", "modules/default/*/translations/*.json"],
options: {
reporter: "jshint"
}
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
The MIT License (MIT)
=====================

Copyright © 2016 Michael Teeuw
Copyright © 2016-2017 Michael Teeuw

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ MagicMirror² focuses on a modular plugin system and uses [Electron](http://elec
- [Configuration](#configuration)
- [Modules](#modules)
- [Known Issues](#known-issues)
- [community](#community)
- [Community](#community)
- [Contributing Guidelines](#contributing-guidelines)

## Usage
Expand Down Expand Up @@ -101,7 +101,7 @@ Type `git status` to see your changes, if there are any, you can reset them with

## Configuration

1. Duplicate `config/config.js.sample` to `config/config.js`.
1. Duplicate `config/config.js.sample` to `config/config.js`. **Note:** If you used the installer script. This step is already done for you.
2. Modify your required settings.

The following properties can be configured:
Expand All @@ -116,7 +116,7 @@ The following properties can be configured:
| `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.** |
| `electronOptions` | An optional array of Electron (browser) options. This allows configuration of e.g. the browser screen size and position (defaults `.width = 800` & `.height = 600`). Kiosk mode can be enabled by setting `.kiosk = true`, `.autoHideMenuBar = false`, `.fullscreen = false`. More options can be found [here](https://github.com/electron/electron/blob/master/docs/api/browser-window.md). |
| `electronOptions` | An optional array of Electron (browser) options. This allows configuration of e.g. the browser screen size and position (example: `electronOptions: { fullscreen: false, width: 800, height: 600 }`). Kiosk mode can be enabled by setting `.kiosk = true`, `.autoHideMenuBar = false`, `.fullscreen = false`. More options can be found [here](https://github.com/electron/electron/blob/master/docs/api/browser-window.md). |


Module configuration:
Expand Down
52 changes: 26 additions & 26 deletions config/config.js.sample
Original file line number Diff line number Diff line change
Expand Up @@ -8,61 +8,61 @@ var config = {
port: 8080,
ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"],

language: 'en',
language: "en",
timeFormat: 24,
units: 'metric',
units: "metric",

modules: [
{
module: 'alert',
module: "alert",
},
{
module: "updatenotification",
position: "top_bar"
},
{
module: 'clock',
position: 'top_left'
module: "clock",
position: "top_left"
},
{
module: 'calendar',
header: 'US Holidays',
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'
symbol: "calendar-check-o ",
url: "webcal://www.calendarlabs.com/templates/ical/US-Holidays.ics"
}
]
}
},
{
module: 'compliments',
position: 'lower_third'
module: "compliments",
position: "lower_third"
},
{
module: 'currentweather',
position: 'top_right',
module: "currentweather",
position: "top_right",
config: {
location: 'New York',
locationID: '', //ID from http://www.openweathermap.org
appid: 'YOUR_OPENWEATHER_API_KEY'
location: "New York",
locationID: "", //ID from http://www.openweathermap.org
appid: "YOUR_OPENWEATHER_API_KEY"
}
},
{
module: 'weatherforecast',
position: 'top_right',
header: 'Weather Forecast',
module: "weatherforecast",
position: "top_right",
header: "Weather Forecast",
config: {
location: 'New York',
locationID: '5128581', //ID from http://www.openweathermap.org
appid: 'YOUR_OPENWEATHER_API_KEY'
location: "New York",
locationID: "5128581", //ID from http://www.openweathermap.org
appid: "YOUR_OPENWEATHER_API_KEY"
}
},
{
module: 'newsfeed',
position: 'bottom_bar',
module: "newsfeed",
position: "bottom_bar",
config: {
feeds: [
{
Expand All @@ -79,4 +79,4 @@ var config = {
};

/*************** DO NOT EDIT THE LINE BELOW ***************/
if (typeof module !== 'undefined') {module.exports = config;}
if (typeof module !== "undefined") {module.exports = config;}
5 changes: 5 additions & 0 deletions css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ sup {
left: -60px;
right: -60px;
bottom: -60px;
pointer-events: none;
}

.region.fullscreen * {
pointer-events: auto;
}

.region.right {
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<div class="region fullscreen above"><div class="container"></div></div>
<script type="text/javascript" src="/socket.io/socket.io.js"></script>
<script type="text/javascript" src="js/defaults.js"></script>
<script type="text/javascript" src="config/config.js"></script>
<script type="text/javascript" src="#CONFIG_FILE#"></script>
<script type="text/javascript" src="vendor/vendor.js"></script>
<script type="text/javascript" src="modules/default/defaultmodules.js"></script>
<script type="text/javascript" src="js/logger.js"></script>
Expand Down
2 changes: 2 additions & 0 deletions installers/mm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
cd ~/MagicMirror
DISPLAY=:0 npm start
7 changes: 7 additions & 0 deletions installers/pm2_MagicMirror.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
apps : [{
name : "MagicMirror",
script : "/home/pi/MagicMirror/installers/mm.sh",
watch : ["/home/pi/MagicMirror/config/config.js"]
}]
}
2 changes: 2 additions & 0 deletions installers/postinstall/postinstall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
echo "\033[32mMagicMirror installation successful!"
exit 0
17 changes: 17 additions & 0 deletions installers/raspberry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ fi
function version_gt() { test "$(echo "$@" | tr " " "\n" | sort -V | head -n 1)" != "$1"; }
function command_exists () { type "$1" &> /dev/null ;}

# Update before first apt-get
echo -e "\e[96mUpdating packages ...\e[90m"
sudo apt-get update || echo -e "\e[91mUpdate failed, carrying on installation ...\e[90m"

# Installing helper tools
echo -e "\e[96mInstalling helper tools ...\e[90m"
sudo apt-get install curl wget git build-essential unzip || exit
Expand Down Expand Up @@ -113,6 +117,9 @@ else
exit;
fi

# Use sample config for start MagicMirror
cp config/config.js.sample config/config.js

# Check if plymouth is installed (default with PIXEL desktop environment), then install custom splashscreen.
echo -e "\e[96mCheck plymouth installation ...\e[0m"
if command_exists plymouth; then
Expand Down Expand Up @@ -141,6 +148,16 @@ else
echo -e "\e[93mplymouth is not installed.\e[0m";
fi

# Use pm2 control like a service MagicMirror
read -p "Do you want use pm2 for auto starting of your MagicMirror (y/n)?" choice
if [[ $choice =~ ^[Yy]$ ]]
then
sudo npm install -g pm2
sudo su -c "env PATH=$PATH:/usr/bin pm2 startup linux -u pi --hp /home/pi"
pm2 start ~/MagicMirror/installers/pm2_MagicMirror.json
pm2 save
fi

echo " "
echo -e "\e[92mWe're ready! Run \e[1m\e[97mDISPLAY=:0 npm start\e[0m\e[92m from the ~/MagicMirror directory to start your MagicMirror.\e[0m"
echo " "
Expand Down
Loading

0 comments on commit e68fea1

Please sign in to comment.