{"id":21520952,"url":"https://github.com/sflems/led-board-manager","last_synced_at":"2025-04-09T22:21:39.261Z","repository":{"id":46988745,"uuid":"332439201","full_name":"sflems/led-board-manager","owner":"sflems","description":"A Django based web app to configure LED Scoreboards running on a Raspberry Pi.","archived":false,"fork":false,"pushed_at":"2024-02-20T10:09:59.000Z","size":3800,"stargazers_count":26,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-24T00:14:46.829Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sflems.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-01-24T12:05:20.000Z","updated_at":"2024-07-09T15:02:52.000Z","dependencies_parsed_at":"2024-02-23T23:30:58.351Z","dependency_job_id":null,"html_url":"https://github.com/sflems/led-board-manager","commit_stats":null,"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sflems%2Fled-board-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sflems%2Fled-board-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sflems%2Fled-board-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sflems%2Fled-board-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sflems","download_url":"https://codeload.github.com/sflems/led-board-manager/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248120220,"owners_count":21050910,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-24T01:04:59.848Z","updated_at":"2025-04-09T22:21:39.236Z","avatar_url":"https://github.com/sflems.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LED Board Manager\n\n#### A Django based web app to configure an \u003ca href=\"https://github.com/riffnshred/nhl-led-scoreboard\"\u003eNHL LED Scoreboard\u003c/a\u003e, and others, running on a Raspberry Pi.\n\n#### Latest Release:\n\n##### LED Board Manager\n\n[![GitHub release (latest by date)](https://img.shields.io/github/v/release/sflems/led-board-manager?label=version)](https://github.com/sflems/led-board-manager/releases) [![Django Tests](https://github.com/sflems/led-board-manager/actions/workflows/python-app.yml/badge.svg)](https://github.com/sflems/led-board-manager/actions/workflows/python-app.yml)\n\n#### Compatible With:\n\n##### NHL LED Scoreboard:\n\n[![GitHub release (latest by date)](https://badgen.net/github/release/riffnshred/nhl-led-scoreboard?label=Version)](https://github.com/riffnshred/nhl-led-scoreboard/releases/latest) [![Create Release - Image](https://github.com/falkyre/nhl-led-scoreboard-img/actions/workflows/main.yml/badge.svg)](https://github.com/falkyre/nhl-led-scoreboard-img/actions/workflows/main.yml)\n\n##### MLB LED Scoreboard:\n\n[![GitHub release (latest by date)](https://badgen.net/github/release/MLB-LED-Scoreboard/mlb-led-scoreboard?label=Version)](https://github.com/MLB-LED-Scoreboard/mlb-led-scoreboard/releases/latest)\n\n##### NHL LED Scoreboard:\n\n[![GitHub release (latest by date)](https://badgen.net/badge/icon/nfl-led-scoreboard?icon=github\u0026label)](https://github.com/mikemountain/mlb-led-scoreboard/releases/latest)\n\n## Table of Contents\n\n- [Description](#description)\n- [Features](#features)\n  - Config Generator\n  - Boards/Profile Manager (NEW!)\n- [Disclaimer](#disclaimer)\n- [Requirements](#requirements)\n- [Installation](#installation)\n  - [First Steps](#first-steps)\n  - [Manual Installation (optional)](https://github.com/sflems/led-board-manager/wiki/Manual-Installation)\n  - [Autostarting the Webserver](https://github.com/sflems/led-board-manager/wiki/Auto-Starting-the-server-@-Boot)\n  - [Updates](#updates)\n  - [Removal / Uninstall](https://github.com/sflems/led-board-manager/wiki/Uninstall)\n- [Usage](#usage)\n  - [Starting the Server](#to-start-the-webserver)\n  - [Accessing the Server](#to-access-the-server)\n    - [Remote Viewing via SSH Tunnelling](https://github.com/sflems/led-board-manager/wiki/Remotely-Viewing-Your-Board-Manager-via-SSH-Tunnel)\n  - [To Stop the Server](#to-stop-the-server)\n  - [Default Login](#default-admin-login)\n  - [Info](#info)\n  - [Troubleshooting](https://github.com/sflems/led-board-manager/wiki/Troubleshooting)\n- [Screenshots](#screenshots--demo)\n\n_____________\n\n## Description\n\nDesigned as a solution to manage the NHL LED Scoreboard project by [Joel Joannisse](https://github.com/riffnshred), as well as custom board integration.\n\nThe app uses a Django webserver to manage profiles in a simple SQLite database. Users can access the web interface which can be hosted on their local machine or network. If a schema is found in a board's config directory, Django dynamically generates and validates an easy to use form to create a `config.json` file. It saves a new `config.json` in the appropriate `config` directory and restarts your board process to implement any changes on the fly!\n\nJSON can also be edited manually in the `/admin` interface. The profiles dashboard also has the ability to backup configurations on the fly. The admin panel also has a section for global RGB Matrix flags/arguments.\n\nBoards and their paths/settings may also be added or configured in the admin panel.\n_____________\n\n## Features\n\n- GUI / Today's NHL Games Dashboard\n  - Swap between various board projects ie. NHL, NFL, MLB, etc.\n  - Easily Toggle your scoreboard On and Off\n  - Profile Status \u0026 Resource Monitor\n- Profiles Dashboard\n  - Manage Configurations on the Fly\n  - Create Configurations with a Simple Form (schema dependant)\n  - Configuration/Profile Backup\n- Supervisor Integration\n  - Activating A Profile Updates the Board in Real Time\n  - Scoreboard Status Monitor\n- Pi Commands\n  - Scoreboard On/Off Toggle\n  - Stop Server\n  - Reboot\n  - Shutdown\n- Admin Dashboard\n  - Boards Management (NHL / NFL / MLB / etc.)\n  - Profiles Management\n  - User Management\n  - Scoreboard Flags (ie. `--led-brightness`, `--led-gpio-mapping`, `--update-check`, etc.)\n  - WebGUI Defaults (ie. Default paths, Supervisor `[program:names]`)\n- REST API (W.I.P.)\n  - Interact with the board management backend API routes. (via http://`YOUR_IP`:9002/api)\n\n_____________\n\n### Disclaimer\n\n_(Work in Progress)_\n\nThis project is still in development. Development of the NHL LED Scoreboard is similarly evolving. They both rely on the external NHL API which, at any time may be inaccessible or updated. This app __does__ modify your configuration files in the `nhl-led-scoreboard/config` directory. While these files are cloned during installation, please backup any _prized_ configurations on your own accord.\n\n_____________\n\n## Requirements\n\n- [Raspberry Pi (Zero WH, 3B+, 3A+, 4B)](https://github.com/riffnshred/nhl-led-scoreboard)\n\n- [NHL LED Scoreboard](https://github.com/riffnshred/nhl-led-scoreboard)\n\n- [Hockey](https//www.nhl.com)\n\n- [App Dependancies](requirements.txt)\n\n#### Compatible Boards:\n\n- [NFL LED Scoreboard](https://github.com/mikemountain/nfl-led-scoreboard)\n\n- [MLB LED Scoreboard](https://github.com/MLB-LED-Scoreboard/mlb-led-scoreboard)\n\n- [Stonks](https://github.com/rdefeo/stonks)\n\n- ...and similar forks.\n\n## Installation\n\n__Be sure to back up any previous configurations before use!!!__\n\n#### From the `/home/pi` directory:\n\n###### (or the same location as your `nhl-led-scoreboard` directory)\n\n```bash\ngit clone --recursive https://github.com/sflems/led-board-manager.git\ncd led-board-manager\n```\n\n#### First Steps\n\n##### Install `supervisor` (as root):\n\n###### You can skip [to this step](#install-and-start-python3-venv) if you have an active `supervisor' installation.\n\n```bash\nsudo apt update \u003e\u00263\nsudo apt install -y supervisor \u003e\u00263\n\nsudo cp scoreboard/static/supervisor/supervisord.conf /etc/supervisor/supervisord.conf\nsudo sed -i -E \"s#/home/pi/#$HOME/#g\" /etc/supervisor/supervisord.conf\nsudo sed -i -E \"s#=pi:pi\\$#=$USER:$USER#g\" /etc/supervisor/supervisord.conf\nsudo chmod 644 /etc/supervisor/supervisord.conf\n```\n\n###### Sample configurations can be found in the [`nhl-led-scoreboard-img`](https://github.com/falkyre/nhl-led-scoreboard-img/tree/master/stage2/06-supervisor/files) project, by [@falkyre](https://github.com/falkyre).\n\n###### Install and Start `python3-venv`:\n\n_To run the server in a development environment, `python3-venv` can be a solution to create a separate \"environment\" for the server to run in._\n\n```bash\nsudo apt install python3-venv python3-dev\npython3 -m venv env\n./scripts/install.sh\n```\n\nOnce finished, you can start the server with:\n\n```bash\nsource env/bin/activate\ngunicorn Capstone.wsgi -b 0:9002\n```\n\nIf all is working, you should then be able to access the app @ `YOUR_IP:9002` in the browser. You can deactivate the env with the command `deactivate`.\n\n#### Default Login (Change me in the admin panel!)\n\nUsername: `admin`\n\nPassword: `scoreboard`\n\nIf you can't access the server and are using a firewall such as `ufw` or `iptables`, be sure to allow access _to your local network only_ over the `9002` port (or whatever you set it to if so). If you have ports 80/443 open on your Pi/Router, this site WILL be accessable by all, so be sure to have your firewall(s) in order.\n\n__See also: [Usage Instructions](#usage)__\n\n_____________\n\n## Manual Installation:\n\nSee the wiki for the [Manual Installation](https://github.com/sflems/led-board-manager/wiki/Manual-Installation) steps.\n\n## Auto-Starting the server @ boot:\n\nSee the wiki for the complete [Auto-Start Instructions](https://github.com/sflems/led-board-manager/wiki/Auto-Starting-the-server-@-Boot).\n\n## Updates\n\nThe latest update notes can be found under the [project releases](https://github.com/sflems/led-board-manager/releases).\n\n[Stop the server](#to-stop-the-server), then:\n\n```bash\ncd led-board-manager/\ngit reset --hard\ngit checkout main\ngit pull\n```\n\n_When updating, or if stated in the release notes, it may be necessary to run the update script from the `led-board-manager` directory._\n\n```bash\n./scripts/update.sh\n```\n\nThen, restart the web server.\n\nAlternatively, manually enter the following commands:\n\n```bash\nsource env/bin/activate\npip3 install -r requirements.txt\npython3 manage.py makemigrations\npython3 manage.py migrate\npython3 manage.py test\n```\n\nThen, restart the web server. You can `deactivate` the `(env)` if you are using the `./scripts/autorun.sh` script or `supervisor`.\n\n## Usage\n\n__Be sure to back up any previous configurations before use!!!__\n\n### To start the webserver:\n\nTo start the server manually, and from the `led-board-manager` directory, enter:\n\n```bash\nsource env/bin/activate \u0026\u0026 gunicorn Capstone.wsgi -b 0:9002\n```\n\n### To start the webserver with a script:\n\nSimply run `./scripts/autorun.sh` from the same location.\n\nThis command, and the default configuration, start the server on `0.0.0.0` and port `9002` making it available to any connected devices on your local network. Alternatively, you can run the server on a different port, e.g. `0:8000`, `0:PORT`, or available to _just_ the `localhost` machine by running:\n\n```bash\nsource env/bin/activate\ngunicorn Capstone.wsgi -b 127.0.0.1:9002\n```\n\n__Note__: _This server should not be served over a public connection or used in a production environment. If you wish to view the scoreboard WebGUI remotely, you can do so securely by accessing your local network using a VPN service._\n\n_____________\n\n### To access the server:\n\nAccess the dashboard at `YOUR_IP:PORT` in the browser.\n\n###### Default Login (Change me in the admin panel!)\n\nUsername: `admin`\n\nPassword: `scoreboard`\n\n#### Remote Viewing from External Networks\n\nViewing the board manager from an external network is possible. For more information, [see the following wiki article.](https://github.com/sflems/led-board-manager/wiki/Remotely-Viewing-Your-Board-Manager-via-SSH-Tunnel)\n\n_____________\n\n### To stop the server:\n\nIn a terminal shell with the server running, `Ctrl` + `C` will terminate the process. Then, `deactivate` at any time to stop the `venv`.\n\n###### If the server is running in the background:\n\n`pkill -f Capstone.wsgi`\n\n...Or to find the process IDs, enter `ps aux | grep gunicorn`\n\nExample response:\n\n```bash\n    user@raspi:~ $ ps aux | grep gunicorn\n--\u003e user      6300 26.6  0.8  38236 33364 pts/0    S+   00:22   0:01 gunicorn Capstone.wsgi -b 0:9002\n    user      6319  0.0  0.0   3160  1536 pts/1    S+   00:22   0:00 grep --color=auto gunicorn\n    user@raspi:~ $ \n```\n\nThis is the second number in the table following the username (Use caution if you have more than one python/Django server running!). Change the `PID` in the following command to that number to kill the server:\n\n`kill -9 PID`\n\n_Better yet_... simply stop the server from supervisor, or the dashboard  :).\n\n_____________\n\n### Default Admin Login\n\n`YOUR_IP:9002/admin`\n\nUsername: `admin`\n\nPassword: `scoreboard`\n\n__Please change this password!__ You can do this by visiting `YOUR IP:PORT/admin` and clicking the change password button. Email currently isn't configured.\n\n_____________\n\n## Info\n\n- The supervisor configuration is updated when saving flag settings or BoardType settings in the admin panel.\n- When a profile is activated, the appropriate `config.json` contents are replaced with an updated configuration. You can do this on the profiles page. Your previous config.json is still \"active\" until you activate one here.\n- When a profile is backed up, a file is created in the same folder as `profile_name.config.json`. It's path and name are displayed as a message in the browser.\n- Deleted profiles do not delete the `config.json` files; it only removes them from the Django Sqlite database.\n- The `supervisor-daemon.conf` used by the `led-board-manager` app prefixes any configured BoardTypes with `boards:`.\n  - These programs are grouped in supervisor with the `boards:` prefix.\n  - `sudo supervisorctl restart scoreboard` would become `sudo supervisorctl restart boards:scoreboard`.\n- The GUI Defaults (ie Scoreboard path, Supervisor Program Name, etc.) can be changed in the admin panel. Alternatively, they can be modified manually in the `Capstone/settings.py` file under the `CONSTANCE_CONFIG` variable.\n  - Scoreboard Flags (ie. `--led-brightness`, `--led-gpio-mapping`, `--update-check`, etc.) can be changed here too.\n\n_____________\n\n## Screenshots / Demo\n\n##### It's Mobile Friendly Too! (Responsive)\n\nI encourage anyone interested to take a quick peek at the demo on YouTube:\n\n[![Web GUI YouTube Demo Video](https://img.youtube.com/vi/5byJf5v6Hnc/0.jpg)](https://www.youtube.com/watch?v=5byJf5v6Hnc)\n\n_____________\n\n###### Dashboard\n\n  \u003cimg src=\"/assets/images/LED Scoreboard Configurator - Dashboard.png\" alt=\"LED Scoreboard Configurator - Dashboard\" width=\"100%\"/\u003e\n  \n###### Profiles Dashboard\n\n  \u003cimg src=\"/assets/images/LED Scoreboard Configurator - Profiles Dashboard.png\" alt=\"LED Scoreboard Configurator - Profiles Dashboard\" width=\"100%\"/\u003e\n  \n###### Create/Edit A Profile\n\n  \u003cimg src=\"/assets/images/LED Scoreboard Configurator - Create_Edit A Profile.png\" alt=\"LED Scoreboard Configurator - Create_Edit A Profile\" width=\"100%\"/\u003e\n  \n###### Settings Admin\n\n  \u003cimg src=\"/assets/images/LED Scoreboard Configurator - Settings Admin.png\" alt=\"LED Scoreboard Configurator - Settings Admin\" width=\"100%\"/\u003e\n\n###### Boards Admin\n\n  \u003cimg src=\"/assets/images/LED Scoreboard Configurator - Boards Admin.png\" alt=\"LED Scoreboard Configurator - Boards Admin\" width=\"100%\"/\u003e\n\n### Please let me know if you experience any bugs, have any feature suggestions or issues. Enjoy!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsflems%2Fled-board-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsflems%2Fled-board-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsflems%2Fled-board-manager/lists"}