-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
SMHI weather provider broken — PMP3gv2 API returns 404 since March 31, 2026 #4081
Copy link
Copy link
Open
Description
What problem do you want to solve with this change?
The SMHI weather provider is completely broken since March 31, 2026. SMHI discontinued the PMP3gv2 forecast API, and all requests to category/pmp3g/version/2 now return HTTP 404.
This affects all MagicMirror² users using weatherProvider: "smhi".
You can verify by running:
# Old API — returns 404:
curl -s -o /dev/null -w "%{http_code}" "https://opendata-download-metfcst.smhi.se/api/category/pmp3g/version/2/geotype/point/lon/18.07/lat/59.33/data.json"
# New API — works:
curl -s "https://opendata-download-metfcst.smhi.se/api/category/snow1g/version/1/geotype/point/lon/18.07/lat/59.33/data.json" | head -c 200SMHI migration announcement: https://www.smhi.se/data/om-smhis-data/uppdateringar-oppna-data/uppdateringar-i-smhis-oppna-data/2025-09-12-nya-apier-for-meteorologiska-prognoser-och-analyser
What do you think is the correct solution?
Update defaultmodules/weather/providers/smhi.js to use the new SNOW1gv1 API. The changes needed:
- URL:
category/pmp3g/version/2→category/snow1g/version/1 - Data structure: The
parametersarray (withname/valuesobjects) is replaced by a flatdataobject (e.g.entry.data.air_temperature) - Time key:
validTime→time - Parameter names:
t→air_temperature,ws→wind_speed,wd→wind_from_direction,r→relative_humidity,Wsymb2→symbol_code,msl→air_pressure_at_mean_sea_level,pcat→predominant_precipitation_type_at_surface,pmean→precipitation_amount_mean,pmedian→precipitation_amount_median,pmin→precipitation_amount_min,pmax→precipitation_amount_max - Coordinates:
geometry.coordinatesis now[lon, lat](flat), not[[lon, lat]](nested) - Missing values: All parameters use
9999as sentinel — should be filtered out
New API docs: https://opendata.smhi.se/metfcst/snow1gv1
Parameter reference: https://opendata.smhi.se/metfcst/snow1gv1/parameters
Participation
- I am willing to submit a pull request for this change.
Additional comments
No response
Reactions are currently unavailable