Giter Site home page Giter Site logo

riffnshred / nhl-led-scoreboard Goto Github PK

View Code? Open in Web Editor NEW
420.0 35.0 95.0 172.22 MB

🚨 Display NHL live score, stats, and more of your favorite teams, on a Raspberry Pi driven RGB LED matrix. 🚨

License: GNU General Public License v3.0

Python 90.33% Makefile 0.07% Shell 9.60%
nhl-scoreboard raspberry-pi display-nhl-score live-game stats adafruit-hat led-matrix led-matrix-displays dmd scoreboard

nhl-led-scoreboard's People

Contributors

azaroth08 avatar beamo11 avatar dependabot[bot] avatar dmigliorisi avatar elepolt avatar falkyre avatar feram18 avatar joefromdenver avatar joshkay avatar mrenigma03 avatar ntjoumas avatar rhazzed avatar riffnshred avatar sflems avatar versi786 avatar zlevine avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nhl-led-scoreboard's Issues

src/renderer/main.py lines 154/159 need to come before the "if" logic now above them

In src/renderer/main.py - Picking up the home and the away team's scores on lines 154 and 159 need to occur regardless of whether the "if" tests two lines above them are true or false.

The fix is to move line 154 to 152, and move line 159 to 157. This will guarantee that a new goal from either team will be recorded, regardless of whether that team is in your favorite list.

Add Wildcard to standing board.

Currently can show Standings by Conference and by Division. The data module already provide the information, just need to program the rendering.

Top Prospect List (board)

Find a reliable source (preferably an API, otherwise a web page we could scrape the info) and then show the Top prospect rank in a list with their nationality as a small banner like the teams abbreviation on the Standing board.

Date on final score does not update

When I run the scoreboard for multiple days, the final scores on game days always shows the initial date that the scoreboard was started on.

In the attached image the scoreboard was started on November 12th and the score shown from November 16th still shows the Nov. 12th date.
IMG_20191117_013839

Shootout Table

For when the main event (live game) go into shootout, change the layout and instead of the 2 logos and score, have the table with the team name in the first column and then 5 columns to fill depending if the team score or not.

Multiple favorite teams?

I come from a house with a Blues fan (roll eyes) a Bruins fan (ugh) and a Wild fan (me.) Is there some way to a momentary switch that would allow the program to move to the next "favorite" team. I.E. It is displaying the Wild game now displays the Blues, < push again> displays Bruins< push again> back to the Wild.
Don't know if it is even possible.
Also is there a way to use a monitor and not the LED matrix?

Getting Error

I'm installing the Beta and got this error. Any suggestions

pi@scoreboard:~nhl-led-scoreboard $ sudo python3 src/main.py --led-gpio-mapping=adafruit-hat-pwm --led-brightness=60 --led-slowdown-gpio=2

Traceback (most recent call last):
File "src/main.py", line 9, in
from dimmer import Dimmer
File "/hom/pi/nhl-led-scoreboard/src/dimmer.py", line 1, in
import ephem
ModuleNotFoundError: No module named 'ephem'

Team point total differing between team summary and wild card boards

Last night after the Blues game ended, the Team Summary board displayed their point total before the game (88), while the wild_card standings board updated with their new point total (90).

An hour or so later, the Stars game ended, and the same thing happened. The team summary point total stayed the same, while the wild_card board point total reflected the one point they earned during the game.

I didn't think the point total for either board updated until the next day, so I had been restarting the board a few minutes after the games end to see updated point totals. Glad it's kinda/sorta working, though.

Question regarding the update

Greetings,

First, great work on this project! I was super interested in what you have done and wanted to try it out myself, but also saw opportunity to make some improvements. Ordinarily, I'd just submit pull requests as I make changes, but as you seem to be working on a big update, I had this question instead:

Would it be possible to work on your update in the open, perhaps in a separate branch on this public repo? This way, I (and others) could contribute to the new version, or test out the new features. As it stands, changes to the master branch may be irrelevant or cause major merge conflicts when your private work is ready to be released.

Thanks!

Show Future Game

Feature enhancement request: Instead of saying "No Game Today" -- show when the next game is and against who... similar to the "Pre-Game State", but just add the date of the upcoming game... the "No Game Today" is sad...

Suggestion to integrate Supervisor to monitor/restart the process

I used to use nohup and & to detach the process from my terminal and run it in the background, but I would notice that sometimes the process would just fail and I'd have to log back in and run the process again.

I would suggest using something like Supervisor to monitor the process and restart it automatically if it stops. This is the config file that I am currently running:

