Skip to content

An unofficial Yr Weather Forecast module for MagicMirror².

Notifications You must be signed in to change notification settings

el97/MMM-YrThen

 
 

Repository files navigation

MagicMirror² Module: YrThen

This is an unofficial Yr Weather Forecast module for MagicMirror², which displays data from Yr.

It is heavily based on MMM-YrNow, from Yr itself. Yr is a weather service from the Norwegian Broadcasting Corporation and the Norwegian Meteorological Institute.

This is work in progress, but as it stands right now it's working and covering my needs.

How to install

Remote into your Magic Mirror box using a terminal software and go to the modules folder:

cd ~/MagicMirror/modules

Clone the repository:

git clone https://github.com/fmandal/MMM-YrThen

Install dependencies:

    cd MMM-YrThen
    npm install request --save

Add the module to the modules array in the config/config.js file by adding the following section. You can change this configuration later when you see this works:

{
	module: 'MMM-YrThen',
	position: 'top_right',
	config: {
		location: '1-2820936',
	}
},

Find your location using the search form at this Yr.no page and look for the ID in the URL.

Configuration options

Option Comment Default
location The unique Id found in the Url of any location on Yr.no. Default location is Skrubblivegen in Steinkjer, Norway. (String) "1-2296935"
updateInterval How often to get new data. Defaults to 1 hour, as the weather forecast doesn't really change too often. (Integer) 3600000
initialLoadDelay Dunno why, but thought it was a good idea to give it some rest before we start. Defaults to 1 sec. (Integer) 1000
numDays Number of days to show if showAll is true, number of forecasts to show if showAll is false. (Integer) 7
showAll Show all four periods of each day or not. (Boolean) true
details If showAll is false, show detailed weather forecast? If false, it only shows the forecast around midday (12.00). If true, it shows detailed forecast numDetails times. (Boolean) true
showPrecipitation If showAll is true, show precipitation as well? (Boolean) true
detailedPrec Show detailed precipitation? (Boolean) true
showMaxMin If showAll is true, show maximum and minimum temperature? (Boolean) false
maxMinSeparator If showMaxMin is true, which separator should be used? (String) "-"
numDetails How many detailed forecasts to show. Default is next two periods. Only applies if showAll is false and details is true. (Integer) 2
roundTemp Round temperature to zero decimals. (Boolean) true
roundPrec Round precipitation to zero decimals. (Boolean) false
title Content of the header of the module – the title. If shown, that is. (String) "Værmelding for Skrubblivegen"
header Show header or not. Contents of header is title. (Boolean) false
size The size of the text. One of the CSS classes defined in main.css of MagicMirror2: "xsmall", "small", "medium", "large", "xlarge". (String) "small"
windShow Show wind forecast or not? (Boolean) true
windGust Show wind gust information or not. (Boolean) false
windUnit If set, it shows as the unit of the wind. Default could be "m/s", but I like it at nothing at all. (string) ""
windSize Size of wind forecast. One of the CSS classes defined in main.css of MagicMirror2: "xsmall", "small", "medium", "large", "xlarge" – or the custom "yrthen-xxsmall" for extra, extra small. (String) "yrthen-xxsmall"
windText Show wind speed in text. (Boolean) true
windTextNumber Show wind speed in number after showing it in text. (Boolean) true
windTextNewLine If windText and windTextNumber both are true, show windTextNumber on a new line? (Boolean) true

About

An unofficial Yr Weather Forecast module for MagicMirror².

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 97.1%
  • CSS 2.9%