This a module for the MagicMirror. This module shows a 3 day forecast (today, tomorrow and the day after) using the Wunderground API. It displays the overall weather condition, highest temperature, likely-hood of rain, average humidity, highest windspeed and its direction forecast. This is designed to compliment the MMM-Weather-Now module.
Note: The Weather company has ceased the free API that this module was based on, as a result this is now based on the API offered by BitWeather. If you are updating to this version then please don't forget to update your config too!
- Navigate into your MagicMirror's
modules
folder and executegit clone https://github.com/nigel-daniels/MMM-3Day-Forecast
. A new folderMMM-3Day-Forecast
will appear, navigate into it. - Execute
npm install
to install the node dependencies.
The entry in config.js
can include the following options:
Option | Description |
---|---|
api_key |
Required This is the API key you need to use to request weather data from the Weather Underground site. Details on how to request an API key can be found here Type: string Default value: null |
lat |
This is the latitude of the location you want to get the weather for. Type: number Default value: 0.0 |
lon |
This is the longitude of the location you want to get the weather for. Type: number Default value: 0.0 |
units |
This is the units you want the weather reporting in. Type string Use M for metric OR I for imperial.Default value: M |
lang |
This is the two character country code for the language you want the weather in, see all the supported codes here.* Type string Default value en |
interval |
How often the weather is updated. Type: integer Default value: 900000 // 15 minutes |
* This module itself only currently supports en
and da
for the text 'Day after', 'Kph' and 'Mph'. If you have translations for these please send them over and I'll add your language to the set I can support :)
Here is an example of an entry in config.js
{
module: 'MMM-3Day-Forecast',
position: 'top_left',
config: {
api_key: 'xxxxxxxxxxxxxxxxxxxxxx',
lat: 37.3397352,
lon: -121.894958,
units: 'M',
lang: 'en',
interval: 900000
}
},
- request (installed via
npm install
)
I hope you like this module, I know it duplicates many other weather modules, however I missed my home-brew mirrors weather information so I recreated it for MM2. Feel free to submit pull requests or post issues and I'll do my best to respond.
- Michael Teeuw for the MagicMirror2 framework that made this module possible.
- Sam Lewis whose MMM-Traffic module I use and whose code I learnt a great deal from.
- BitWeather for the helpful guides and information they publish on their API.