A MagicMirror² module for AFL fixtures, results, and ladder standings using the Squiggle API.
- Upcoming AFL matches
- Recent completed results
- Ladder / standings view
- Optional team highlight in the ladder
- Lightweight server-side caching in
node_helper.js - No external runtime dependencies beyond Node core
The module can show:
From your MagicMirror modules directory:
cd ~/MagicMirror/modules
git clone https://github.com/<your-username>/MMM-AFL.git
cd MMM-AFL
npm install
npm installis included for standard MagicMirror module workflow. This module does not currently require extra third-party runtime packages.
Add this to your config/config.js:
{
module: "MMM-AFL",
position: "top_left",
config: {
updateInterval: 10 * 60 * 1000,
showNextMatches: true,
showRecentResults: true,
showLadder: true,
ladderSize: 8,
maxItems: 5,
highlightTeam: "Adelaide"
}
}| Option | Type | Default | Description |
|---|---|---|---|
updateInterval |
number | 600000 |
Refresh interval in milliseconds |
animationSpeed |
number | 1000 |
MagicMirror DOM update animation speed |
showNextMatches |
boolean | true |
Show upcoming AFL matches |
showRecentResults |
boolean | true |
Show recently completed games |
showLadder |
boolean | true |
Show ladder standings |
ladderSize |
number | 8 |
Number of ladder rows to display |
maxItems |
number | 5 |
Number of fixture/result rows to display |
highlightTeam |
string | "" |
Partial team name to highlight in the ladder |
seasonYear |
number/null | null |
Override season year; defaults to current year |
This module uses the public Squiggle AFL API:
- Games:
https://api.squiggle.com.au/?q=games;year=YYYY - Standings:
https://api.squiggle.com.au/?q=standings;year=YYYY
- Times are rendered using the MagicMirror device locale and timezone.
- If standings are not available yet, the module can build a basic pre-season ladder from fixture teams.
- If the API is temporarily unavailable, the module shows an error message instead of crashing the mirror.
MMM-AFL.js— front-end module renderingMMM-AFL.css— stylingnode_helper.js— server-side fetch + cachingREADME.md— setup and usage
MIT
