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

Weather

On an AWTRIX display
Weather shown on an AWTRIX display
Weather · by .hank_the_tank

On your display

Big temperature and humidity, forecast area below

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

Runs on

  • Runs on 32×8 (TC001 & DIY)
  • Runs on 52×16 (TC002) 52×16 (TC002) version
  • 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

WeatherAWTRIX 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

Weather for AWTRIX NG (Ulanzi TC002)

Version 6.1 · by Hank_the_Tank / Claude · for the 52×16 panel of the Ulanzi TC002

Current weather, humidity, moon phase and an hourly temperature forecast on a single screen. The weather data comes from Open-Meteo, so you don't need an API key or an account.

┌────────┬──────────────────────────────────────────┐
│weather │        24°      58%                      │  ← big temperature + humidity
│ symbol │                                          │
├────────┤  ·            ·                          │  ← noon / midnight ticks
│  moon  │ ▁▁▂▃▄▅▅▆▆▇▇█▇▆▅▄▃▃▂▂▁▁                   │  ← forecast area, "now" lit up
│ phase  │                                          │
└────────┴──────────────────────────────────────────┘

Features

  • Big temperature and humidity side by side. Both use 6×10 px block digits. The temperature is coloured on a scale that runs from violet (frost) through green and yellow to red (heat).
    • If a pair like -12° / 100% doesn't fit, the digits switch to a narrow 5 px form. If that still doesn't fit, the % sign is dropped.
    • Humidity can also alternate with the temperature every 4 s, or be hidden.
  • Forecast area. A filled temperature curve with a bright edge and a dimmed fill, coloured by temperature.
    • today: 0–24 h of the current day. A white-topped column marks now and moves across the day.
    • next24: the coming 24 hours from the current hour.
    • auto (default): today until 18:00, then next24, so in the evening you can see the coming night.
    • The area always spans the shown hours' own min/max, so the 5 rows are fully used.
    • Small ticks mark noon and midnight (midnight in the next24 view only).
  • Animated weather symbols, drawn in code. No icons to install. Twelve symbols, all moving:
    • a round sun with a glint travelling around its edge
    • a crescent with twinkling stars and the odd shooting star at night
    • drifting clouds, a sun peeking out for partly cloudy and showers
    • drifting fog bands, falling drizzle, rain, hail and swaying snowflakes
    • a dark thunder cloud with a double lightning flash every 3 s
    • wind gusts blowing through
  • Which symbol. It follows the WMO weather code, plus three extra rules:
    • For dry weather the actual cloud cover (%) picks clear, partly cloudy or cloudy, because the WMO codes 1–3 are coarse. By day, the cloudy symbol is only shown when the sun is not actually shining (Open-Meteo sunshine duration), so thin or high clouds with sunshine show partly cloudy.
    • The clear-night symbol after sunset (there is no partly-cloudy night symbol).
    • The windy symbol on dry days once the wind reaches a set speed.
  • Moon of the day. The exact phase for today is calculated on the device and drawn with a smooth edge, so the crescent grows and shrinks a little every day. No extra request is needed.
  • Starts with data. After a reboot the last known values show at once, instead of an empty panel.
  • Stale-data warning. A red dot under the moon means no successful update for more than 25 minutes.
  • Refresh. Every 15 minutes. Press the middle button while the app is on screen to refresh right away.

Requirements

  • An Ulanzi TC002 running AWTRIX NG (tested on firmware 1.1.7).
  • A 52×16 display. The layout is written for it and is not meant for 32×8 clocks.
  • No icons. All symbols are drawn by the script.

Installation

  1. Open the AWTRIX web interface in a browser, using the clock's IP address or http://awtrixng-xxxxxx.local.
  2. Go to the Scripts tab and create a new script called Weather.
  3. Paste the contents of Weather_share.ax and press Save.
  4. Open the Apps tab, click the gear on the Weather row and enter your own latitude and longitude.

The app joins the rotation right away. If the panel shows a red ERR:, the error message is shown next to the script in the Scripts tab. Please include it in your feedback.

Settings

All settings are on the Apps tab, behind the gear on the Weather row. Saving restarts the app.

Setting Default What it does
Latitude / Longitude 52.52 / 13.40 (Berlin) Your location. Set this first.
Temperature unit C C or F
Humidity beside beside the temperature, alternate every 4 s, or off
Humidity colour #31B8DB Colour of the humidity value
Windy from 30 km/h On dry days (clear, cloudy, fog), this wind speed or more shows the windy symbol
Cloudy from 70 % Without rain, snow or fog: from this cloud cover the cloudy symbol – by day only if the sun is not shining; from half of it partly cloudy (by day); below that clear
Graph auto auto: today during the day, next24 from 18:00–23:59 · today: always 0–24 h of the current day, the current hour lit up · next24: always the coming 24 hours from now
Midnight tick #2040A0 Colour of the midnight tick (next24 view)
Noon tick #A08000 Colour of the noon tick

Symbols

All symbols are 8×8 and animated. The weather symbol sits top left, the moon below it.

Condition WMO codes Symbol
Clear (day) 0 round sun with a travelling glint
Clear (night) 0–3 at night, below the cloudy threshold crescent, twinkling stars, shooting star
Partly cloudy 1–2 small sun behind a drifting cloud
Cloudy 3 two clouds drifting past each other
Fog 45–48 fog bands moving in opposite directions
Drizzle 51–57 light cloud, a few slow drops
Rain 61–67 grey cloud, fast drops with short streaks
Snow 71–77, 85–86 light cloud, swaying snowflakes
Showers 80–82 sun behind a cloud, rain
Thunderstorm 95 dark cloud, double lightning flash every 3 s
Thunderstorm with hail 96, 99 cloud, fast hail, pellets on the ground
Windy (dry, wind ≥ threshold) – wind gusts with little curls

Feedback

This is a test release. Useful feedback:

  • Something looks wrong: a photo of the panel, plus your location, the time and the weather at that moment.
  • The panel shows ERR:: the error text from the Scripts tab.
  • A condition shows the wrong symbol: the weather you actually had outside.

Credits

Changelog

  • 6.1 – Cleaner digit 1: a short flag and a full-width stem without a foot, only as wide as it needs to be. Values with a 1 no longer drop to the narrow digit form as early.
  • 6.0 – Weather and moon symbols are now drawn and animated by the script; no Hub icons needed any more. The moon shows the exact phase of the day with a smooth, round edge.
  • 5.9 – Previous release with AWTRIX Hub icons.

More scripts in News

Something wrong with this script? Report it.