Skip to content

lavolp3/MMM-RainCast

Repository files navigation

MMM-RainCast

A MagicMirror module using the climacell API to forecast rain amounts over the next several hours.

Updates

1.0.1 2021-04-15

  • included DWD weather serice for german destinations (climacell is far too inaccurate)

1.0.0 2021-03-08

  • stable version published.

Installation

  1. Navigate into your MagicMirror's modules folder and execute git clone https://github.com/lavolp3/MMM-RainCast.git.
  2. Navigate into the module folder and install npm dependencies: cd MMM-RainCast && npm install
  3. Get a free climacell API Key here
  4. Add the module in config.js placing it where you prefer, and include your API Key, latitude and longitude

Config options

Option Description
apiKey ClimaCell API Key.
Only needed outside of Germany
Get it here
useDWD Option to use DWD weather service. Only provides 2 hour rain forecast.No API key needed!
lat The latitude of your position.
Type: Float
Default: 52.15
lon The longitude of your position.
Type: Float
Default: 5.55
width Width of the graph
Type: Integer
Default: 500
height Height of the graph
Type: Integer
Default: 400
forecastHours Number of hours to forecast, max 6 hours
Type: Integer
Default: 4
forecastSteps Steps for the forecast interval (in minutes). Choose between 1, 5 and 15
Type: Integer
Default: 15
iconHeight Height of the weather icons
Type: Integer
Default: 40
chartType Determines type of the chart
Type: string
Values: 'line', 'bar'
Default: "line"
hideWithNoRain Hides the chart when no rain is expected
Type: boolean
Default: true
debug Debug mode (increased console output)
Type: boolean
Default: false

Here is an example of an entry in config.js

{
    module: "MMM-RainCast",
    position: "top_right",   // see mirror setting for options
    header: "RainCast",
    config: {
        apiKey: 'APIKEYHERE',
        lat: 52.222,
        lon: 5.555,
        width: 500,
        forecastHours: 4,
        forecastSteps: 15,
        height: 400,
        hideWithNoRain: true,
        chartType: "line",  //use "line" or "bar"
    }
},

Alternative version in Germany:

{
    module: "MMM-RainCast",
    position: "top_right",   // see mirror setting for options
    header: "RainCast",
    config: {
        useDWD: true,
        lat: 52.222,
        lon: 5.555,
        width: 500,
        forecastHours: 4,
        forecastSteps: 15,
        height: 400,
        hideWithNoRain: true,
        chartType: "line",  //use "line" or "bar"
    }
},

Screenshot

Screenshot

Notes

Data provided by climacell and https://morgenwirdes.de

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published