Skip to main content
Data Connectors · Weather

DWD Weather Warnings

The node downloads the current municipal warnings of the German Weather Service (DWD), matches them against the locations you monitor and emits every applicable warning as a flat WeatherAlert object with a simplified warning polygon. Locations are defined as coordinates or as DWD warncells (districts, municipalities).

  • Data source
  • Trigger-based
  • WeatherAlert
Node type
hypertegrity-dwd-weatherwarnings
Package
@htag/node-red-contrib-hypertegrity-weather
Inputs / outputs
1 / 1
Data source
DWD WarnWetter data (gemeinde_warnings.json, warnings.json) and DWD GeoServer

When to use this node​

The DWD publishes official warnings of severe weather, ice, heat or fog for every municipality and district. The DWD Weather Warnings node filters exactly those warnings from the nationwide dataset that affect your locations and brings them into a uniform format. It uses the high-resolution warncell geometries of the DWD to reliably assign points to a district or municipality.

Typical use cases are:

  • Displaying warning situations on a municipal dashboard or in a citizen app.
  • Triggering alert chains for the depot, winter road service or event management.
  • Archiving warnings in an NGSI-LD context broker as WeatherAlert entities.
  • Monitoring several locations, for example all municipalities of a district or individual properties.

How the node works​

1

Trigger

An incoming message starts the fetch. The content of the message is not evaluated.

2

Fetch

The node loads the warncell-to-warning mapping (warnings.json) and the warning details (gemeinde_warnings.json). Warncell geometries are loaded from the DWD GeoServer once a day.

3

Match

Every warning is compared with all locations: warncells by ID or polygon intersection, coordinates by point-in-polygon test. Overlapping matches are reduced to the largest area.

4

Emit

Every applicable warning leaves the node as its own message carrying a WeatherAlert object with a simplified polygon.

Result: A stream of individual WeatherAlert objects with join metadata that can be passed directly to the NGSI-LD Builder or a Join node.

The node is trigger-based. Connect it to an Inject node that fires, for example, every 15 minutes. On every run all currently valid warnings are emitted again; there is no duplicate detection across runs.

If several locations match the same warning, the rule "largest area wins" applies: if a municipality lies within a district that is also monitored, the warning is emitted only once for the district. Locations without a shared area each receive their own message.

Configuration​

The edit dialog consists of the Name field and two tabs.

Tab "Locations"​

Here you manage the list of monitored locations (locations). Every entry has a name, a type and a value.

FieldTypeDefaultMeaning
NameTextDWD WeatherAlertDisplay name of the node in the flow.
Map selectionMap–A click on the map places a point. The node immediately looks up the warncells at that position and offers them with "Add as Area". "Add Selected Point" adds the coordinate itself instead.
Selected locations (locations)ListemptyEntries of type coord (latitude/longitude) or warncell (DWD warncell ID). The name of each entry later appears in the locationName field of the output.
Add WarncellSearch field–Searches the DWD warncell list by name or ID from two characters on. "Add" or Enter also accepts an ID typed directly.
Manual coordinatesLatitude, longitude, name–Adds a point by hand, for example 49.44, 7.77.

Tab "Settings"​

FieldTypeDefaultMeaning
History (ignoreExpired)CheckboxenabledIgnore expired warnings.
Future (ignoreFuture)CheckboxdisabledIgnore warnings that only start in the future (advance information).
Allow Stale (staleAllow)CheckboxdisabledUse the last successfully loaded data if the DWD is unreachable. Outputs are then marked with msg.isStale = true.
Max Point Count (maxPoints)Number30Maximum number of vertices of the emitted polygon. Larger polygons are simplified using Visvalingam-Whyatt.
JSON URL (url)Textsee belowSource of the warning details. The mapping file warnings.json is loaded from the same directory.

Default values of the URL fields:

JSON URL: https://app-prod-static.warnwetter.de/v16/gemeinde_warnings.json

The fields latitude, longitude and warncellId of older versions are migrated automatically into the location list at startup and are no longer shown in the dialog.

Input​

The input serves exclusively as trigger. The node evaluates no property of the incoming message and does not copy it to the output.

PropertyTypeMeaning
msganyEvery message starts a full fetch and match.

Output​

For every applicable warning the node sends a separate message. The payload is a flat object modelled on the Smart Data Model WeatherAlert that can be handed to the NGSI-LD Builder without further transformation.

