apm1007 / MMM-DWD-WarnWeather

Weather-Warnings for MagicMirror2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MMM-DWD-WarnWeather

This a module for the MagicMirror. It can display weather-warnings of Deutscher Wetterdienst. The module shows you current weather-warnings of your region in Germany.

Preview

Installation

  1. Navigate into your MagicMirror's modules folder and execute git clone https://github.com/LukeSkywalker92/MMM-DWD-WarnWeather.git. A new folder will appear, navigate into it.
  2. Execute npm install to install the node dependencies.

Config

The entry in config.js can include the following options:

Option Description
region Your region. Possible region names can be found here. Just click on your location and you will see the name.

Type: string
This value is REQUIRED
changeColor When changeColor is set to true, the color of the warning icons will change based on the warning level.

Default value: true
interval How often the warnings are updated.

Default value: 10 • 60 • 1000 // every 10 minutes
longversion Show the full Description of Warnings if true.

Default value: false
width set the piont, where the full Description break down.

Default value: 55
loadingText The text used while loading warnings.

Default value: 'Warnungen werden geladen...'
noWarningText The text used when there are no warnings for your region.

Default value: 'Keine Warnungen'

Here is an example of an entry in config.js

{
	module: 'MMM-DWD-WarnWeather',
	position: 'top_left',
	header: 'Wetterwarnungen',
	config: {
		region: 'Kreis Lörrach',
		changeColor: true,
		interval: 10 * 60 * 1000, // every 10 minutes
		loadingText: 'Warnungen werden geladen...',
		noWarningText: 'Keine Warnungen'
	}
},

Dependencies

  • request (installed via npm install)

Important Notes

  • This is my first project using Node, so feel free to submit pull requests or post on the issues/wiki and I will do my best to improve the project.

  • Right now the data for warnings comes from the Deutsche Wetterdienst. So the warnings are only available for germany. If you find an similar API for other countries, feel free to give me a hint or to implement this API in this module yourself.

  • Because it's only data for germany, i did not translate any of the warnings to english. Also feel free to do that.

Special Thanks

About

Weather-Warnings for MagicMirror2

License:MIT License


Languages

Language:JavaScript 65.9%Language:CSS 34.1%