Registry / data / node-red-contrib-dwd-local-weather

node-red-contrib-dwd-local-weather

JSON →
library1.0.5jsnpmunverified

The `node-red-contrib-dwd-local-weather` package provides a Node-RED node for retrieving current and forecasted weather data from the Deutscher Wetterdienst (DWD), Germany's national meteorological service. Currently at version 1.0.5, this node is primarily designed for locations within Germany and a select number of European cities, leveraging the DWD's MOSMIX forecast model. It offers granular data points including temperature, relative humidity, wind speed and direction, rain probability, and expected precipitation, along with the forecast timestamp. Release cadence for Node-RED contributions like this is typically event-driven, responding to bug fixes, feature requests, or DWD API changes, rather than a fixed schedule. Its key differentiator is direct integration with DWD data, making it a specialized tool for users requiring official German weather information within their Node-RED automation flows, unlike more generalized weather APIs.

npm install node-red-contrib-dwd-local-weather
INSTALL
IMPORT
SIG · NODE-RED-CONTRIB-D
N
node-red-contrib-dwd-local-weather
datajavascriptv1.0.5
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

node-red-contrib-dwd-local-weather
// Install via Node-RED Palette Manager or in Node-RED's user directory: npm install node-red-contrib-dwd-local-weather
import DWDWeatherNode from 'node-red-contrib-dwd-local-weather';
This package is a Node-RED contribution and does not export JavaScript symbols for programmatic import (ESM/CJS). It is installed into the Node-RED environment and accessed via the Node-RED flow editor palette.
dwd-local-weather
// Drag and drop the 'DWD Local Weather' node from the Node-RED palette into your flow.
const DWDNode = new dwd_local_weather.DWDNode();
The `dwd-local-weather` string identifies the node type in Node-RED flows. You interact with it graphically in the editor, configuring properties such as `mosmixStation` and `lookAheadHours`.
msg.payload
// In a subsequent function node, access data via: const temperature = msg.payload.temperature;
import { getTemperature } from 'dwd-local-weather'; getTemperature();
The DWD node emits its forecast data as properties on the standard Node-RED `msg.payload` object. Properties include `temperature`, `humidity`, `windSpeed`, `windDirection`, `rainProbability`, `rainAmount`, and `timestamp`.

Demonstrates a basic Node-RED flow configuration for the DWD Local Weather node, setting a station ID and repeat interval, with output directed to a debug node.

// Example Node-RED flow snippet (simplified JSON representation for conceptual understanding) // This is not executable JavaScript, but represents a Node-RED node configuration. const flowConfiguration = [ { id: 'dwd-weather-node-1', // Unique ID for the node instance type: 'dwd-local-weather', // The type of the DWD weather node name: 'Berlin Weather Forecast', mosmixStation: '10389', // Example: Berlin, Alexanderplatz ID from DWD catalog lookAheadHours: 0, // 0 for current weather, or a positive integer for future forecast omitMsgOnStart: false, // Emit initial message on flow deploy repeat: 3600, // Automatically repeat query every 3600 seconds (1 hour) wires: [ ['debug-node-id'] // Connects the DWD node's output to a debug node ] }, { id: 'debug-node-id', type: 'debug', name: 'Weather Output', topic: 'DWD Data', payloadType: 'msg', outputType: 'json', ui: true, // Display output in the Node-RED debug sidebar console: false // Do not log to Node-RED console } ]; console.log("This conceptual flow snippet configures a DWD weather node to fetch Berlin's current weather every hour and sends it to a debug node."); // In a live Node-RED environment, this setup would automatically provide weather data.
Debug
Known issues
gotchaLimited geographical coverage: The node primarily provides weather data for Germany, with very limited support for other specific European locations (e.g., London, Madrid).
fix
Consult the official DWD MOSMIX stations catalog (linked in the documentation) to verify if your desired location is supported before attempting to use the node.
affects: >=1.0.0
gotchaExcessive API calls: Setting the 'Repeat' interval too low (e.g., less than a few minutes) can lead to unnecessary traffic, potential rate limiting from the DWD API, and increased server load.
fix
Configure the 'Repeat' interval to a sensible duration (e.g., 300 seconds or more) appropriate for weather data updates, which typically don't change minute-to-minute.
affects: >=1.0.0
gotchaIncorrect Location ID format: The 'MOSMIX Station' property requires a specific 5-character ID obtained from the DWD stations catalog, not a city name, postal code, or geographic coordinates.
fix
Refer to the DWD MOSMIX stations catalog (find link in the package documentation or search DWD website) to accurately identify and use the correct 5-character ID for your target location.
affects: >=1.0.0
Errors
Common errors & fixes
Error: DWD API returned no data for station XXXX
The provided MOSMIX station ID (XXXX) is either invalid, mistyped, or not currently supported by the DWD data service via this node.
fix
Double-check the 5-character `mosmixStation` ID against the official DWD MOSMIX stations catalog. Ensure the ID is exactly as listed and corresponds to a supported location.
TypeError: Cannot read properties of undefined (reading 'temperature')
A subsequent node in your Node-RED flow attempted to access properties (like 'temperature') on `msg.payload` before the DWD node successfully emitted valid weather data, or the data structure was unexpected.
fix
Implement robust error handling by using a 'Catch' node on the DWD node to handle API errors, and add a 'Switch' node to check if `msg.payload` is defined and contains the expected properties before further processing.
Upgrade
Version history
1.0.5latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
node-red-contrib-dwd-local-weather — npm install node-red-contrib-dwd-local-weather · libregistry