AI & Agents

How to Build a Live Sports Scoreboard Agent with OpenClaw on Raspberry Pi

The robbydyer/sports project on GitHub pulls live NHL, NBA, MLB, MLS, and NCAA scores to a Raspberry Pi LED matrix, but every configuration change still requires editing JSON files and restarting a service. Adding OpenClaw to the stack gives you a natural-language control layer that can switch teams, adjust display layouts, trigger game-day alerts, and sync highlight clips to cloud storage, all without touching a config file.

Fastio Editorial Team 14 min read
AI agent workspace interface showing connected services and automation controls

What a Pi Scoreboard Agent Actually Does

ESPN's public scoreboard API serves live game data for 20-plus sports at a single endpoint: site.api.espn.com/apis/site/v2/sports/{sport}/{league}/scoreboard. The response includes team names, scores, game clock, period, and status. A standard Raspberry Pi scoreboard project fetches that JSON on a loop, parses it, and renders the result on a display. The robbydyer/sports project, written in Go, supports NHL, NBA, MLB, MLS, NFL, WNBA, NCAA Football, NCAA Basketball, English Premier League, LaLiga, Serie A, Bundesliga, Ligue 1, PGA Tour, and IndyCar on HUB75 LED matrices driven by rpi-rgb-led-matrix.

That covers the display side. The gap is everything around it. Switching your tracked teams means editing /etc/sportsmatrix.conf and restarting the service. Scheduling the display to turn on only during game hours requires a separate cron job. Sending a notification to your phone when your team takes the lead requires a different script entirely. And if you want to save a screenshot of the final score or archive game results, you need yet another tool.

OpenClaw fills that gap. Running on the same Pi as the display software, the agent can call shell commands to manage the scoreboard process, query the ESPN API directly for scheduling decisions, send alerts through Telegram or Slack, and sync files to cloud storage. Instead of maintaining five separate scripts, you describe the behavior you want in natural language and let the agent handle execution.

The Pi 5 draws under 5W at idle according to community benchmarks compiled by Jeff Geerling, making it practical as an always-on device. OpenClaw's gateway architecture means the Pi handles message routing and tool execution while a cloud LLM like Claude or GPT-4 does the reasoning. That keeps the local hardware requirements low: a Pi 5 with 4GB RAM is more than sufficient.

Hardware You Need

The build has two paths depending on your display preference: LED matrix or HDMI monitor. Both use the same Pi and OpenClaw setup. The difference is cost, visibility, and complexity.

LED Matrix Path

  • Raspberry Pi 5 (4GB or 8GB). The Pi 4 with 4GB works but the Pi 5's Cortex-A76 cores handle the LED refresh loop and OpenClaw's Node.js runtime more comfortably
  • One or more HUB75 RGB LED matrix panels. A 64x32 panel at 4mm pitch is the most common size for scoreboards, running $15 to $25 per panel. Chain two for a 128x32 canvas that shows both teams with room for the game clock
  • An RGB Matrix HAT or Bonnet (Adafruit makes the most widely used ones) that sits on the Pi's GPIO header and provides clean level-shifted HUB75 output
  • A 5V power supply rated for your panel count. Each 64x32 panel can draw up to 4A at full white brightness. Budget 2A per panel for typical scoreboard content where most pixels are off or dim
  • A microSD card (32GB is plenty) or USB SSD for faster boot and longer lifespan

HDMI Path

  • Raspberry Pi 5 (4GB or 8GB)
  • Any HDMI monitor or TV. A small 7-inch HDMI display works well on a desk. A wall-mounted TV works for a sports bar setup
  • A Python script using Pygame, Tkinter, or a browser-based renderer (Chromium in kiosk mode) to display scores full-screen

The HDMI path is simpler to set up because there is no special wiring. The LED matrix path looks better from across a room because the LEDs are bright and visible in daylight, similar to what you see at a real sports venue.

Shared Components

