Here’s a module to display today’s scores for your favourite teams across multiple leagues.
[card:jclarke0000/MMM-MyScoreboard]
UPDATE 3-OCT-2022!
- Correction of SNET provider ticker URL
- Change of ESPN provider URL from HTTP to HTTPS
- Replacement of deprecated library Request with Axios
- Addition of of WNBA and NCAAW womens’ basketball
- Team logo updates for various North American leagues
- Correction of NCAA Wisconsin Badgers team shortcode from
WIS
to WISC
Note to the anyone updating from a previous version:
- In the
MMM-MyScoreboard
directory, run git pull
to get the latest source code
- Run
npm install
to install the new dependencies
- (Optional) Run
npm prune
to remove old dependencies that are no longer required
Display is configurable for your preferred of 6 different view styles:
But Jeff! There are already modules for all these sports! Why did you write this?
Glad you asked! While there are already modules to support many of the sports I am interested in, they all look and behave just a little bit differently. I wanted my scoreboard to have a consistent look across all leagues, and I also wanted the module to hide itself completely if there were no games.
Furthermore, I wanted this to be modular such that adding more leagues would be fairly straightforward. Right now it supports NHL, MLB, NBA, NFL, MLS, NCAAF and CFL (Canadian Football). Pretty much any league with a public API can be added provided it fits with the two team, current score with status (e.g.: current period and game clock, future start time, etc.) format.
So what’s the catch?
My module ONLY displays today’s games. You won’t see yesterday’s scores (well you can with a creative hack using one of the configs… more below), nor will you see a schedule for upcoming games. My thought is you’re not really spending a lot of time looking at your mirror – you’re likely busy doing other stuff, like actually watching the game. But for today’s games that haven’t yet started, it’s a quick reminder that you need to make time later for your obligation to consume professional sport.
What’s this magical hack you speak of?
There is a configuration called rolloverHours
that treats x amount of hours past midnight as the previous day. This way your scores don’t mysteriously disappear mid game at midnight (West coast NHL playoff overtime anybody?). Typically you might set this to 2 or 3 hours, but if you set it, say, to 12
, then you’ll see yesterday’s finals up until noon, after which you’ll start to see today’s lineup.
Enjoy this module! I’m quite proud of it, and let me know if you’d like to see some other leagues included. I’ve already had a request for pro video game leagues. It’s a little different and poses a bit of a challenge but I’ll see if it can be done.
Special thanks to my beta testers @number1dan, @nhl, @d3r, @cowboysdude, and anyone else who tried this module out while I was getting everything working.
-Jeff