Open-Meteo forecast

Current weather and forecasts for a place, no key.

  • Web
  • Since 0.2.0
  • addon
  • weather
  • forecast
  • temperature
  • open-meteo
  • web
  • data

Open in TuneToys

Open-Meteo forecast as the Patch draws it, at default values: inlets on the left, outlets on the right.

Open-Meteo forecast asks Open-Meteo for the current weather and an hourly forecast at a latitude and longitude. It needs no key.

What it does#

The node is generated from the open-meteo addon manifest. It builds a GET https://api.open-meteo.com/v1/forecast request from its parameters and runs it exactly like a Web request: response is the parsed JSON, with current and hourly blocks holding the variables you asked for, plus status, error and done.

With trigger cabled, each trigger asks once. Without it, a change on any cabled parameter port asks; with no cable at all, the node asks once when the Toy starts. Every parameter uses its cable when one is connected, otherwise the node's own setting.

A Toy using this node requires the network and the open-meteo addon. Enable the addon in Settings → Addons: requests then go straight from your browser, which Open-Meteo allows, and fall back to the proxy when you are signed in. Open-Meteo is free for non-commercial use under 10 000 requests per day; credit "Weather data by Open-Meteo.com" (CC BY 4.0) where you show the data. During replay the recorded responses are played back instead.

When to use it#

Use it to make sound follow the weather: temperature into a delay time, wind speed into a filter, rain into density. Pick values with Convert and bridge them with Data to control.

Ports#

PortDirectionSignalLanes
triggerInputData (trigger)1
latitudeInputData (number)1
longitudeInputData (number)1
currentInputData (string)1
hourlyInputData (string)1
forecast_daysInputData (integer)1
responseOutputData (json)1
statusOutputData (integer)1
errorOutputData (string)1
doneOutputData (trigger)1

Parameters#

ParameterLabelRangeDefaultUnitScaleNotes
latitudeLatitude-90 to 9052.52°linearDegrees north; negative is south. Used while the port has no cable.
longitudeLongitude-180 to 18013.41°linearDegrees east; negative is west. Used while the port has no cable.
forecast_daysForecast days1 to 161linearDays of hourly forecast, 1 to 16. Used while the port has no cable.
  • current: text.
  • hourly: text.

Latitude (latitude) and Longitude (longitude)#

The place, in degrees: north and east are positive. The defaults are Berlin (52.52, 13.41).

Forecast days (forecast_days)#

How many days of hourly forecast to return, 1 to 16.

Current and hourly#

The current and hourly text fields list variables, comma separated, such as temperature_2m,wind_speed_10m,precipitation. current defaults to temperature and wind speed; an empty hourly asks for no hourly forecast. The Open-Meteo documentation lists every variable.

Tips#

  • Weather changes slowly. Refresh with a Cron every 10 minutes or more, not every second.
  • Temperatures come in °C by default; the response's current_units says so.

See also#

Web request, Convert, Data to control, Data cables.

Help patches

Each help patch is an ordinary Toy that teaches one idea. The diagram shows the Patch; the preview shows its Frame. Open it in TuneToys to play and edit it.

1. Weather in Berlin

beginner Teaches: latitude, longitude, forecast_days

The forecast node asks Open-Meteo once when the Toy starts; Convert picks the temperature.

Patch: Open-Meteo forecast response output connected to Convert value input. Convert value output connected to Console log “log” value input. Open-Meteo forecast error output connected to Console log “oops” value input.
Connections as text
  • Open-Meteo forecast response output connected to Convert value input
  • Convert value output connected to Console log “log” value input
  • Open-Meteo forecast error output connected to Console log “oops” value input
  • With no cable at all the node asks once at start; cable a Cron into trigger to refresh.
  • Latitude and Longitude are used while their ports have no cable.
Frame preview: Weather in BerlinFrame “Weather in Berlin” with 2 elements: text heading, text hint.WEATHER IN BERLINNeeds the network and the Open-Meteo addon enabled (Settings → Addons). Weather…
Frame preview (static). Controls show their default values.

Open in TuneToys

  • Web request Fetch a URL on each trigger under the network allowlist; secrets come from a vault slot, never the Toy.
  • Convert Convert a value to another datatype, optionally picking a field or formatting a string; failures go to error.
  • Data to control Turn numbers into one control lane for a parameter or control input, mapped from a declared range.

Edit this page on GitHub

esc

↑ ↓ move↩ open⌘↩ new tabesc close