Overview
Client-mode REST API connector for free weather forecast and solar radiation (Open-Meteo Forecast API).BASE_ADDRESS defaults to https://api.open-meteo.com. Auth: None for non-commercial (optional apikey query for commercial). Pass secrets only at runtime via MQTT JSON placeholders or Hub GET SECRET — never commit real credentials.
Auth
None for non-commercial (optional apikey query for commercial). Prefer Hub secrets /GET SECRET. Never hard-code tokens into the .lot.
Basic Syntax
DEFINE ROUTE OpenMeteoRestApi WITH TYPE REST_API
ADD REST_API_CONFIG
WITH BASE_ADDRESS "https://api.open-meteo.com"
WITH ENABLE_CLIENT "true"
WITH USE_SSL "true"
WITH REQUEST_TIMEOUT '30'
WITH DEFAULT_CONTENT_TYPE "application/json"
# Optional: WITH USERNAME "YOUR_USER" / WITH PASSWORD GET SECRET "APP_PASSWORD"
ADD EVENT Getforecasthourlysolar
WITH SOURCE_TOPIC "integrations/open-meteo/request/Getforecasthourlysolar"
WITH DESTINATION_TOPIC "integrations/open-meteo/response/Getforecasthourlysolar"
WITH METHOD "GET"
WITH ENDPOINT "/v1/forecast?latitude={value.json.latitude}&longitude={value.json.longitude}&hourly=temperature_2m,shortwave_radiation&timezone={value.json.timezone}"
WITH HEADERS
ADD "Accept" "application/json"
ADD EVENT Getcurrentweather
WITH SOURCE_TOPIC "integrations/open-meteo/request/Getcurrentweather"
WITH DESTINATION_TOPIC "integrations/open-meteo/response/Getcurrentweather"
WITH METHOD "GET"
WITH ENDPOINT "/v1/forecast?latitude={value.json.latitude}&longitude={value.json.longitude}¤t=temperature_2m,wind_speed_10m,weather_code&timezone={value.json.timezone}"
WITH HEADERS
ADD "Accept" "application/json"
ADD EVENT Getforecasthourlyweather
WITH SOURCE_TOPIC "integrations/open-meteo/request/Getforecasthourlyweather"
WITH DESTINATION_TOPIC "integrations/open-meteo/response/Getforecasthourlyweather"
WITH METHOD "GET"
WITH ENDPOINT "/v1/forecast?latitude={value.json.latitude}&longitude={value.json.longitude}&hourly=temperature_2m,relative_humidity_2m,precipitation,wind_speed_10m&forecast_days={value.json.forecast_days}&timezone={value.json.timezone}"
WITH HEADERS
ADD "Accept" "application/json"
ADD EVENT Getforecastdaily
WITH SOURCE_TOPIC "integrations/open-meteo/request/Getforecastdaily"
WITH DESTINATION_TOPIC "integrations/open-meteo/response/Getforecastdaily"
WITH METHOD "GET"
WITH ENDPOINT "/v1/forecast?latitude={value.json.latitude}&longitude={value.json.longitude}&daily=temperature_2m_max,temperature_2m_min,precipitation_sum,shortwave_radiation_sum&forecast_days={value.json.forecast_days}&timezone={value.json.timezone}"
# ... additional EVENTs in package .lot ...
MQTT topics
Request topics underintegrations/open-meteo/request/...; responses on integrations/open-meteo/response/....
Template reference
Generated from the shipped broker templateopen-meteo (-routeCode OPEN_METEO). It lists every event the template defines.
Auth
None for non-commercial (optional apikey query for commercial)Template parameters
| Placeholder | Type | Description | Required |
|---|---|---|---|
RouteName | string | Name of the Open-Meteo connector | no |
BaseUrl | string | Open-Meteo base URL without trailing slash (e.g. https://api.open-meteo.com) | yes |
BASE_ADDRESS default: https://api.open-meteo.com.
Events
| Event | Method | Endpoint | Request topic | Response topic | Payload fields |
|---|---|---|---|---|---|
Getforecasthourlysolar | GET | /v1/forecast?latitude={value.json.latitude}&longitude={value.json.longitude}&hourly=temperature_2m,shortwave_radiation&timezone={value.json.timezone} | integrations/open-meteo/request/Getforecasthourlysolar | integrations/open-meteo/response/Getforecasthourlysolar | latitude, longitude, timezone |
Getcurrentweather | GET | /v1/forecast?latitude={value.json.latitude}&longitude={value.json.longitude}¤t=temperature_2m,wind_speed_10m,weather_code&timezone={value.json.timezone} | integrations/open-meteo/request/Getcurrentweather | integrations/open-meteo/response/Getcurrentweather | latitude, longitude, timezone |
Getforecasthourlyweather | GET | /v1/forecast?latitude={value.json.latitude}&longitude={value.json.longitude}&hourly=temperature_2m,relative_humidity_2m,precipitation,wind_speed_10m&forecast_days={value.json.forecast_days}&timezone={value.json.timezone} | integrations/open-meteo/request/Getforecasthourlyweather | integrations/open-meteo/response/Getforecasthourlyweather | forecast_days, latitude, longitude, timezone |
Getforecastdaily | GET | /v1/forecast?latitude={value.json.latitude}&longitude={value.json.longitude}&daily=temperature_2m_max,temperature_2m_min,precipitation_sum,shortwave_radiation_sum&forecast_days={value.json.forecast_days}&timezone={value.json.timezone} | integrations/open-meteo/request/Getforecastdaily | integrations/open-meteo/response/Getforecastdaily | forecast_days, latitude, longitude, timezone |
Getsolarradiation | GET | /v1/forecast?latitude={value.json.latitude}&longitude={value.json.longitude}&hourly=shortwave_radiation,direct_radiation,diffuse_radiation,direct_normal_irradiance&timezone={value.json.timezone} | integrations/open-meteo/request/Getsolarradiation | integrations/open-meteo/response/Getsolarradiation | latitude, longitude, timezone |
Getforecastbymodel | GET | /v1/forecast?latitude={value.json.latitude}&longitude={value.json.longitude}&hourly=temperature_2m&models={value.json.models}&timezone={value.json.timezone} | integrations/open-meteo/request/Getforecastbymodel | integrations/open-meteo/response/Getforecastbymodel | latitude, longitude, models, timezone |
Getelevation | GET | /v1/elevation?latitude={value.json.latitude}&longitude={value.json.longitude} | integrations/open-meteo/request/Getelevation | integrations/open-meteo/response/Getelevation | latitude, longitude |
Deploy
Get the template card (JSON withtemplate and metadata) from the broker, then deploy the connector:
mosquitto_pub -t '$SYS/Coreflux/Command' -m "-routeCode OPEN_METEO"
BASE_ADDRESS already filled in:
DEFINE ROUTE OpenMeteoRestApi WITH TYPE REST_API
ADD REST_API_CONFIG
WITH BASE_ADDRESS "https://api.open-meteo.com"
WITH ENABLE_CLIENT "true"
WITH USE_SSL "true"
WITH REQUEST_TIMEOUT '30'
WITH DEFAULT_CONTENT_TYPE "application/json"
ADD EVENT Getforecasthourlysolar
WITH SOURCE_TOPIC "integrations/open-meteo/request/Getforecasthourlysolar"
WITH DESTINATION_TOPIC "integrations/open-meteo/response/Getforecasthourlysolar"
WITH METHOD "GET"
WITH ENDPOINT "/v1/forecast?latitude={value.json.latitude}&longitude={value.json.longitude}&hourly=temperature_2m,shortwave_radiation&timezone={value.json.timezone}"
WITH HEADERS
ADD "Accept" "application/json"
ADD EVENT Getcurrentweather
WITH SOURCE_TOPIC "integrations/open-meteo/request/Getcurrentweather"
WITH DESTINATION_TOPIC "integrations/open-meteo/response/Getcurrentweather"
WITH METHOD "GET"
WITH ENDPOINT "/v1/forecast?latitude={value.json.latitude}&longitude={value.json.longitude}¤t=temperature_2m,wind_speed_10m,weather_code&timezone={value.json.timezone}"
WITH HEADERS
ADD "Accept" "application/json"
ADD EVENT Getforecasthourlyweather
WITH SOURCE_TOPIC "integrations/open-meteo/request/Getforecasthourlyweather"
WITH DESTINATION_TOPIC "integrations/open-meteo/response/Getforecasthourlyweather"
WITH METHOD "GET"
WITH ENDPOINT "/v1/forecast?latitude={value.json.latitude}&longitude={value.json.longitude}&hourly=temperature_2m,relative_humidity_2m,precipitation,wind_speed_10m&forecast_days={value.json.forecast_days}&timezone={value.json.timezone}"
WITH HEADERS
ADD "Accept" "application/json"
ADD EVENT Getforecastdaily
WITH SOURCE_TOPIC "integrations/open-meteo/request/Getforecastdaily"
WITH DESTINATION_TOPIC "integrations/open-meteo/response/Getforecastdaily"
WITH METHOD "GET"
WITH ENDPOINT "/v1/forecast?latitude={value.json.latitude}&longitude={value.json.longitude}&daily=temperature_2m_max,temperature_2m_min,precipitation_sum,shortwave_radiation_sum&forecast_days={value.json.forecast_days}&timezone={value.json.timezone}"
WITH HEADERS
ADD "Accept" "application/json"
ADD EVENT Getsolarradiation
WITH SOURCE_TOPIC "integrations/open-meteo/request/Getsolarradiation"
WITH DESTINATION_TOPIC "integrations/open-meteo/response/Getsolarradiation"
WITH METHOD "GET"
WITH ENDPOINT "/v1/forecast?latitude={value.json.latitude}&longitude={value.json.longitude}&hourly=shortwave_radiation,direct_radiation,diffuse_radiation,direct_normal_irradiance&timezone={value.json.timezone}"
WITH HEADERS
ADD "Accept" "application/json"
ADD EVENT Getforecastbymodel
WITH SOURCE_TOPIC "integrations/open-meteo/request/Getforecastbymodel"
WITH DESTINATION_TOPIC "integrations/open-meteo/response/Getforecastbymodel"
WITH METHOD "GET"
WITH ENDPOINT "/v1/forecast?latitude={value.json.latitude}&longitude={value.json.longitude}&hourly=temperature_2m&models={value.json.models}&timezone={value.json.timezone}"
WITH HEADERS
ADD "Accept" "application/json"
ADD EVENT Getelevation
WITH SOURCE_TOPIC "integrations/open-meteo/request/Getelevation"
WITH DESTINATION_TOPIC "integrations/open-meteo/response/Getelevation"
WITH METHOD "GET"
WITH ENDPOINT "/v1/elevation?latitude={value.json.latitude}&longitude={value.json.longitude}"
WITH HEADERS
ADD "Accept" "application/json"
-addRoute (do not include ADD METADATA).
Usage example
CallGetforecasthourlysolar by publishing a JSON payload to its request topic, and read the reply on the response topic:
mosquitto_sub -t 'integrations/open-meteo/response/Getforecasthourlysolar' &
mosquitto_pub -t 'integrations/open-meteo/request/Getforecasthourlysolar' -m '{"latitude": "<latitude>", "longitude": "<longitude>", "timezone": "<timezone>"}'

