MMM-OpenWeather24Hours is a 3rd party module for MagicMirror that shows weather information for the next 24 hours. The weather data is retrieved from the OpenWeather API.
The idea of this module is to give you confidence on what to wear when you go outside / to work, or what transport mode you should take (in case you are a good weather-only biker like me) ;) The hourly forecast gives you a good decision basis based on the weather condition at the times you go to work and return home.
- Current temperature and cloudiness
- Temperature forecast for next 24 hours
- Precipitation (rain, snow) forecast for next 24 hours
- Chance of rain / snow
- Amount of rain / snow
- Navigate into your MagicMirror's
modules
folder and executegit clone https://github.com/thobach/MMM-OpenWeather24Hours.git
. - In order to load the MMM-OpenWeather24Hours module you will need to add the following configuration to your
config/config.js
file. Asappid
you need to provide an API secret key from OpenWeather API which you can get from OpenWeather Developer Portal. Aslocation
you can specify your GPS location in the format [latitude],[longitude], e.g.37.8267,-122.4233
.
modules: [
{
module: 'MMM-OpenWeather24Hours',
position: 'top_right',
config: {
appid: '',
location: '',
}
},
]
- Disable CORS
In order to load the OpenWeather API from the browser without the need of a Node_Helper you will need to allow Electron to ignore the CORS rules. Add the following configuration to your
config/config.js
file, e.g. below themodules
property..
electronOptions: {
webPreferences: {
webSecurity: false
}
}
See also https://forum.magicmirror.builders/topic/9222/mmm-nest-status-new-module-for-your-nest-thermostats-and-protect-smoke-detectors/23 for an example.
- Move folder
cd ~/MagicMirror/modules/
mv MMM-DarkSky24Hours/ MMM-OpenWeather24Hours/
- Update to latest version
git pull
- Adjust config file (see above)