Giter VIP home page Giter VIP logo

mmm-nordpool's Introduction

MMM-Nordpool

This is a module for the MagicMirror².

Shows chart of hourly electricity prices on Nordpool market for current day.

Relies on unofficial Nordpool client. Before using this module get familiar with Nordpool Terms and conditions for use of website.

Using the module

Run these commands from MagicMirror directory (usually ~/MagicMirror), to clone the repo and install dependencies

cd modules
git clone https://github.com/DanielsSt/MMM-Nordpool.git
cd MMM-Nordpool
npm install

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

var config = {
    modules: [
        {
            module: 'MMM-Nordpool',
            header: 'Nordpool',
            config: {
                // See below for configurable options
            }
        }
    ]
}

Configuration options

Option Description
area Area of interest

Type: string allowed values: Bergen, DK1, DK2, FI, Kr.sand, Molde, OSLO, SE1, SE2, SE3, SE4, SYS, Tr.heim, Tromsø', EE, LV, LT, AT, BE, DE-LU, FR, NL . More details here
Default: LV
currency Currency to use, minor units (cents) will be displayed

Type: string allowed values: DKK, EUR, NOK, SEK. More details here
Default: EUR
updateNordpoolHour When to pull data for next day in your local time. See known issues

Type: int allowed values: 0-23. More details here
Default: 1
maxRandomUpdateMinute This randomizes minute when the data is pulled. Poor attempt to not to accidentally DDoS Nordpool, lol

Type: int Suggested 0-60 More details here
Default: 15
chartConfig Customisation options for the chart, see Chart.js docs for inspiration. Only exceptions are currentPointColor and pointColor those are introduced by this module, overriding pointBackgroundColor will make them useless

Type: object More details here
Default: see full config example

Full config example

var config = {
    modules: [
        {
            module: 'MMM-Nordpool',
            header: 'Nordpool',
            config: {
                area: "LV",
                currency: "EUR",
                updateNordpoolHour: 1,
                maxRandomUpdateMinute: 15,
                chartConfig: {
                    backgroundColor: "rgba(255,255,255,0.1)",
                    borderColor: "rgba(255,255,255,0.7)",
                    fill: true,
                    lineTension: 0.5,
                    pointBorderColor: "black",
                    pointColor: "white",
                    currentPointColor: "red",
                }
            }
        }
    ]
}

Known issues

  • Nordpool returns data based on Europe/Oslo timezone, from 00:00 to 23:00, that's why there is updateNordpoolHour config option, for my use case data starts at 01:00 which does not bother me enough to fix that. If it bothers you - PRs are more welcome ❤️

Useful resources

mmm-nordpool's People

Contributors

danielsst avatar

Watchers

 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.