Both paths need a reliable internet connection (Ethernet is more stable than WiFi for an always-on device), a case for the Pi, and a power supply. The official Raspberry Pi 27W USB-C supply covers the Pi itself. The LED panels need their own supply.

Dashboard displaying real-time monitoring data and alert summaries

How to Install and Configure Scoreboard Display Software

Start with the display layer before adding OpenClaw. This gives you a working scoreboard to test against.

robbydyer/sports for LED Matrices

The robbydyer/sports project provides a Go binary that drives HUB75 panels via the rpi-rgb-led-matrix C library. It polls sports APIs on a configurable interval and renders scores, team logos, and game status on the matrix. Installation uses a helper script that pulls the latest .deb package:

The software installs as a systemd service and exposes a web UI for configuration at the Pi's IP address on port 8080. Through the web interface you can select leagues, pick favorite teams, set brightness, and configure scrolling behavior. The configuration file at /etc/sportsmatrix.conf is JSON-based and controls which boards are active, polling intervals, and display layout.

The free version of robbydyer/sports handles core scoreboard functionality. A premium tier adds features like live odds, weather overlays, and stock tickers, available through a subscription.

HDMI Scoreboard with Python

For the HDMI path, a Python script that polls the ESPN API and renders scores in a Pygame window or Chromium browser is the simplest approach. The ESPN scoreboard endpoint returns JSON with a consistent structure across sports. A minimal implementation fetches the endpoint for your league, parses the events array, and draws team abbreviations, scores, and game status on screen.

Tyler Bisk's Live Scoreboard project demonstrates this approach with a full-screen renderer that cycles through active games across multiple leagues. Cornell's ECE 5725 course produced a similar project using a touchscreen for team selection.

Testing Before Adding OpenClaw

Verify that your display is working correctly before proceeding. For the LED matrix path, you should see scores rendering on the panels with correct team colors and logos. For the HDMI path, confirm that the browser or Pygame window is displaying current game data. Once the display is stable, you have a reliable foundation to layer OpenClaw automation on top of.

Fastio features

Persistent storage for your scoreboard agent's game logs and configs

Fastio gives your OpenClaw agent 50GB of free cloud storage with semantic search, file versioning, and MCP access. Upload game logs, archive scores, and share results, no credit card required.

Connecting OpenClaw as the Control Layer

With the display running, install OpenClaw on the same Pi. The official docs at docs.openclaw.ai/install/raspberry-pi walk through the full process. The short version: flash Raspberry Pi OS Lite (64-bit), install Node.js 24, run the one-line installer, complete onboarding with your preferred LLM API key, and enable the daemon.

OpenClaw runs as a gateway. It receives instructions through chat channels (Telegram, Slack, Discord) or local CLI, forwards them to a cloud LLM for reasoning, and executes the resulting tool calls on the Pi. The agent can run shell commands, read and write files, make HTTP requests, and interact with any service that has a CLI or API.

What OpenClaw Adds to a Scoreboard

Here is what becomes possible once the agent is running alongside the display software:

  • Natural-language team switching. Message the agent "Switch to NBA and show Celtics games" and it updates the configuration file and restarts the display service. No SSH session needed.
  • Game-day scheduling. The agent checks today's schedule for your tracked teams, calculates tip-off times, and enables the display 15 minutes before the first game. After the last game ends, it dims or powers down the matrix.
  • Score alerts. During a live game, the agent monitors the score endpoint and sends a Telegram message when your team takes or loses the lead, when the game enters overtime, or when it ends.
  • Multi-league rotation. The agent cycles the display between leagues based on which games are currently live. During NFL Sunday, it prioritizes football. On a Tuesday night in February, it switches to NBA and NHL.
  • Result archiving. After each game, the agent saves the final score, box score summary, and a timestamp to a log file. Over a season, this builds a personal game diary.

The agent does not need custom skills for most of this. Shell commands manage the display service, HTTP requests fetch the ESPN API, and file operations handle logging. OpenClaw's built-in tool system covers all three.