[program:nhl]
command=python3 /home/pi/nhl-board-dev/src/main.py --led-gpio-mapping=adafruit-hat-pwm --led-brightness=30 --led-slowdown-gpio=2
autostart=true
autorestart=true
stderr_logfile=/var/log/nhl.err.log
stdout_logfile=/var/log/nhl.out.log

Addition for installation process

Great project! Thanks for doing this. I have everything setup and I'm really liking it.

One thing I noticed when initially wanting to run the main.py file, I would initially get an error
ImportError: No module named requests

I had to run pip install requests to get rid of that error. Now everything runs smoothly.

Network Issue indicator

Add an indicator on the board to show the user that the Pi can't communicate with the Network or the Internet and therefore update its information. A red bar at bottom of screen seems the most convenient way.

Additional "off day" option - clock

Enhancement Req: Add an option for off-day that shows a simple clock (12 or 24h) and maybe the upcoming dates/times for favorite teams all on one display... nothing scrolling, just a simple display of a clock and date/times:

Example:


| Mon 2/24 |
| 21:48 |
|DAL 2/29 @ 18:00 CGY 3/1 @19:00 |

(please forgive the janky ASCII art... an artist I am not)

KeyError: 'totalGames'

Running into an error.

INFO (16:33:26): NHL Scoreboard - v0.1.0 (64x32)
http://statsapi.web.nhl.com/api/v1/schedule?teamId=None
Traceback (most recent call last):
File "main.py", line 28, in
data = Data(config)
File "/home/pi/nhl-led-scoreboard/data/data.py", line 30, in init
self.refresh_fav_team_status()
File "/home/pi/nhl-led-scoreboard/data/data.py", line 56, in refresh_fav_team_status
self.fav_team_game_today = nhlparser.check_if_game(self.fav_team_id)
File "/home/pi/nhl-led-scoreboard/data/nhl_api_parser.py", line 189, in check_if_game
game = game_data["totalGames"]
KeyError: 'totalGames'

Trying to step through it on my own but not much success just yet.

Time Format - 12 or 24h option

Currently the time shows up as "06:00" for a game, which is a bit weird for people who are used to a 24hr clock format. Would it be possible for a 24hr clock format option in the config?

Sudo ./install.sh

If it does not work, do sudo bash ./install.sh.

Ill fix it in the readme file when I get back from trip.

"no game today"

Hey guys,
I just installed the NHL Scoreboard. I'm using the MLB Scoreboard since early April 2019 and just found out that there is a NHL version :)

My problem now is that whatever I do, I only get the "no game today" info. I tried changing the favorite team id to a team playing today in the config.json and by using the --fav-team flag without any results.
It's January 20th today and Detroit is playing but using the ID "17" still gives me the same info:

INFO (11:04:28): NHL Scoreboard - v0.1.0 (64x32)
INFO (11:04:29): Off day State
INFO (11:04:29): ping_day_off

Is there an option somewhere to check the correct date?

Please help me out here.

Regards,
Patrick

Draft related features.

Create a board that will show the list of draft pick with the team's abbrev.

Pre-draft day: show the pick order with pick number on the left and teams abbrev on the right.
During and post draft day have the pick number and Abbrev on the left and name of the player on the right.

NHL news ticker

Make a board that will show nhl related news from an RSS feed.

Generate config.json on intall.sh

To make sure the user dont loose their configuration when they update, put the base configuration into a config.base.json and generate a config.json on install. put the config.json in the gitignore so that its not lost.

ephem module not installed

First run through after an install and I got this error:

$ sudo python3 src/main.py --led-gpio-mapping=adafruit-hat-pwm --led-brightness=60 --led-slowdown-gpio=2
Traceback (most recent call last):
  File "src/main.py", line 9, in <module>
    from dimmer import Dimmer
  File "/home/pi/nhl-led-scoreboard/src/dimmer.py", line 1, in <module>
    import ephem
ModuleNotFoundError: No module named 'ephem'

I don't have a dimmer installed.

**Integrate a new Matrix class***

To make rendering an easier task, Duetoxplode proposed a new Matrix class that is a wrapper for both PIL and the rgbmatrix rendering functions.

Show opponent info on game day.

Is there a way to add that team info screen of the game day opponent? So, using today as an example. Game day is found for Avs. They play Columbus. Add Columbus team info screen into rotation. After game start that screen goes away. Tomorrow, another game day is found, playing the wild. Wild card gets inserted into rotation.

key errors

Greetings,
I'm running the latest version of raspbian with python 2.7.16-1. I was getting key errors on a fresh install when trying to start the scoreboard app. In short, it seems like it didn't want to pick up any of the settings/variables in the json config files (was receiving key errors for end_of_day, debug, fav_team_id). I made the following modifications to get things to run.

