Skip to content
AWTRIX Flows
Submit flow
Wetter Script shown on an AWTRIX display
Fig. 1 Wetter Script, as Hank_the_Tank runs it.

Wetter Script

Wetter, 15-Stunden-Prognose und Mondphase

Specifications
System AWTRIX NG Scripts
Firmware AWTRIX NG
Topic Miscellaneous
Built by Hank_the_Tank
File fGEhP0cZZd6E.ax · 4.4 KB
Icons 22
Published 31 Jul 2026 · updated 31 Jul 2026

Weather 3.0 for AWTRIX NG

A compact and memory-optimized weather app for AWTRIX NG. The script displays the current outdoor temperature, current weather conditions, a color-coded 15-hour temperature forecast, and the current moon phase on a 32×8 pixel matrix.

Weather data is provided by Open-Meteo. No user account or API key is required.

Display layout

The display is divided into four areas:

  • left: icon for the current weather conditions
  • center: current temperature rounded to a whole degree
  • right: icon for the current moon phase
  • below the temperature: 15 colored pixels showing the temperature trend for the next 15 hours

Each forecast pixel represents approximately one hour. Its color indicates the expected temperature range:

  • Purple and dark blue: very cold
  • Light blue: cool
  • Green: mild
  • Yellow: warm
  • Orange and red: hot

The current temperature is also shown in a color matching its value.

Features

  • current outdoor temperature
  • current conditions based on the WMO weather code
  • 15-hour temperature forecast
  • automatically calculated moon phase
  • weather updates approximately every five minutes
  • manual refresh using the middle button
  • storage of the last known temperature label, color, and weather icon
  • immediate display of the last known values after a restart
  • red status pixel for previously loaded weather data that has become outdated
  • no API key required
  • particularly low RAM usage

Memory optimization

The script has been optimized specifically for the limited memory available on AWTRIX NG devices.

Instead of loading the complete Open-Meteo response and converting it into a large JSON object tree, it keeps only a small response window of up to 640 bytes. The required values are then extracted using regular expressions.

This significantly reduces memory usage and allows the script to run more reliably alongside other scripts, particularly on devices without PSRAM.

Updates and data age

Weather data is requested from Open-Meteo approximately every five minutes.

After a successful request, the data-age counter is reset. If the last successfully loaded data is more than approximately 20 minutes old, a red pixel appears in the bottom-right corner.

The red pixel indicates that the displayed values may no longer be current. In this case, check the Wi-Fi connection, internet access, and the AWTRIX device log.

Note: If no weather data has ever been loaded or stored successfully, the script only displays .... The red pixel is not drawn in this initial state. It appears only when existing weather data later becomes outdated.

Controls

Pressing the middle button on the AWTRIX NG immediately requests fresh weather data.

The app otherwise uses the global app duration and rotation settings configured on the AWTRIX NG.

Changing the location

Before sharing or installing the script, the coordinates should be changed to the user's location.

The relevant line is located in the section marked Standort hier setzen:

"?latitude=52.52&longitude=13.40"
  • latitude is the geographic latitude.
  • longitude is the geographic longitude.

The included values 52.52, 13.40 point to the Berlin area in Germany. Other users must replace them with their own coordinates.

Coordinates can be found using OpenStreetMap or another mapping service.

Required weather icons

The following icon IDs are used for the current weather conditions:

  • 53386 – clear sky
  • 2286 – partly cloudy
  • 53384 – overcast
  • 17055 – fog
  • 2720 – rain or drizzle
  • 2289 – snow
  • 49300 – rain showers
  • 29839 – thunderstorm
  • 36637 – unknown or unmapped weather condition

If the selected weather icon is unavailable, the script draws a small yellow sun as a fallback.

Required moon-phase icons

The following icon IDs are used for the moon phases:

  • 2318
  • 2319
  • 2320
  • 2321
  • 2314
  • 2315
  • 2316
  • 2317

These icons must be stored on the AWTRIX NG before the script is used. There is currently no drawn fallback for a missing moon-phase icon.

After saving, the script automatically requests its first weather data. Until the first successful request completes, the display shows ....

Requirements

  • AWTRIX NG with scripting enabled
  • working Wi-Fi and internet connection
  • access to https://api.open-meteo.com
  • required weather and moon-phase icons stored on the device
  • tested with AWTRIX NG firmware 1.0.9-dev

Privacy

The script sends only the configured geographic coordinates to Open-Meteo.

It requires:

  • no user account
  • no API key
  • no personal credentials
  • no Home Assistant or MQTT connection

The HTTPS connection is encrypted. As is standard for AWTRIX NG scripts, the firmware does not verify the remote certificate.

Troubleshooting

The display only shows ...

The AWTRIX NG has not yet received valid weather data. Check the following:

  • Is the device connected to Wi-Fi?
  • Does it have internet access?
  • Is api.open-meteo.com reachable?
  • Are the configured coordinates valid?
  • Is the script included in the app rotation?

A red pixel appears in the bottom-right corner

The last successfully loaded weather data is more than approximately 20 minutes old. The rest of the display continues to show the last known values.

The weather icon is missing

Check whether the required icon ID is stored on the AWTRIX NG. If a weather icon is missing, the script should draw a small yellow sun as a fallback.

The moon phase is missing

The corresponding moon-phase icon is probably not stored on the device.

The display shows ERR:Weather or ERR:Wetter

The script encountered a syntax or runtime error. The full error message is shown next to the script in the web interface and in the device log.

Credits

  • Weather data: Open-Meteo
  • Firmware and scripting system: Blueforcer / AWTRIX NG
  • Weather app: Hank_the_Tank / Codex
  • Memory optimization: with support from the AWTRIX NG developer

More flows for AWTRIX NG Scripts or Miscellaneous

Something wrong with this flow? Report it.