A Sleeper NFL module that displays your weekly fantasy matchup in a simple, easy to read table.
- An installation of MagicMirror2
- npm
- node-fetch
-
Clone this repo into your
~/MagicMirror/modules
directory. -
run
npm install
in the~/MagicMirror/modules/MMM-SleeperNFL
directory. -
- Configure your
~/MagicMirror/config/config.js
:
{ module: 'MMM-SleeperNFL', position: 'bottom_left', config: { userId: '{{Sleeper user ID}}', //required leagueId: '{{Sleeper league ID}}', //required showBench: false, //optional, default: true showPlayerAvatars: false, //optional, default: true tableSize: 'xsmall', //optional, default: 'small' ('xsmall', 'small', 'medium') liveInterval: 60000, //optional, default: 30000 (30 seconds) inactiveInterval: 300000 //optional, default: 5minutes (in milliseconds) } },
- Configure your
Option | Default | Description |
---|---|---|
userId |
required |
Your unique Sleeper user ID. Can be found at https://api.sleeper.app/v1/user/{{YOUR_USERNAME}} |
leagueId |
required |
Your league's unique ID. Can be found in the Sleeper URL when you've logged in (https://sleeper.com/leagues/{{leagueId}}/matchup ) or by taking your userId and querying https://api.sleeper.app/v1/user/{{userId}}/leagues/nfl/2022 |
showBench |
true |
Shows all bench players in your roster on the module (excluding Injured Reserve) |
showPlayerAvatars |
true |
Displays player avatars next to their names. Can sometimes cause issues if Sleeper doesn't have an avatar for a player (usually rookies or practice squad players) |
tableSize |
small |
Font size of table. Possible values: 'xsmall' , 'small' , 'medium' ('large' and above will cause issues and likely take up the entire screen) |
liveInterval |
30000 (30 seconds) |
How often the module checks for a live game and updates player scores. |
inactiveInterval |
300000 (5 minutes) |
How often the player rosters and league details update. This reload interval will fetch things like roster changes and team/league name changes. |
- Improve HTML formatting to make sure that the middle column (roster positions) is always centered in the table
- Overhaul player
obj
to clean up the backend organization - Include custom team names, not just usernames
- Add posession indicator to show if a player's team is currently on offense