JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 239
  • Score
    100M100P100Q109753F
  • License MIT

Node-RED node for official DWD MOSMIX forecast (KMZ/KML) per weather station. Parses the forecast, normalizes it, and outputs a structured JSON time series.

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (node-red-contrib-dwd-weatherforecast) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    node-red-contrib-dwd-weatherforecast

    A Node-RED node that retrieves local weather forecasts from the
    Deutscher Wetterdienst (DWD) MOSMIX_L open data API.

    It downloads the official KMZ (MOSMIX_L) forecast file for a given DWD weather station,
    extracts and parses the KML data, and outputs a structured JSON array with
    key weather parameters such as temperature, humidity, wind, pressure, and precipitation.


    🌦 Features

    • Uses official DWD MOSMIX_L forecast data (hourly resolution)
    • Works with any DWD single station ID (e.g. H721 for Köln/Bonn)
    • Supports auto-refresh (periodic updates without inject nodes)
    • Optionally triggers a fetch on deploy
    • Allows stale fallback (keeps last valid data if DWD is temporarily unavailable)
    • Provides unit conversion (°C, hPa, km/h, km)
    • Allows filtering to only show active or future forecast steps
    • Includes core data mode for compact payloads
    • Provides station metadata (id + name)
    • Optional cardinal wind direction output (windDirCardinal) with selectable mode: deg / 8-wind / 16-wind
    • Includes computed field precipitationText (e.g. “Regen (leicht) – 0.3 mm/h”)
    • Built-in fallback calculation for relative humidity (RELH) if missing in the feed

    🧩 Installation

    Using the Node-RED Palette Manager

    1. Open Node-RED in your browser
    2. Go to Menu → Manage palette → Install
    3. Search for node-red-contrib-dwd-weatherforecast
    4. Click Install

    Using command line (for Docker or local installations)

    cd /data
    npm install --no-fund --no-audit GerdRuetten/node-red-contrib-dwd-weatherforecast

    or (if published on npm):

    npm install node-red-contrib-dwd-weatherforecast

    If Node-RED runs inside Docker, execute from the container shell:

    docker exec -u node-red -it node-red bash -lc 'cd /data && npm install --no-fund --no-audit GerdRuetten/node-red-contrib-dwd-weatherforecast#master'

    Then restart Node-RED.


    ⚙️ Configuration

    Setting Type Description
    Station ID string DWD station ID (e.g. H721)
    Source URL string Default:
    https://opendata.dwd.de/weather/local_forecasts/mos/MOSMIX_L/single_stations/{station}/kml/MOSMIX_L_LATEST_{station}.kmz
    Run on deploy checkbox Immediately fetch data after deploy
    Auto refresh (seconds) number Optional interval to automatically update the forecast
    Allow stale fallback checkbox Keep last valid data if DWD feed fails
    Only active/future forecasts checkbox Skip past timestamps (past != true)
    Hours limit number Limit how many forecast hours are returned
    Convert temperature to °C checkbox Converts Kelvin → °C
    Convert pressure to hPa checkbox Converts Pa → hPa
    Convert wind speed to km/h checkbox Converts m/s → km/h
    Wind direction mode select Format of wind direction: deg (0–360), 8 (N, NE, E, …), or 16 (N, NNE, NE, …). Adds windDirCardinal when 8/ 16 is selected.
    Convert visibility to km checkbox Converts m → km
    Core data only checkbox Outputs only main weather parameters
    Show precipitation text built-in Adds human-readable precipitationText field

    🧾 Example Output

    {
      "payload": [
        {
          "ts": 1761609600000,
          "iso": "2025-10-28T00:00:00.000Z",
          "temperature": 7.7,
          "pressure": 1010.1,
          "windSpeed": 18.5,
          "windDir": 236,
          "windDirCardinal": "SW",
          "cloudCover": 69,
          "precipitation": 0.3,
          "precipitationText": "Regen (leicht)",
          "relHumidity": 92,
          "condition": "61",
          "visibility": 25.7
        }
      ],
      "station": {
        "id": "H721",
        "name": "Köln/Bonn-Flughafen"
      },
      "_meta": {
        "url": "https://opendata.dwd.de/weather/local_forecasts/mos/MOSMIX_L/single_stations/H721/kml/MOSMIX_L_LATEST_H721.kmz",
        "count": 120,
        "stale": false,
        "coreOnly": false
      }
    }

    💡 Tips

    • Use the official DWD station list to find your station ID.
    • The node caches the last valid forecast internally to prevent empty data during outages.
    • For automatic updates, set auto refresh (e.g. 1800 s = 30 min).
    • Combine this node with dashboard, notification, or influxdb nodes for live weather visualization.
    • To switch between degrees and compass points, set Wind direction mode to deg, 8, or 16.

    🧠 Data Source

    All forecast data comes from
    Deutscher Wetterdienst (DWD)
    via the Open Data Server.

    This node uses MOSMIX_L (Local Forecast Mix – Long version) datasets.
    MOSMIX_L provides detailed hourly forecasts for each DWD single station.


    ⚖️ License

    MIT © 2025 Gerd Rütten


    🧰 Changelog

    See CHANGELOG.md for details.


    🧪 Example Flow

    [
      {
        "id": "dwd_forecast",
        "type": "dwd-forecast",
        "name": "DWD Forecast Köln/Bonn",
        "station": "H721",
        "runOnDeploy": true,
        "autoRefreshSeconds": 1800,
        "allowStale": true,
        "onlyFuture": true,
        "outputCelsius": true,
        "outputHectoPascal": true,
        "outputWindKmh": true,
        "outputVisibilityKm": true,
        "windDirMode": "16",
        "coreOnly": false
      }
    ]

    🧩 node-red-contrib-dwd-weatherforecast — bringing official DWD forecast data directly into your Node-RED flows.