This package provides two Node-RED nodes, 'OpenWeatherMap' (input) and 'OpenWeatherMap Query' (query), for integrating weather data from the OpenWeatherMap API into Node-RED flows. The 'input' node periodically fetches current weather or a 5-day forecast based on configured location (city/country or lat/lon) and outputs a message if data changes. The 'query' node allows on-demand fetching of current weather, triggered by input messages containing location details. It returns detailed weather information including temperature, humidity, wind, and precipitation, as well as an object with full API data. Currently at version 1.0.1, it is part of the broader Node-RED ecosystem and follows its release cadence for updates and compatibility. A key differentiator is its seamless integration into Node-RED's visual programming environment, abstracting direct API calls and simplifying complex API interactions into configurable nodes. This makes it accessible for users who prefer visual programming over writing code for data fetching and processing.
npm install node-red-node-openweathermapNo compatibility data collected yet for this library.
This quickstart guides you through installing the Node-RED OpenWeatherMap node, configuring it, and providing example input messages to trigger the 'OpenWeatherMap Query' node for fetching weather data.
Register for a free API key at openweathermap.org/appid and configure it in the Node-RED node's properties within the editor.
If you require on-demand weather data regardless of changes, use the 'OpenWeatherMap Query' node, which triggers on every input message. For debugging, consider connecting a debug node to observe any messages, even if filtered by change.
Ensure your Node-RED flow is designed to correctly parse and process the array structure of the forecast data, extracting the specific daily metrics required.
Obtain a valid API key from openweathermap.org/appid and enter it correctly into the API Key field in the Node-RED node's configuration settings.
Verify that your Node-RED instance has internet access. Check the `city`, `country`, `lat`, and `lon` parameters for accuracy. Also, confirm that your OpenWeatherMap API key is active and not exceeding rate limits.