Cron Jobs for Automation OpenClaw's cron scheduler runs inside the gateway process and persists job definitions in SQLite, so schedules survive restarts. Three schedule types are available: one-shot timestamps, fixed intervals, and standard cron expressions.

A practical setup for a sports scoreboard uses two scheduled jobs. A morning job checks the day's game schedule for your tracked teams and calculates start times. A per-game job (created dynamically by the morning job) activates the display before tip-off and monitors the game until completion. This two-tier approach means the agent only runs actively when games are happening, saving API calls and LLM tokens on off days.

The cron system supports output delivery to chat channels, so the morning schedule summary can arrive as a Telegram message: "3 games today. Celtics at 7:30 PM, Red Sox at 1:05 PM, Revolution at 7:30 PM. Display will activate at 12:50 PM."

Neural indexing visualization showing connected data nodes and AI processing

Storing Game Data and Recordings with Fastio

A scoreboard that runs all season generates data worth keeping: game logs, screenshots of close finishes, and configuration backups. Storing everything on the Pi's SD card works short-term, but SD cards wear out under constant writes, and if the card fails, you lose the season's data.

Cloud storage solves the durability problem, but most options require managing authentication tokens, writing upload scripts, and handling failures. Alternatives like S3 need IAM configuration and cost monitoring. Google Drive and Dropbox work through OAuth flows that expire and need refreshing.

Fastio works differently for this use case. It provides workspaces where agents and humans share the same files, with a free tier that includes 50GB storage, included credits, and 5 workspaces, with no credit card required. The agent can upload through the Fastio MCP server or REST API, and a human can browse the same workspace through the web UI or mobile app.

A practical file structure for a scoreboard agent:

  • /game-logs/ stores JSON files with final scores, box scores, and timestamps. One file per game, named by date and teams
  • /screenshots/ holds display captures from notable moments (final score of a close game, overtime start, playoff clinchers)
  • /config-backups/ keeps versioned copies of the scoreboard configuration file so you can roll back changes

Fastio's Intelligence Mode auto-indexes uploaded files for semantic search. After a season, you can ask questions like "Which Celtics games went to overtime?" and get answers with citations pointing to the specific game log files, without building a separate search index.

The ownership transfer feature is useful if you build this system for someone else. Set up the workspace, configure the agent, verify everything works, then transfer the workspace to the recipient. They get full access through the web UI while you retain admin access for troubleshooting. This is the kind of workflow where Fastio's agent storage shines: the agent writes, the human reads, and the workspace handles the handoff.

For configuration changes made through OpenClaw, the agent can commit the updated config file to the Fastio workspace before applying it. This creates an automatic version history that the scoreboard's owner can review through the web interface. If a configuration change breaks the display, rolling back is straightforward: pull the previous version from the workspace and restart the service.

How to Fix Common Display and Network Issues

LED Flicker and Ghosting

HUB75 panels driven by the Pi's GPIO can flicker if the CPU is busy with other tasks. The rpi-rgb-led-matrix library recommends isolating one CPU core for the display refresh loop. On a Pi 5 with four cores, dedicating one core to the matrix driver still leaves three for OpenClaw, the OS, and background tasks. Set the isolcpus boot parameter and pin the matrix process to the isolated core for the most stable output.

Audio output, Bluetooth, and onboard WiFi can cause additional timing interference. For a dedicated scoreboard, disable Bluetooth and use Ethernet instead of WiFi. The dtoverlay=disable-bt parameter in config.txt handles Bluetooth.

ESPN API Rate Limits

ESPN's public endpoints have no published rate limits or SLA. Community experience suggests that polling every 30 to 60 seconds during live games works reliably. Polling more aggressively risks getting temporarily blocked. During off-hours when no games are live, reduce polling to every 5 to 10 minutes or pause entirely.

