Skip to content

Latest commit

 

History

History
189 lines (135 loc) · 6.78 KB

README.md

File metadata and controls

189 lines (135 loc) · 6.78 KB

Raspberry Pi Sports LED Matrix

Go-based software to control a raspberry pi LED matrix.

example1

Table of Contents

Getting Help

There's a public Discord channel, "RGB Sportsmatrix Help" https://discord.gg/8vPp4xfdtV

Premium Version

This repo contains the FREE version of this app. The free version is no longer receiving new features- it will only get bug fixes and dependency updates. To get the latest and greatest features, check out the Premium version.

The new PREMIUM version of this app that adds the following features:

  • Scroll mode - enable scrolling for the entire board or on a per-board basis
  • Weather Board
  • Spotify Now-Playing
  • MLB Live View - shows baserunners, outs, pitch count, inning
  • Stock Ticker
  • Gambling Odds - shows gambling odds overlaid on each game's scoreboard (where available)
  • Additional Sports
    • FIFA Women's World Cup
    • More to Come!

Visit the Patreon Page to get a membership. Visit the PREMIUM Version Installation Instructions

Current Board Types

  • Sports. Shows upcoming, live, and completed games for the day (or the week for football), as well as news headlines:
    • NHL
    • MLB
    • NFL
    • MLS
    • NCAA Football
    • NCAAM Basketball
    • NCAAW Basketball
    • NBA
    • PGA Tour
    • WNBA
    • XFL
    • Soccer Leagues:
      • Spanish Laliga
      • FIFA World Cup
      • English Premier League
      • Italian Serie A
      • French Ligue 1
      • DFB Pokal
      • Bundesliga
  • Racing. Currently just shows upcoming event schedule
    • F1
    • Indy Car
  • Google Calendar
  • Player Stats boards- currently supports MLB and NHL.
  • Image Board: Takes a list of directories containg images and displays them. Works with GIF's too!
  • Clock
  • Sys: Displays basic system info. Currently Mem and CPU usage

Installation

Supported Pi

This project currently supports all Raspberry Pi's with an armv7l or aarch64 architecture. This includes Pi 3b, 4, Zero 2. Pi's with the armv6 architecture are no longer supported, but those can run version v0.0.83 and older- this would include the original Pi Zero.

You can check your Pi's architecture by running the following command:

dpkg --print-architecture

Install script

There's a helper install script that pulls the latest release's .deb package and installs it and starts the service. Obviously, piping a remote script to sudo bash is risky, so please take a look at script/install.sh to verify nothing nefarious is going on. You can always manually download the .deb package in the Releases Section. Just make sure to pick the correct one for your architecture.

Run the following command in a Terminal on your Pi

curl https://raw.githubusercontent.com/robbydyer/sports/master/script/install.sh | sudo bash

Configuration

You can run the app without passing any configuration, it will just use some sane defaults. Currently it only defaults to showing the NHL board. Each board that is enabled will be rotated through. The default location for the config file is /etc/sportsmatrix.conf

See the Full Example Configuration

For a list of all possible team abbreviations (including conference/divisions when available), see this list

Running the Board

If you installed the app with the installer script or a .deb package directly, then the service will run automatically. You can start/stop/restart the service with systemctl commands:

# stops the service
sudo systemctl stop sportsmatrix

# Restarts the service, like after changes to the config file
sudo systemctl restart sportsmatrix

You can also run the app manually in the foreground. The .deb package installs the binary to /usr/local/bin/sportsmatrix NOTE: You MUST run the app via sudo. The underlying C library requires it. It does switch to a less-privileged user after the matrix is initialized.

# Show all CLI options
sportsmatrix --help

# Run with defaults
sudo sportsmatrix.bin run

# With config file
sudo sportsmatrix.bin run -c myconfig.conf

# NHL demo mode
sudo sportsmatrix.bin nhltest

Web UI

There is a (very) basic web UI frontend for managing the board. It is bundled with the binary and served as a single-page app. The UI gives buttons for all the backend API Endpoints. You can also view a rendered version of the board in the "Board" section (make sure your configuration enables this). Front-end dev is not my strongsuit, so it's not particularly pretty.

The Web UI is accessible at http://[HOSTNAME OR IP]:[PORT], where port is whatever you configure the httpListenPort in your config file to be. For example, if your Pi's hostname is mypi and your configured listen port is 8080, http://mypi:8080

example1 example2 example3 example4

Example of the Web Board:
webboard

API endpoints

The Web UI has a built-in doc page describing the API. It also includes an interactive way to test API calls. There's a button in the nav "API Docs", or you can go to http://[YOURIP]/docs

Special "Jump only" Image directories

If you would like to configure certain image directories to contain "jump only" images (only seen when an API call is made to show them), you can do so by configuring them like:

imageConfig:
  directoryList:
  - directory: /my/image/dir
    jumpOnly: true

Then, to display a particular image in that directory, make the API call and pass the desired image name.

curl -X POST --header "Content-Type: application/json" -d '{"name":"goal.gif"}' "http://myhost:myport/imageboard.v1.ImageBoard/Jump"

Examples

NHL NHL example 2

MLB MLB example

STOCK TICKER Stock Ticker

PGA Tour Leaderboard PGA Board

NHL Stats NHL Stats

MLB Stats MLB Stats

In real life, this is a GIF of Mario running. This is using the Image Board. image example