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

Fuel Prices

Shows the cheapest nearby fuel price (Tankerkoenig.de)

Specifications
System AWTRIX NG Scripts
Firmware AWTRIX NG
Topic Miscellaneous
Built by Hank_the_Tank
File A7qGCk8PzkFv.ax · 3.9 KB
Icons 4
Published 8 Sep 2026
Downloads 1

Fuel Prices — AWTRIX NG App

Shows the cheapest nearby fuel price for one fuel type of your choice — Diesel, E5 or E10 —
together with the brand and street of that station, live from the free
tankerkoenig.de API.

type version

What it shows

One scrolling line, right when the app comes up in your rotation:

2.299€ | ARAL | Brunnenstraße

The price is shown in green (configurable), the brand and street in white. A small pump icon
sits to the left of the text — either one you supply yourself, or a simple built-in fallback
shape if none is set or an icon fails to load.

Requirements

  • An AWTRIX NG device (32×8 LED matrix) with network access.
  • A free API key from creativecommons.tankerkoenig.de.
    Registration is free; after signing up you may need to complete a short follow-up
    confirmation step before the key becomes active.
  • Your own approximate coordinates (latitude/longitude), e.g. from
    latlong.net or any map app.

Installation

  1. Open your AWTRIX web interface — its IP address, or http://awtrixng-xxxxxx.local.
  2. Go to the Scripts tab and create a new script, e.g. named FuelPrices.
  3. Paste in the code below and press Save.
  4. The app joins the rotation shortly after. Press the right button on the device to jump
    straight to it.
  5. Open Apps → the menu on the FuelPrices row → Settings, and fill in your API
    key and coordinates (see the table below). Saving restarts the app.

Settings

Setting Type Default Notes
API key text YOUR-API-KEY Paste your tankerkoenig.de key here — never share it publicly.
Latitude / Longitude text Berlin (52.5200 / 13.4050) Use a dot as the decimal separator, e.g. 48.1374.
Radius number, 1–25 km 5 km Search radius; the tankerkoenig API caps this at 25 km.
Fuel select Diesel Diesel, E5 or E10 — one fuel type per app instance.
Refresh number, 5–60 min 10 min How often prices are re-fetched. tankerkoenig prices themselves only update every 4–5 minutes, and the API asks that automated clients not poll faster than every 5 minutes.
Price color color Green (#00FF00) Colour of the price segment; brand/street are always white.
Icon ID text (empty) Optional 8×8 icon ID already installed on your device. Leave empty for a drawn placeholder pump icon.

To show more than one fuel type, install the script again under a different name and pick a
different fuel in its own settings — each installed copy keeps its own settings and state.

How it works (short version)

  • Queries list.php sorted by price for the selected fuel type, so the first station in the
    response is always the cheapest match in range.
  • Uses the device's find/keep HTTP option to pull only a small window of the response
    (the first station's record) instead of the whole reply, to stay light on the shared script
    memory.
  • Refetches on a timer in the background (loop()), so the panel always has something to
    show the moment it's this app's turn — never a blank screen.
  • Pressing the middle/select button while the app is showing forces an immediate refresh.

Notes & limitations

  • Needs a valid, activated API key — an invalid or not-yet-active key fails silently on the
    panel (keeps showing ...), but logs a line under Log in the AWTRIX web UI so you can
    tell it apart from a real "no stations found" case.
  • Shows the single cheapest station in range for the chosen fuel — not a list of several
    stations.
  • Respect tankerkoenig's fair-use terms: don't set the refresh interval below 5 minutes, and
    don't share your personal API key.

More flows for AWTRIX NG Scripts or Miscellaneous

Something wrong with this flow? Report it.