data/scoreboard_config.py:

from:

from utils import get_file
import json
import os

class ScoreboardConfig:
def init(self, filename_base, args):
json = self.__get_config(filename_base)
# Misc config options
self.end_of_day = json["end_of_day"]
self.debug = json["debug"]

to:

from utils import get_file
import json
import os

with open('config.json', 'r') as f:
config = json.load(f)

class ScoreboardConfig:
def init(self, filename_base, args):
#json = self.__get_config(filename_base)
json = config
# Misc config options
self.end_of_day = json["end_of_day"]
self.debug = json["debug"]

I'm definitely not a python programmer and I'm sure there's a much cleaner way to do it. I just wanted to post in case it helps anyone out.

day start

Is there a way to change the day start time? I changed the time in the config file but it has no effect. Sometimes it says no game today or its shows the final score of the last game up to just a couple hours before a new game starts. It would be nice to have a new day start earlier in the day/AM.

Restructure for Threading (V2.0)

Need to rethink how to refresh the data and render the images using threading. This will allow to use scrolling text and rotate between different info on the same board (Exemple, rotating between the Period/Clock and the Shot on goal for the live scoreboard).

**Add auto dimmer function**

Feature developed by Falkyre. Allready functional, just need to make a pull-request after I finish the Live Game features

Period recap

Being able to see who scored at the end of each period would be a nice touch. Something like a recap screen that last about 5-10 minutes in between periods. Just a thought I was kicking around for a few days, could be a little to much/ unnecessary for the project.

Differentiate between regular loss and overtime loss

On the "Team Summary" where it shows last game, it currently shows a red L for a loss irregardless of it's overtime loss or not... maybe have it show a red OTL for overtime loss? Helps to know if your team at least got a point out of it.

Design guidelines

Need to write design guidelines to help contributors make their board and features fit with the rest of the project.

Game clock should actually count down

Currently, live game data is retrieved and the current game clock value is statically displayed.

Instead, the game clock should count down as soon as data is retrieved, so you can see how much time is left in the period. This will be a relatively trivial coding change, but will make the clock far more dynamic. :)

Main.py immediately crashes

I'm running the latest beta branch and main.py immediately crashes upon running it.

This is the error I receive:

  File "src/main.py", line 47, in <module>
    run()
  File "src/main.py", line 43, in run
    MainRenderer(matrix, data).render()
  File "/home/pi/nhl-board-dev/src/renderer/main.py", line 38, in render
    self.__render_offday()
  File "/home/pi/nhl-board-dev/src/renderer/main.py", line 59, in __render_offday
    self.boards._off_day(self.data, self.matrix)
  File "/home/pi/nhl-board-dev/src/boards/boards.py", line 26, in _off_day
    board(data, matrix)
  File "/home/pi/nhl-board-dev/src/boards/boards.py", line 65, in scoreticker
    Scoreticker(data, matrix).render()
  File "/home/pi/nhl-board-dev/src/boards/scoreticker.py", line 28, in render
    ScoreboardRenderer(self.data, self.matrix, Scoreboard(self.games[self.index], self.data.teams_info)).render()
  File "/home/pi/nhl-board-dev/src/renderer/scoreboard.py", line 37, in render
    self.draw_live()
  File "/home/pi/nhl-board-dev/src/renderer/scoreboard.py", line 83, in draw_live
    self.draw_power_play()
  File "/home/pi/nhl-board-dev/src/renderer/scoreboard.py", line 131, in draw_power_play
    colors[str(away_number_skaters)])
KeyError: '0'

Need housing information [hardware]

First of all, awesome job on this project! I was thinking about covering this project in a howchoo guide and video, so I'm in the requirements-gathering phase.

I know the MLB-LED-Scoreboard guys covered hardware in their Wiki, but this doesn't cover the actual housing for the screen; did you 3D print yours? If so, uploading the source files (STL at a minimum) to the repo would be a great addition.

Would love additional info on the housing-portion of the hardware setup. Thanks!

Option to delay updates

Just got this setup and the first thing I noticed was that the API updates faster than the feed I use to watch games. Would you be open to a pull request to add this functionality or have you thought about a feature like this at all?

No game winning goal animations

When there is a game deciding goal, like in OT or a Shoot Out, there is no goal animation for the game winning goal. The game status just changes to end of game.

n9rzr

Penalty board

Trigger a penalty board that display the player and the infraction with the amount of minute.

128x64?

Since I have four LED panels connected I was wondering if there are any plans for a 132x64 version.

I found the file to readjust the team logos in the renderer folder but didn't find with the file where I can readjust the game info.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.