Skip to content

Add FMI weather provider - #4278

Merged
KristjanESPERANTO merged 6 commits into
MagicMirrorOrg:developfrom
i-xul:feature/fmi-weather-provider
Sep 22, 2026
Merged

KristjanESPERANTO merged 6 commits into
MagicMirrorOrg:developfrom
i-xul:feature/fmi-weather-provider

Conversation

@i-xul

@i-xul i-xul commented Sep 21, 2026

Copy link
Copy Markdown

Description

This pull request adds the Finnish Meteorological Institute (FMI) as a weather provider for the default weather module.

The provider uses FMI Open Data services and does not require an API key.

It supports:

  • Current weather observations from FMI weather stations
  • Automatic selection of the nearest station with the required observations
  • Hourly forecasts using the FMI HARMONIE model
  • Daily forecasts aggregated from HARMONIE forecast data
  • Finnish local calendar days for daily forecast aggregation
  • FMI weather symbol mapping to MagicMirror weather types
  • Temperature, humidity, wind, precipitation, and related weather data

The implementation uses latitude and longitude coordinates, consistent with the existing weather provider configuration.

Related issue

No related issue.

Additional changes

  • Adds FMI-specific unit tests covering configuration, URL construction, observation parsing, station selection, current weather generation, forecast parsing, hourly forecasts, daily forecasts, and forecast fetching.
  • Extends the HTTP fetcher to support the FMI XML responses required by the provider.
  • Adds tests for the HTTP fetcher changes.
  • Adds FMI-related terms to the spelling dictionary.
  • Adds FMI to the weather provider release-note category.

Testing

Tested locally on Windows 11.

FMI provider tests:

17 passed (17)

Full unit test suite:

489 passed, 1 failed (490 total)

The single failing test is tests/unit/classes/systeminformation_spec.js, which expects platform: linux. The local test environment reports platform: Windows. The FMI provider tests pass successfully.

npm run config:check also passes successfully.

The provider was additionally tested with live FMI data in MagicMirror using current, forecast, and hourly weather module instances.

@KristjanESPERANTO KristjanESPERANTO left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! This looks good overall, except the url usage.

I see potential to consolidate things, since we have some similarities with the provider evcanada. I'd probably address that in a follow-up PR.

Comment thread js/http_fetcher.js Outdated
@KristjanESPERANTO
KristjanESPERANTO merged commit 9f803a4 into MagicMirrorOrg:develop Sep 22, 2026
13 checks passed
@KristjanESPERANTO

Copy link
Copy Markdown
Collaborator

@i-xul Can you please also add FMI to the docs? :)

https://github.com/MagicMirrorOrg/MagicMirror-Documentation/blob/master/modules/weather.md#general-options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants