A MagicMirror² module that displays wind conditions from either SMHI (Swedish Meteorological Institute) or YR (Norwegian Meteorological Institute). Perfect for sailors, windsurfers, or anyone interested in wind conditions!
English display, m/s:
Norwegian display:
Danish display:
Beaufort scale display:
This module fetches wind data from your chosen weather service (SMHI or YR) and displays:
- Wind speed (in various formats)
- Wind direction (as compass direction or degrees)
- Visual indicators that change color based on wind intensity
The data updates every 30 minutes by default, and you can choose how you want it displayed.
Before you begin, make sure you have:
- A working MagicMirror² installation
- Node.js version 12 or later
- npm (usually comes with Node.js)
- Basic knowledge of how to use terminal/command prompt
Not sure about these? Don't worry! Here are some helpful links:
Here's how to install the module, step by step:
- Navigate to your MagicMirror's modules folder:
cd ~/MagicMirror/modules- Clone this repository:
git clone https://github.com/cgillinger/MMM-Multi-Wind.git- Install dependencies:
cd MMM-Multi-Wind
npm installAdd this to your config/config.js file in the modules array:
{
module: "MMM-Multi-Wind",
position: "top_right",
config: {
provider: "smhi", // Use "smhi" for Swedish locations, "yr" for everywhere else
lat: 57.7089, // Your latitude
lon: 11.9746 // Your longitude
}
}- Use
provider: "smhi"for locations within Sweden - Use
provider: "yr"for locations outside Sweden (YR has global coverage)
Not sure about your latitude and longitude? Here's how to find them:
- Go to Google Maps
- Right-click your location
- The coordinates will appear at the top of the menu
Here's every option you can customize:
| Option | Description | Default Value |
|---|---|---|
provider |
Weather data provider ("smhi" or "yr") | "smhi" |
lat |
Latitude | 57.7089 |
lon |
Longitude | 11.9746 |
altitude |
Altitude in meters (required for YR) | 0 |
updateInterval |
How often to update (in milliseconds) | 1800000 (30min) |
directionType |
How to show direction ("compass" or "degrees") | "compass" |
displayType |
Speed display ("textsea", "beaufort", "ms") | "textsea" |
iconOnly |
Show only icons without text | false |
layout |
Display layout ("vertical" or "horizontal") | "vertical" |
The module follows MagicMirror's global language settings as defined in your config.js. It supports:
- English
- Swedish
- Danish
- Norwegian
- Finnish
- Icelandic
To change the language, update the global language setting in your MagicMirror's config.js file.
{
module: "MMM-Multi-Wind",
position: "top_right",
config: {
provider: "smhi",
lat: 57.7089,
lon: 11.9746,
displayType: "ms",
directionType: "compass"
}
}{
module: "MMM-Multi-Wind",
position: "top_right",
config: {
provider: "yr",
lat: 57.7089,
lon: 11.9746,
displayType: "beaufort",
directionType: "degrees",
updateInterval: 900000 // More frequent updates (15min)
}
}-
Module not appearing?
- Check your config.js for syntax errors
- Look for errors in the console (press F2 in MagicMirror)
- Verify your coordinates are valid
-
No data showing?
- Verify your internet connection
- Check if the weather service is accessible
- Confirm your coordinates are in the correct format
- NOTE: If using SMHI as provider, make sure your location is within Sweden. SMHI only provides data for Swedish locations. If you're outside Sweden, use "yr" as your provider instead.
-
Getting 404 errors with SMHI?
- SMHI's weather service only covers locations within Sweden
- If you're getting a 404 error, check your coordinates
- For locations outside Sweden, change provider to "yr" in your config:
config: { provider: "yr", // Use YR instead of SMHI for non-Swedish locations lat: your_latitude, lon: your_longitude }
-
Wrong language?
- Check your MagicMirror's global language setting in config.js
- Verify that the language is supported by the module
- SMHI: Only provides data for locations within Sweden
- YR: Provides global coverage, use this for locations outside Sweden
If you're stuck:
- Check the console for error messages
- Look through existing issues
- Create a new issue if needed
Want to help improve this module? Great! Here's how:
- Fork the repository
- Create a new branch for your feature
- Make your changes
- Submit a pull request
All contributions are welcome, especially:
- Bug fixes
- New features
- Documentation improvements
- Translations
- Added support for all Nordic languages (Danish, Norwegian, Finnish, Icelandic)
- Implemented nautical wind direction terms
- Enhanced error handling and logging
- Improved data refresh reliability
- Initial version with support for SMHI and YR
- Basic English and Swedish translations
- Provider selection in config
- Unified data handling
This project is licensed under the MIT License - see the LICENSE file for details.
- Thanks to the MagicMirror² community
- Weather data provided by SMHI and YR
- Icons from the Weather Icons pack
Christian Gillinger
- GitHub: christian-gillinger