OpenClaw's cron scheduler helps here. Instead of a fixed polling interval, the agent checks the game schedule in the morning and only starts frequent polling when a tracked game goes live. This keeps total daily API calls low while still providing near-real-time updates during games.

WiFi Reliability

Raspberry Pi's built-in WiFi can drop connections when power management is enabled. Disable WiFi power saving with the iw command or add a NetworkManager configuration file to keep the connection active. Better yet, use Ethernet if the Pi is near your router. A stable network connection matters more for a live scoreboard than for most Pi projects because a dropped connection during a close game means missing the score update.

Memory Usage

OpenClaw's Node.js runtime uses 100 to 200MB of RAM depending on loaded skills and active sessions. The robbydyer/sports Go binary uses roughly 50 to 80MB. On a Pi 5 with 4GB, that leaves over 3GB for the OS and any Python scripts. Memory pressure is unlikely to be an issue unless you add additional services.

SD Card Longevity

Constant log writes and frequent config updates wear out SD cards. Move the write-heavy directories (OpenClaw's state database, game logs, system logs) to a USB SSD or use log2ram to keep logs in RAM with periodic flushes. For long-term reliability, boot from a USB SSD entirely. The Pi 5 supports USB boot natively.

Frequently Asked Questions

How do I build a Raspberry Pi scoreboard?

You need a Raspberry Pi 5 (or Pi 4 with 4GB RAM), an HUB75 RGB LED matrix panel, an adapter bonnet, and a 5V power supply for the panels. Install the robbydyer/sports project using its helper script, configure your tracked teams through the web UI at port 8080, and the display starts showing live scores pulled from public sports APIs. The HDMI alternative skips the LED hardware and renders scores in a full-screen browser window.

Can OpenClaw control an LED matrix display?

OpenClaw controls the display indirectly through shell commands. It can start, stop, and restart the display service, edit the configuration file to change tracked teams or display settings, and query sports APIs to make scheduling decisions. The LED matrix driver (rpi-rgb-led-matrix) handles the actual pixel rendering. OpenClaw acts as the intelligence layer that decides what to show and when.

What sports APIs work with Raspberry Pi?

ESPN's public scoreboard API is the most widely used. It covers NFL, NBA, MLB, NHL, MLS, NCAA, Premier League, and dozens more leagues through unauthenticated JSON endpoints. The robbydyer/sports project uses these endpoints natively. Other options include the NHL Stats API (for detailed hockey data) and MySportsFeeds (paid, with better reliability guarantees). For a hobby scoreboard, ESPN's free endpoints provide sufficient coverage.

How much power does a Raspberry Pi sports display use?

A Pi 5 draws under 5W at idle and around 7W under load. A 64x32 LED matrix panel adds 2 to 8W depending on brightness and how many pixels are lit (scoreboard content with dark backgrounds uses less than full-white displays). Total system power for a single-panel setup runs 7 to 15W, comparable to a small LED desk lamp. Annual electricity cost is roughly $5 to $10 at average US residential rates.

Does the scoreboard work without internet?

Partially. The LED display hardware and rendering software work offline, but live scores require an internet connection to reach ESPN's API. OpenClaw also needs connectivity to reach its cloud LLM provider for reasoning tasks. You could pre-load a schedule and display upcoming game times offline, but live score updates stop until the connection is restored.

Can I use this setup for a sports bar or public display?

Yes, with some adjustments. For a larger venue, chain multiple LED panels for a bigger display (the rpi-rgb-led-matrix library supports up to 36 panels from a single Pi). Use Ethernet instead of WiFi for reliability. Consider the robbydyer/sports premium tier for features like scrolling tickers and multi-sport rotation. The Pi and display software can run headless with automatic recovery on boot, making it suitable for unattended operation.

Related Resources

Fastio features

Persistent storage for your scoreboard agent's game logs and configs

Fastio gives your OpenClaw agent 50GB of free cloud storage with semantic search, file versioning, and MCP access. Upload game logs, archive scores, and share results, no credit card required.