Skip to main content

ScoreBox Consoles

PyPI version

Python interface for scoreboard consoles manufactured by Daktronics and Colorado Time Systems

Supported Consoles

  • Daktronics All Sport 5000
    • :basketball: Basketball
    • :football: Football
    • :volleyball: Volleyball
    • :water_polo: Water Polo
    • :wrestling: Wrestling
  • Colorado Time Systems System 6
    • :water_polo: Water Polo

Installation

pip install scorebox-consoles

Usage

from consoles.sports import Basketball

if __name__ == '__main__':
    basketball = Basketball('COM1')
    game_state = basketball.export()

Calls to sport classes must be protected by an if __name__ == '__main__' because the serial connection is read in a seperate process

Connecting a Console

Consoles are connected with a Serial to USB cable.

Daktronics All Sport 5000 - Connect to the port labeled I/O Port (J6) with a DB25 to DB9 Serial connector

Colorado Time Systems System 6 - Tap into the 1/4" Scoreboard Out plug and connect the tip to pin 2 of a Serial DB9 connector and the shoe to pin 5.

API

Sport classes take a serial port string as an argument and expose an export method that returns the current game state. All sport classes also feature an on_update method that is designed to be reimplemented. It is called everytime the state of the game changes, depending on the settings of the console, this can work out to be 10 times per second or faster. on_update must take a single variable, a Python dictionary that corresponds to the game state values described below for each sport.

from consoles.sports import Football

def do_something(game_state):
    # Do something useful with the parse score console information
    # For example:
    home = game_state['home_score']
    visitor = game_state['visitor_score']
    if home > visitor:
        print(f'The Home Team leads {home} to {visitor}.')
    elif visitor > home:
        print(f'The Visiting Team leads {visitor} to {home}.')
    else:
        print(f'The teams are tied at {home}')

if __name__ == '__main__':
    football = Football('COM1')
    football.on_update = do_something

:basketball: Basketball

Key Type Description
{home/visitor}_score int Team Score
{home/visitor}_timeouts int Team Timeouts Remaining
{home/visitor}_fouls int Team Fouls
{home/visitor}_possesion bool Team Possesion Status
{home/visitor}_bonus bool Team Bonus (1-on-1) Status
{home/visitor}_double_bonus bool Team Double Bonus (2 shots) Status
clock str Main Clock Time (excludes timeout time), Tenths shown under 1 minute if configured in console settings
shot str Shot Clock Time, Tenths shown under 5 seconds if configured in console settings
period str Game Period

:football: Football

Key Type Description
{home/visitor}_score int Team Score
{home/visitor}_timeouts int Team Timeouts Remaining
{home/visitor}_possesion bool Team Possesion Status
clock str Main Clock Time
play str Play Clock Time
quarter str Game Quarter
down str Down Number (includes ordination [ex. 1ST])
to_go int Yards For First Down
ball_on int Ball Location on the Field (does not include side of field)
flag bool Flag Status (only updated on console button push)

:volleyball: Volleyball

Key Type Description
{home/visitor}_score int Team Score in Current Game
{home/visitor}_sets int Team Sets Won
current_set int Game Set

:water_polo: Water Polo

Key Type Description
{home/visitor}_score int Team Score
clock str Main Clock Time
shot str Shot Clock Time
period str Game Period

Water Polo is supported on both Daktronics and Colorado Time Systems consoles: for Daktronics call WaterPoloDaktronics, for Colorado Time Systems call WaterPolo

:wrestling: Wrestling

Key Type Description
{home/visitor}_team_score int Team Score
{home/visitor}_match_score int Match Score
clock str Main Clock Time
period str Match Period

Release files for scorebox-consoles 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for scorebox-consoles 1.2.0
File Interpreter ABI Platform
scorebox_consoles-1.2.0-py3-none-any.whl Python 3 none any Details

Release files / scorebox_consoles-1.2.0-py3-none-any.whl

Download URL scorebox_consoles-1.2.0-py3-none-any.whl
Size 10.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
614a76177ae051108635c4abdc82821cf4895cdd0d127b2b7d3ddb8f8c6186ee
BLAKE2b-256 checksum
How to use checksums
e3fb08ef0df0408a1784fdb10058f586e809f0eb68cca187b538d4f01072af29
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.3.3 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.0

Release history Release notifications | RSS feed

This release

1.2.0 This release

1 release file

1.1.1

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page