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

Unifi Internet Speed

On an AWTRIX display
Unifi Internet Speed shown on an AWTRIX display
Unifi Internet Speed · by jan-wtn

On your display

Live-Download/-Upload (Mbit/s) und Datenvolumen der Unifi von Tag, Woche oder Monat - in der App waehlbar.

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

Runs on

  • Does not run on 32×8 (TC001 & DIY) Made for 52×16 (TC002).
  • 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

Unifi Internet SpeedAWTRIX 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

Internet Speed zeigt Download und Upload deines Internetanschlusses live auf einer AWTRIX-NG-Uhr mit 52x16-Display (z. B. Ulanzi TC002) - gruener Pfeil fuer Download, blauer Pfeil fuer Upload, in Mbit/s.

NEU: optionale zweite Seite mit dem DATENVOLUMEN. In den Einstellungen der App waehlst du individuell, welcher Zaehler angezeigt wird:

  • Tag = heute
  • Woche = diese Woche
  • Monat = dieser Monat
  • Aus = ausgeschaltet (nur Geschwindigkeit)
    Die Volumenseite wechselt sich alle 5 Sekunden mit der Geschwindigkeit ab: oben die Summe (z. B. "Vol. Tag 67GB"), unten Download und Upload. Die Beschriftung kuerzt sich selbst passend zum Display; ab 1000 GB zeigt die Uhr TB.

Die Werte kommen per MQTT - jede Quelle funktioniert: Home Assistant, Node-RED, ioBroker, UniFi, FRITZ!Box, UPnP ...
Format (Geschwindigkeit in Mbit/s, Volumen in GB):
{"down": 85.3, "up": 12.1, "vol_day_down": 65.2, "vol_day_up": 2.1, "vol_week_down": 312, "vol_week_up": 12.5, "vol_month_down": 1210, "vol_month_up": 48}
Pflicht sind nur "down" und "up"; die vol_...-Werte fuer die Zeitraeume schicken, die angezeigt werden sollen.

Einstellungen: MQTT-Thema (Standard awtrix/internet), Datenvolumen (Tag / Woche / Monat / Aus), Zeit bis "veraltet" (grau + roter Punkt), Farben fuer Download und Upload.
Voraussetzung: MQTT ist auf der Uhr eingerichtet.

Fertige Home-Assistant-Automation und UniFi-Paket (Live-Durchsatz + Datenvolumen Tag/Woche/Monat, inkl. WAN2-Failover): https://github.com/jan-wtn/awtrix-internet-speed
EINRICHTUNG IN 5 SCHRITTEN (ausfuehrlich: https://github.com/jan-wtn/awtrix-internet-speed/blob/main/docs/SETUP_de.md)

  1. MQTT-Broker - z. B. Home-Assistant-Add-on "Mosquitto broker".
    Benutzer fuer MQTT anlegen: Einstellungen > Personen > Benutzer > Benutzer hinzufuegen, z. B. "mqtt",
    "nur aus dem lokalen Netzwerk", KEIN Administrator.
  2. Uhr: Weboberflaeche > Settings > MQTT > Broker-IP, Port 1883, MQTT-Benutzer und Passwort.
  3. Dieses Skript installieren, Einstellungen oeffnen: MQTT-Thema (awtrix/internet) und DATENVOLUMEN: Tag / Woche / Monat / Aus.
  4. Datenquelle in Home Assistant: Beispiel-Automation (GitHub) einfuegen und eigene Sensoren eintragen (Mbit/s, GB).
  5. UniFi-Gateway (UCG Ultra, UDM, UDR, UXG): LOKALES UniFi-Konto anlegen (Administratoren & Benutzer > Hinzufuegen >
    "Nur lokales Konto", Rolle Network "View Only", Passwort direkt festlegen - keine Einladung), damit die Integration
    UniFi Network in Home Assistant einrichten (Port 443, SSL-Pruefung aus), unifi_wan.py + internet.yaml von GitHub
    kopieren, Home Assistant einmal neu starten.
    Achtung: Nach falschen Passwoertern sperrt UniFi den Login fuer ca. 15 Minuten (HTTP 429).
    Schnelltest: Entwicklerwerkzeuge > Aktionen > mqtt.publish, Thema awtrix/internet, Inhalt {"down": 85.3, "up": 12.1, "vol_day_down": 65.2, "vol_day_up": 2.1}

Autor: jan-wtn - Lizenz: MIT


Internet Speed shows your live internet download and upload on a 52x16 AWTRIX NG clock (e.g. Ulanzi TC002) - green arrow for download, blue arrow for upload, in Mbit/s.

NEW: optional second page with your DATA VOLUME. In the app settings you choose individually which counter is shown:

  • Tag = today
  • Woche = this week
  • Monat = this month
  • Aus = off (speed only)
    The volume page alternates with the speed page every 5 seconds: the total in the top line (e.g. "Vol. Tag 67GB"), download and upload in the bottom line. The title shortens itself to fit the display; above 999 GB the clock shows TB.

Data comes via MQTT, so any source works: Home Assistant, Node-RED, ioBroker, UniFi, FRITZ!Box, UPnP ...
Payload (speed in Mbit/s, volume in GB):
{"down": 85.3, "up": 12.1, "vol_day_down": 65.2, "vol_day_up": 2.1, "vol_week_down": 312, "vol_week_up": 12.5, "vol_month_down": 1210, "vol_month_up": 48}
Only "down" and "up" are required; send the vol_... values for the periods you want to show.

Settings: MQTT topic (default awtrix/internet), Data volume (Tag / Woche / Monat / Aus), time until values are marked as outdated (grey + red dot), colours for download and upload.
Requires MQTT to be configured on the clock.

Ready-made Home Assistant automation and a UniFi gateway package (live WAN throughput + day/week/month volume, incl. WAN2 failover): https://github.com/jan-wtn/awtrix-internet-speed
SETUP IN 5 STEPS (full guide: https://github.com/jan-wtn/awtrix-internet-speed/blob/main/docs/SETUP_en.md)

  1. MQTT broker - e.g. Home Assistant add-on "Mosquitto broker".
    Create a user for MQTT: Settings > People > Users > Add user, e.g. "mqtt", "local network only", NOT admin.
  2. Clock: web UI > Settings > MQTT > broker IP, port 1883, the MQTT user and password.
  3. Install this script, open its settings: MQTT topic (awtrix/internet) and DATA VOLUME: Tag / Woche / Monat / Aus.
  4. Data source in Home Assistant: paste the example automation (GitHub) and enter your sensors (Mbit/s, GB).
  5. UniFi gateway (UCG Ultra, UDM, UDR, UXG): create a LOCAL UniFi account (Admins & Users > Add > "Local Account Only",
    role Network "View Only", set password directly - no invite), add the UniFi Network integration in Home Assistant
    with it (port 443, verify SSL off), copy unifi_wan.py + internet.yaml from GitHub, restart Home Assistant once.
    Note: UniFi blocks logins for ~15 min after wrong passwords (HTTP 429).
    Quick test: Developer tools > Actions > mqtt.publish, topic awtrix/internet, payload {"down": 85.3, "up": 12.1, "vol_day_down": 65.2, "vol_day_up": 2.1}

Author: jan-wtn - License: MIT

More scripts in Multimedia

Something wrong with this script? Report it.