Git Product home page Git Product logo

mmm-weatherchart's Introduction

Magic Mirror Module: mmm-weatherchart

This MagicMirror2 module allows you to show a weather diagram provided by http://www.yr.no

Screenshot

Installation

In your terminal, go to your MagicMirror's Module folder:

cd ~/MagicMirror/modules

Clone this repository:

git clone https://github.com/paphko/mmm-weatherchart.git

Install module:

cd mmm-weatherchart
npm install

Configure the module in your config.js file.

Using the module

To use this module, you must first determine country, area, and city:

  1. go to http://www.yr.no
  2. enter your location into the search field at the top and select your city
  3. at the top-right, switch language to English
  4. write down country, area, and city from the current URL, e.g.: http://www.yr.no/place/Germany/North_Rhine-Westphalia/Duisburg/

Now add the module to the modules array in the config/config.js file:

modules: [
	{
		module: 'mmm-weatherchart',
		position: 'bottom_left', // this can be any of the regions
		config: {
			country: 'Germany', // as determined above
			area: 'North_Rhine-Westphalia', // as determined above
			city: 'Duisburg', // as determined above
			updateInterval: 60 * 60 * 1000, // update every hour
			hideBorder: true, // whether or not a border with city name should be shown
			negativeImage: true, // whether or not the default white image should be inverted
			hoursToShow: 24, // Cut the image down to show less than the full 48 hour forecast. -1 to show everything.
			// mmDirectory: "/home/pi/MagicMirror/" // required for caching; adjust if it differs
		}
	},
]

Configuration options

The following properties can be configured:

Option Description
country Your country as determined above
area Your area as determined above
city Your city name as determined above
updateInterval Update interval of the diagram.
Default value: 60 * 60 * 1000 (once every hour)
hideBorder Whether or not a border with city name should be shown.
Default value: true
negativeImage Whether or not the white image should be inverted.
Default value: true
hoursToShow Cut the forecast down to this many hours (for a narrower picture).
Default value: -1 (show full forecast)
mmDirectory To avoid the image to be cached by the browser (issue #5), it is downloaded into the magic mirror / modules / mmm-weatherchart / cache folder. I couldn't find a way to ask MM for this path, so I just hard-coded it here with the possibility to adjust it in case your installation looks different.
Default value: /home/pi/MagicMirror/

mmm-weatherchart's People

Contributors

paphko avatar gkreitz avatar majorc1983 avatar martingris avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.