Skip to content

Releases: MattLugar/wuforecast

wuforecast for MagicMirror

20 May 15:48
Compare
Choose a tag to compare

Module: Weather Underground Forecast

This is a module for MagicMirror, modified of the default weatherforecast module.

This is similar to the default weatherforecast module, however it has additional functionality (such as displaying the probability of precipitation for each day). It also retrieves its data from Weather Underground instead of OpenWeatherMap.

Using the module

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

modules: [
    {
        module: 'wuforecast',
        position: 'top_right',  // This can be any of the regions.
                                    // Best results in left or right regions.
        config: {
            // See 'Configuration options' for more information.
            location: 'France/Paris',
            appid: 'abcde12345abcde12345abcde12345ab' //wunderground.com API key.
        }
    }
]

Configuration options

The following properties can be configured:

Option Description
location The location used for weather information.

US Example: NY/New_York
Example: France/Paris

This value is REQUIRED
appid The Weather Underground API key, which can be obtained by creating an OpenWeatherMap account. You need either Cumulus or Anvil plan for this module. As long as you make less than 500 queries a day, this is free.

This value is REQUIRED
units What units to use. Specified by config.js

Possible values: config.units = Specified by config.js, default = Kelvin, metric = Celsius, imperial =Fahrenheit
Default value: config.units
pop Display or not display the probability of precipitation. Specified by config.js

Possible values: true = Display the Probability of Precipitation if above 0%, false = Do not display the Probability of Precipitation
Default value: true
degreeSym Display or not display the degree symbol after the high and low temps. Specified by config.js

Possible values: true = Display the degree symbol after the high/low temps. False = Do not dsplay the degree symbol after the high/low temps.
Default value: true
maxNumberOfDays How many days of forecast to return. Specified by config.js

Possible values: 1 - 10
Default value: 7 (7 days)
This value is optional. By default the wuforecast module will return 7 days.
updateInterval How often does the content needs to be fetched? (Milliseconds)
Note that wunderground updates every 15 minutes maximum. Also free version of API only allows 500 calls per day.
Possible values: 1000 - 86400000
Default value: 900000 (15 minutes)
animationSpeed Speed of the update animation. (Milliseconds)

Possible values:0 - 5000
Default value: 2000 (2 seconds)
lang The language of the days.

Possible values: en, nl, ru, etc ...
Default value: uses value of config.language
fade Fade the future events to black. (Gradient)

Possible values: true or false
Default value: true
fadePoint Where to start fade?

Possible values: 0 (top of the list) - 1 (bottom of list)
Default value: 0.25
initialLoadDelay The initial delay before loading. If you have multiple modules that use the same API key, you might want to delay one of the requests. (Milliseconds)

Possible values: 1000 - 5000
Default value: 0
retryDelay The delay before retrying after a request failure. (Milliseconds)

Possible values: 1000 - 60000
Default value: 2500
apiBase The Weather Underground base URL.

Default value: 'http://api.wunderground.com/api/'
weatherEndpoint The Weather Underground API endPoint.

Default value: '/forecast10day/q/'