{
"id": "2.49.0.0.276.0.DWD.PVW.1759305600000_123456",
"type": "WeatherAlert",
"dateIssued": "2026-10-01T08:15:00.000Z",
"validFrom": "2026-10-01T06:00:00.000Z",
"validTo": "2026-10-01T18:00:00.000Z",
"severity": "moderate",
"category": "weather",
"subCategory": "wind",
"alertSource": "https://www.dwd.de",
"name": "Amtliche WARNUNG vor WINDBÖEN",
"description": "Es treten Windböen mit Geschwindigkeiten um 60 km/h, 17 m/s, 7 Bft, aus südwestlicher Richtung auf.",
"instruction": "",
"location": {"type": "Polygon", "coordinates": [[[7.62, 49.38], [7.91, 49.39], [7.89, 49.52], [7.62, 49.38]]]},
"locationName": "Example Town"
}
FieldMeaning
idThe last two parts of the DWD warning ID joined by _.
typeAlways WeatherAlert.
dateIssuedTime of the fetch in ISO 8601 format.
validFrom, validToStart and end of the warning according to the DWD. If a value is missing, the fetch time is used.
severityDWD warning level 1–4 as minor, moderate, severe or extreme.
categoryAlways weather.
subCategoryDerived from the DWD event: fog, ice, frost, forestFire, thunderstorm, wind, rainfall, snow, heatWave, coldWave, flood or other.
alertSourceAlways https://www.dwd.de.
nameHeadline of the warning (German). Parentheses are replaced by commas, semicolons by periods.
descriptionWarning text (German), sanitised the same way.
instructionBehavioural advice of the DWD (German), sanitised the same way.
locationGeoJSON polygon of the affected warncell, simplified to at most "Max Point Count" vertices. If no warncell geometry is available, the DWD warning region is used.
locationNameThe name you gave to the affected location.

In addition the node sets on every message:

PropertyMeaning
msg.partsJoin metadata (id, index, count, type: "array", key: "payload") so that a Join node can reassemble all warnings of one run into an array.
msg.isStaletrue if the data comes from the cache because the DWD was unreachable.

If no applicable warnings exist, the node sends no message.

Example flow​

The package ships with an example flow. Import it in Node-RED via Menu → Import → Examples → @htag/node-red-contrib-hypertegrity-weather → dwd-weatherwarnings. Alternatively download dwd-weatherwarnings.json and import it via Menu → Import.

Step 1

Inject

An Inject node triggers the fetch every 15 minutes.

Step 2

DWD WeatherAlert

The node matches the current warnings against the configured locations. In the example the location list is empty and has to be completed.

Step 3

Debug

The Debug node is disabled in the example. After enabling it, it shows the WeatherAlert objects in the sidebar.

Show example flow as JSON
[
{"id": "tab1", "type": "tab", "label": "dwd-weatherwarnings", "disabled": false, "info": ""},
{"id": "inject1", "type": "inject", "z": "tab1", "name": "every 15 min", "props": [{"p": "payload"}, {"p": "topic", "vt": "str"}], "repeat": "900", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 150, "y": 120, "wires": [["warn1"]]},
{"id": "warn1", "type": "hypertegrity-dwd-weatherwarnings", "z": "tab1", "name": "DWD WeatherAlert", "ignoreExpired": true, "ignoreFuture": false, "staleAllow": false, "maxPoints": 30, "url": "https://app-prod-static.warnwetter.de/v16/gemeinde_warnings.json", "locations": [], "latitude": "", "longitude": "", "warncellId": "", "x": 390, "y": 120, "wires": [["debug1"]]},
{"id": "debug1", "type": "debug", "z": "tab1", "name": "WeatherWarnings", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "x": 690, "y": 120, "wires": []}
]

Status and errors​

IndicatorMeaning
Blue dot "Fetching…"The fetch is running.
Green dot "Active: n"n warnings were emitted.
Yellow dot "Stale: n"n warnings were emitted from the cache because the DWD was unreachable.
Green ring "No active warnings"No applicable warning exists for the configured locations.
Red ring "API Error"The warning details could not be loaded and no cache was available. The error "DWD Fetch Error: …" is reported as well.
Red ring "Process Error"An error occurred during matching; details are given by "DWD Processing Error: …".
Warning "DWD Mapping fetch failed, attempting stale fallback."The mapping file warnings.json was unreachable.
Warning "DWD API unreachable. Falling back to stale data."The warning details were unreachable; the cache is used.

Errors are reported via node.error and can be handled with a Catch node. The timeouts are 10 seconds for the warning files and 30 seconds for the geometries.

Notes​

  • Terms of use: Warnings and geometries come from the DWD Open Data offering and are published under the Data licence Germany – attribution – version 2.0 (DL-DE/BY-2-0). The address app-prod-static.warnwetter.de is the data directory of the WarnWetter app. No API key is required.
  • Data volume: On the first fetch after a start the node loads the warncell geometries of all municipalities and districts from the DWD GeoServer (several megabytes) and keeps them in memory for 24 hours. The warncell list for the editor search is also cached for 24 hours.
  • Context storage: Caches for stale data and geometries live in memory only and are lost on restart or deploy.
  • Proxy: There is no separate proxy setting; axios honours the environment variables HTTP_PROXY and HTTPS_PROXY.
  • External services in the editor: The map loads tiles from OpenStreetMap; warncell search and geometries go through the Node-RED backend.
  • Personal data: The output contains warning texts, polygons and the location names you assigned. Do not use names of private individuals or private addresses as location names if the data is published.
  • Units and language: DWD warning texts are in German and quote speeds in km/h, m/s and Beaufort as well as precipitation amounts in l/m² (equivalent to mm).

References​