Skip to content
A MagicMirror module that displays weather alerts (text based) from the Norwegian Meteorological Institute
JavaScript CSS
Branch: master
Clone or download
Latest commit f901f88 Dec 7, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE Initial commit Nov 11, 2019
MMM-Farevarsel.js First version Nov 11, 2019
README.md Update README.md Dec 7, 2019
node_helper.js
package.json First version Nov 11, 2019
style.css First version Nov 11, 2019

README.md

Module: MMM-Farevarsel

The MMM-Farevarsel module is a MagicMirror addon. This module displays weather alerts (text based) from the Norwegian Meteorological Institute (https://api.met.no/). I used TuxDiver's MMM-Rest as a starting point for this module.

The alerts only cover Norwegian areas and are (therefore) only in Norwegian

Farevarsel Displays

Installation

Run the following commands

pi@raspberrypi:~ $ cd ~/MagicMirror/modules
pi@raspberrypi:~/MagicMirror/modules $ git clone https://github.com/mabahj/MMM-Farevarsel.git
pi@raspberrypi:~/MagicMirror/modules $ cd MMM-Farevarsel
pi@raspberrypi:~/MagicMirror/modules/MMM-Farevarsel $ npm install 

Do not forget the "npm install" at the end - it fetches the required sub dependencies.

Changelog

2019-11-11: First attempt at creating a (this) Magic Mirror Module.

Known Issues

  • I am not a software developer. There are probably a lot of things that can fail. But it work just fine for me.

Using the module

To use this module, add it to the modules array in the config/config.js file:

modules: [
  {
    module: 'MMM-Farevarsel',
    position: 'top_bar',      // This can be any of the regions. I think.
    config: {
      county: 02,             // See below
      colorBackground: true,
    },
  }
]

Configuration options

The following properties can be configured. Non of these are required, but county is probably valuable to set unless you live in Oslo.

Option Default Description
county 02 The county (in Norway) to fetch weather alerts for. Two digits are required, so prefix with 0 if single digit See https://register.geonorge.no/sosi-kodelister/fylkesnummer-alle for a list of counties. Default is Oslo.
colorBackground true Options: true or false
Show or do not show a background color matching the official alert level. Yellow, Orange or Red.
initialLoadDelay 1000 How long to wait for the first load

Example: 60000 (60 s)
animationSpeed 20000 Fadeover effect for dom updates

Example: 1000
You can’t perform that action at this time.