Skip to content

New Share your ideas with the AWTRIX community. Keep your creations together in your account.

Sign in

Which AWTRIX do you have? Choose it once and the Hub shows what runs on it.

ScriptAWTRIX NG

Regenradar / weather radar

On an AWTRIX display
Regenradar / weather radar shown on an AWTRIX display
Regenradar / weather radar · by Jutsch

On your display

Regenradar – rain in the next 2 hours, straight from the DWD weather radar (Germany)

Which AWTRIX do you have? See below where it runs, or choose your device.
Topic
Smarthome
Includes
Script

Runs on

  • Runs on 32×8 (TC001 & DIY)
  • Runs on 52×16 (TC002)
  • Does not run on 32×8 with AWTRIX 3 (TC001 & DIY) Made for AWTRIX NG.

Choose your display in the next step.

Send to AWTRIX

Choose your AWTRIX

Regenradar / weather radarAWTRIX NG script

Install this script on your AWTRIX NG. Its icons and sounds are installed with it.

Your AWTRIX’s local address, for example 192.168.178.39 or awtrix.local.

The name shown in your AWTRIX script list. Use letters, digits, hyphens or underscores.

Connection & device login

Connect your phone or computer to the same network as your AWTRIX. Allow local network access if your browser asks.

Use the device’s IP address, without a page path such as /#/apps.

If your AWTRIX requires a login, the username and password fields will appear when you connect.

Sign in to the Hub to install scripts. Attached files are installed separately.

Script description

Shows whether, when and how hard it will rain at home within the next two hours, in 5-minute steps. The data is the radar nowcast of the German weather service (DWD), which is far more precise for the next two hours than any hourly forecast.

What you see

Left: an animated tile – sun (or moon and stars at night) when it stays dry, a cloud with sun and a drop when rain is coming, a dark cloud with falling rain when it rains now (denser and faster when it pours).
Right, for 3 s: DRY / 25 MIN / NOW (German: TROCKEN / 25 MIN / JETZT).
Then 24 bars grow in from the left: 2 hours in 5-minute steps, "now" on the left, a tick every 30 minutes. Height and colour show the intensity, from blue (drizzle) to red (over 15 mm/h). When it stays dry, only the text is shown.
... = no message received yet (check MQTT), --- = no new data for over 2 hours, red dot top right = no message for 15 minutes.

Requirements

Home Assistant with MQTT; AWTRIX NG connected to the same broker (Settings → MQTT)
A home location in Germany or close to its borders (coverage of the DWD radar)

Why Home Assistant? The radar comes from Bright Sky (free, no API key), which only serves it to clients that accept gzip – the clock cannot. So Home Assistant fetches it every 5 minutes and pushes about 25 numbers via MQTT. No HTTPS, no JSON parsing and very little memory on the clock. Home Assistant's own home location is used, nothing to enter.

Setup

Add to configuration.yaml, then reload REST commands (Developer tools → YAML):
yaml
rest_command:
regenradar:
url: >-
https://api.brightsky.dev/radar?distance=1000&format=plain&lat={{ state_attr('zone.home', 'latitude') }}&lon={{ state_attr('zone.home', 'longitude') }}&date={{ utcnow().strftime('%Y-%m-%dT%H:%M') }}
method: get
timeout: 20
Create a new automation, switch to Edit in YAML, paste, save and run it once:
yaml
alias: Regenradar an AWTRIX
description: DWD radar (Bright Sky) every 5 minutes via MQTT to the Regenradar app
triggers:

  • trigger: time_pattern
    minutes: "/5"
  • trigger: homeassistant
    event: start
    actions:
  • action: rest_command.regenradar
    response_variable: r
    continue_on_error: true
  • condition: template
    value_template: "{{ r is defined and r.status == 200 and (r.content.radar | default([]) | count) > 0 }}"
  • action: mqtt.publish
    data:
    topic: regenradar
    retain: true
    payload: "{{ (as_timestamp(r.content.radar[0].timestamp) / 60) | int }}{% for f in r.content.radar %} {{ f.precipitation_5 | map('max') | max }}{% endfor %}"
    mode: single
    Install the script. Settings:
    MQTT-Topic – regenradar, same as in the automation
    Sensitivity – high: drizzle counts, normal: from about 0.5 mm/h, low: from about 1 mm/h
    Only show when rain is coming – skips the app in the rotation while it stays dry
    Language – de or en

The message is retained, so the clock has data right after a reboot.

Data: Deutscher Wetterdienst (DWD), radar composite RV, via Bright Sky. Made with Claude.

Kurz auf Deutsch: Zeigt, ob, wann und wie stark es in den nächsten zwei Stunden zu Hause regnet – aus dem Radar des Deutschen Wetterdienstes, in 5-Minuten-Schritten. Home Assistant holt die Daten alle 5 Minuten und schickt sie per MQTT an die Uhr; der Standort kommt aus zone.home. Einrichtung wie oben in drei Schritten, Sprache in den Einstellungen auf de lassen.

More scripts in Smarthome

Something wrong with this script? Report it.