[FREE] OpenMeteo Weather Extension

Hello, Kodular Community!

I want to share my first extension with you: OpenMeteo Weather. With this extension, you can easily add the current weather data offered by the free Open-Meteo API to your apps. It’s a good option if you need to show what the weather is like right now, anywhere.

Main Features (Current Weather)

  • Essential Data: Access key information for the current moment:
    • Temperature (Real and Apparent)
    • Relative Humidity
    • Wind Speed and Direction
    • Wind Gusts
    • Precipitation, Rain, Showers, Snow
    • WMO Weather Code
    • Cloud Cover (%)
    • Atmospheric Pressure (Sea Level and Surface)
    • Day/Night Indicator
  • Configurable Units: Adjust the units as you prefer:
    • Temperature: Celsius (celsius) / Fahrenheit (fahrenheit)
    • Wind Speed: km/h (kmh), m/s (ms), mph (mph), knots (knots)
    • Precipitation: Millimeters (mm) / Inches (inch)
    • Time Format: ISO 8601 (iso8601) / Unix Timestamp (unixtime) for the currentTime field.

Blocks

1. Properties (Configurable in Designer and Blocks):

  • (Property) TemperatureUnit: Sets or reads the temperature unit (‘celsius’ or ‘fahrenheit’).
  • (Property) WindSpeedUnit: Sets or reads the wind speed unit (‘kmh’, ‘ms’, ‘mph’, ‘knots’).
  • (Property) PrecipitationUnit: Sets or reads the precipitation unit (‘mm’ or ‘inch’).
  • (Property) TimeFormat: Sets or reads the time format (‘iso8601’ or ‘unixtime’).

2. Main Method:

  • (Method) RequestWeatherData:
    • Description: Initiates the request to the Open-Meteo API to get the current weather data.
    • Parameters: latitude (Number), longitude (Number).

3. Events:

  • (Event) GotCurrentWeatherData:
    • Description: Triggered when the extension successfully receives the current weather data.
    • Returned Parameters: currentTime (Text), currentTemperature2m (Number), currentRelativeHumidity2m (Number), currentApparentTemperature (Number), currentIsDay (Number), currentWindSpeed10m (Number), currentWindDirection10m (Number), currentWindGusts10m (Number), currentPrecipitation (Number), currentRain (Number), currentShowers (Number), currentSnowfall (Number), currentWeatherCode (Number), currentCloudCover (Number), currentPressureMsl (Number), currentSurfacePressure (Number), temperatureUnitUsed (Text), windSpeedUnitUsed (Text), precipitationUnitUsed (Text), timeFormatUsed (Text).
  • (Event) WeatherDataError:
    • Description: Triggered if an error occurs during the request or while processing the response.
    • Returned Parameter: message (Text - Describes the error).

Usage

Downloads

Credits

  • Open-Meteo: For their excellent, free, and open-source weather API (open-meteo.com).
  • Kodular Community: For the great ecosystem and the help always found here.

I hope this extension is useful to you. As this is my first contribution, I greatly appreciate your comments, suggestions, or if you find any errors. Thanks!

3 Likes

Why are you using an advanced block?

Just use the regular event from the OpenMeteoApi drawer instead

Taifun

1 Like

Oops! Right, thanks for the heads-up. I already changed the example image to use the regular OpenMateoApi1 block and I also updated the example AIA file in the post.