Overview
OpenWeatherMap supplies current conditions, a 5-day forecast, geocoding, air pollution, and One Call 3.0. This connector is the expanded form of the weather client example on REST API Connectors:BASE_ADDRESS is https://api.openweathermap.org and the key travels as the appid query parameter.
A call without a valid
appid returns HTTP 401 (Invalid API key). This template has not been verified with a live key. Create a free key in the OpenWeatherMap dashboard and pass it only at runtime.Basic Syntax
Events
Auth
OpenWeatherMap uses theappid query parameter, not a Bearer header.
string
required
API key. Publish it on the MQTT JSON payload as
appid ({value.json.appid}). Load it from a Hub secret. Never commit the key.string
City name for city endpoints, for example
London.string
metric, imperial, or standard.Try it
- Add the connector on a lab broker.
- Publish the JSON above to
integrations/openweathermap/request/Getcurrentweatherbycity. - Subscribe to
integrations/openweathermap/response/Getcurrentweatherbycity. - Coordinates: publish
lat,lon,units, andappidtointegrations/openweathermap/request/Getcurrentweatherbycoords.
A probe of
GET /data/2.5/weather?q=London with an invalid appid returned HTTP 401. lot_lint reported no findings on OpenweathermapRestApi. That does not replace a call with a real key.
