Eurojackpot
Displays the upcoming Eurojackpot jackpot amount on your AWTRIX NG.
| System | AWTRIX NG Scripts |
|---|---|
| Firmware | AWTRIX NG |
| Topic | Miscellaneous |
| Built by | breiti |
| File | jBODq84T2cwU.ax · 4.2 KB |
| Icons | — |
| Published | 12 Aug 2026 |
Displays the current jackpot amount for the upcoming Eurojackpot draw on your AWTRIX NG.
The jackpot value is fetched automatically and periodically refreshed. The last valid jackpot value is stored locally, so it can still be displayed after a restart until fresh data becomes available.
The app includes a built-in Euro-style icon, so no additional icon is required. If you prefer another icon, first choose and download an icon from the LaMetric icon library to your AWTRIX device. Then enter the corresponding icon ID in the app settings. If the field is left empty, or the selected icon cannot be loaded, the built-in icon is used automatically.
Configuration:
Icon ID – Optional LaMetric icon ID. Download the icon to your AWTRIX device first, then enter its ID here. Leave empty to use the built-in icon.
Icon spacing – Distance between the icon and jackpot value
Scroll speed – Scrolling speed if the value does not fit
Start time HHMM – Start of the display time window
End time HHMM – End of the display time window
Refresh interval – How often the jackpot value is refreshed
Display duration – Custom app duration; 0 uses the device setting
If the start and end times are identical, the app is always active.
Pressing the Select button triggers a refresh on the next loop cycle.
jBODq84T2cwU.ax
# @name Eurojackpot
# @desc Shows the upcoming Eurojackpot
# @author breiti
# @version 1.1
# @config icon_id text "Icon ID" maxlen=24 help="Optional icon ID; empty = built-in icon"
# @config icon_gap slider "Icon spacing" default=3 min=1 max=8 step=1 unit=px
# @config scroll_speed slider "Scroll speed" default=100 min=25 max=200 step=5 unit=%
# @config start_time number "Start time HHMM" default=600 min=0 max=2359 help="Same as end time = always active"
# @config end_time number "End time HHMM" default=1900 min=0 max=2359 help="Same as start time = always active"
# @config refresh_min number "Refresh interval" default=60 min=1 max=1440 unit=min
# @config duration_sec slider "Display duration" default=0 min=0 max=120 unit=s help="0 = device setting"
import json
class Eurojackpot
var url
var jackpot
var value_text
var ticks
var refresh_ticks
var in_flight
var icon_id
var icon_gap
var scroll_opts
var start_time
var end_time
var duration_sec
def init()
self.url = "https://www.lottoland.com/en/api/drawings/euroJackpot"
self.icon_id = store.get("icon_id")
self.icon_gap = store.get("icon_gap")
self.scroll_opts = {
"speed": store.get("scroll_speed"),
"whenFits": "static"
}
self.start_time = store.get("start_time")
self.end_time = store.get("end_time")
self.refresh_ticks = store.get("refresh_min") * 60
self.duration_sec = store.get("duration_sec")
self.jackpot = store.get("jackpot")
if self.jackpot != nil
self.value_text = str(round(self.jackpot)) + "M"
else
self.value_text = "--M"
end
self.ticks = 0
self.in_flight = false
end
def duration()
if self.duration_sec == 0
return 0
end
return self.duration_sec * 1000
end
def on_body(body, status)
self.in_flight = false
if body == nil || status != 200
log("Eurojackpot request failed: " + str(status))
return
end
var data = json.load(body)
if !isinstance(data, map)
log("Eurojackpot: Invalid JSON response")
return
end
var next_draw = data.find("next")
if !isinstance(next_draw, map)
log("Eurojackpot: Missing next field")
return
end
var value = num(next_draw.find("jackpot"))
if value == nil || value <= 0
log("Eurojackpot: Invalid jackpot value")
return
end
self.jackpot = value
self.value_text = str(round(value)) + "M"
store.set("jackpot", value)
end
def loop()
if self.ticks <= 0
self.ticks = self.refresh_ticks
if !self.in_flight
self.in_flight = true
http.get(self.url, / body, status -> self.on_body(body, status))
end
end
self.ticks -= 1
end
def should_show()
var h = hour()
var m = minute()
if h < 0 || m < 0
return false
end
if self.start_time == self.end_time
return true
end
var current_time = h * 60 + m
var start = (self.start_time / 100) * 60 + self.start_time % 100
var finish = (self.end_time / 100) * 60 + self.end_time % 100
if start < finish
return current_time >= start && current_time < finish
end
return current_time >= start || current_time < finish
end
def draw()
clear()
if self.icon_id == "" || !icon(self.icon_id, 0, 0)
var color = 0xFFD200
line(3, 0, 6, 0, color)
line(2, 1, 7, 1, color)
rect_fill(1, 2, 2, 2, color)
line(0, 3, 5, 3, color)
line(0, 4, 5, 4, color)
rect_fill(1, 5, 2, 2, color)
line(2, 6, 7, 6, color)
line(3, 7, 6, 7, color)
end
var x = 8 + self.icon_gap
var w = width() - x
var color = settings.get("textColor")
if text_ink_width(self.value_text) <= w
text(x, 6, self.value_text, color)
else
scroll_text(x, 6, w,
self.value_text,
color,
self.scroll_opts)
end
end
def on_button(btn)
if btn == "select"
self.ticks = 0
end
end
end
return Eurojackpot()
Install it on your AWTRIX NG
Your browser writes the script straight to the device on your network. It joins the app rotation right away.
Some browsers refuse to talk to a device on your network from a public page. Download the flow and paste it into the Scripts tab of your device, or install it from a terminal:
More flows for AWTRIX NG Scripts or Miscellaneous
Something wrong with this flow? Report it.