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.

FlowAWTRIX NG

Weather Script for TC002

On an AWTRIX display
Weather Script for TC002 shown on an AWTRIX display
Weather Script for TC002 · 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
Miscellaneous
Includes
Script · 20 icons

Runs on

  • Does not run on Ulanzi TC001 Needs a panel of at least 52×16; its panel is 32×8.
  • Runs on Ulanzi TC002
  • Runs on ESP32 (DIY) Needs a panel of at least 52×16.
  • Runs on ESP32-S3 (DIY) Needs a panel of at least 52×16.
  • Does not run on Ulanzi TC001 with AWTRIX 3 Made for AWTRIX NG.

Choose your display in the next step.

Send to AWTRIX

Choose your AWTRIX

Weather Script for TC002AWTRIX 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 or hostname, 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.

Flow description

Weather for AWTRIX NG (Ulanzi TC002)

Version 5.6 · 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
│  icon  │                                          │
├────────┤  ·            ·                          │  ← 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).
  • Weather icon. It follows the WMO weather code, plus two extra rules:
    • A clear-night icon after sunset.
    • A windy icon on dry days once the wind reaches a set speed.
  • Moon phase. Eight phases, calculated on the device. 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.3).
  • A 52×16 display. The layout is written for it and is not meant for 32×8 clocks.
  • The weather and moon icons listed below.

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. The app shows a button to install the missing icons. Press it.
  5. 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 icon
Graph auto auto (today, from 18:00 next 24 h), today (0–24 h), next24
Midnight tick #2040A0 Colour of the midnight tick (next24 view)
Noon tick #A08000 Colour of the noon tick

Icons

All icons are 8×8 and available on the AWTRIX Hub. The script lists them in its @icons header, so the web UI can install them in one go.

Condition WMO codes Hub icon
Clear (day) 0 weather-clear-sky-sunny
Clear (night) 0–1 at night weather-clear-night
Partly cloudy 1–2 weather-partly-cloudy
Cloudy 3 cloud-cloudy-overcast
Fog 45–48 weather-fog
Drizzle 51–57 weather-drizzle
Rain 61–67 weather-rain-or-drizzle
Snow 71–77, 85–86 weather-snow
Showers 80–82 weather-rain-showers
Thunderstorm 95 weather-thunder
Thunderstorm with hail 96, 99 weather-hail
Windy (dry, wind ≥ threshold) – weather-windy
Moon phase Hub icon
New moon moon-new-moon
Waxing crescent moon-waxing-crescent
First quarter moon-first-quarter
Waxing gibbous moon-waxing-gibbous
Full moon moon-full-moon
Waning gibbous moon-waning-gibbous
Last quarter moon-last-quarter
Waning crescent moon-waning-crescent

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 icon: the weather you actually had outside.

Credits

More flows for AWTRIX NG Scripts or Miscellaneous

Something wrong with this flow? Report it.