MMM-PollenSwe is a MagicMirror² module designed to display pollen forecasts for regions in Sweden. It fetches data from the Swedish Museum of Natural History's Pollen API and provides an intuitive view of pollen levels across various types.
This module is under development and currently includes functionality to display pollen forecasts. Work is ongoing to translate elements into Swedish.
- Displays pollen levels for different regions in Sweden.
- Includes icons to visually represent pollen levels.
- Supports configuration for custom regions and display preferences.
- Clone the repository into your MagicMirror modules folder:
cd ~/MagicMirror/modules git clone https://github.com/cgillinger/MMM-PollenSwe.git
- Navigate into the module directory and install dependencies:
cd MMM-PollenSwe npm install
Add the following configuration block to the config.js
file of your MagicMirror installation:
{
module: "MMM-PollenSwe",
position: "top_right", // Choose your preferred position
config: {
region: "Stockholm", // Specify region name
updateInterval: 3600000, // Update every hour
showIcon: true, // Show icons for pollen levels
maxPollensShown: 5 // Number of pollen types to display
}
}
To add other regions (orter):
- Locate the
regionId
for your desired region using the API's/regions
endpoint. - Add the region and its corresponding
regionId
to the module'sregions
configuration inconfig.js
:regions: { "Stockholm": "00000000-0000-4000-8000-000049960326", "Göteborg": "00000000-0000-4000-8000-00004996037e", "CustomRegion": "YOUR_CUSTOM_REGION_ID" }
- Update the
region
configuration option with the new region name ("CustomRegion"
in this example).
Option | Description | Default |
---|---|---|
region |
Name of the region to display pollen data for. | Stockholm |
updateInterval |
Time in milliseconds between updates. | 3600000 (1 hr) |
showIcon |
Whether to display icons representing pollen levels. | true |
maxPollensShown |
Maximum number of pollen types to display. | 5 |
autoHide |
Automatically hide the module if no data is available. | false |
- The module fetches the latest data from the API and displays it in a table format.
- Use the
testMode
option for testing the module with predefined data.
- API: Data provided by Swedish Museum of Natural History's Pollen API.
- Icons: Weather icons from Meteocons Weather Icons, licensed under MIT License.
This module is licensed under the MIT License.
For issues or contributions, visit the GitHub repository.