MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    MMM-MyScoreboard

    Scheduled Pinned Locked Moved Sport
    277 Posts 60 Posters 563.6k Views 63 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J Offline
      j.e.f.f Project Sponsor Module Developer @Spankythemusical
      last edited by

      @Spankythemusical you won’t have to touch the front end logic. Your NCAA extension file handles what the front end will receive. Typically the way the other sports work is that the sport is configured with the teams you wish to follow. Then you’ll query for all of “today’s” games, then filter what gets returned to the list of teams to follow. There is a README under the sports directory that goes into more detail about all of this.

      You’ll also need to add your sport to the list of supported sports in node_helper.js. It’s an array near the top of the file.

      Lastly, in case there are any special CSS requirements for your sport you may need to add some rules to MMM-MyScoreboard.css. But it should look pretty good right out of the box.

      In any case I’ll lend a hand when I get back next week.

      1 Reply Last reply Reply Quote 0
      • J Offline
        j.e.f.f Project Sponsor Module Developer @P-Bo726
        last edited by

        @P-Bo726 I’m travelling all this week but I’ll see what I can do when I get back.

        1 Reply Last reply Reply Quote 0
        • O Offline
          onetwankyfive
          last edited by

          +1 to NCAAF
          This would be amazing

          1 Reply Last reply Reply Quote 0
          • J Offline
            j.e.f.f Project Sponsor Module Developer @P-Bo726
            last edited by j.e.f.f

            @P-Bo726 So it looks like I’d need to make a pretty significant rewrite to make this module work with multiple instances. Right now my node_helper module stores quite a bit of instance information, including what supported sports modules are required – this part in particular poses a real problem being stored as instance configuration, as opposed to a global module configuration.

            I’ll spend some time thinking about how this might be architected, but I don’t think this will happen any time soon, sorry to say.

            If you wanted to get your hands dirty, you could manually make multiple instances of this module, but it’s really hacky. Make a copy of the MMM-MyScoreboard directory (Say, MMM-MyScoreBoard2). rename MMM-MyScorboard.js to MMM-MyScoreboard2.js. Do the same to the CSS file and rename it to MMM-MyScoreboard2.css. In the MMM-MyScoreboard2.js file, you’ll need to adjust line 12 Module.register("MMM-MyScoreboard" to read Module.register("MMM-MyScoreboard2" and similarly line 38 return ["MMM-MyScoreboard.css"]; to return ["MMM-MyScoreboard2.css"];

            Finally, do a search and replace in MMM-MyScoreboard2.css and replace all instances of MMM-MyScoreboard with MMM-MyScoreboard2.

            Now you have two independent modules - MMM-MyScoreboard and MMM-MyScoreboard2 - that you can configure separately in your config file.

            You can do this as many times as you like, so long as each time you are using a different name.

            1 Reply Last reply Reply Quote 0
            • P-Bo726P Offline
              P-Bo726
              last edited by

              Thank you for the response. I’ll take a look at that hack you provided. If you find some "free’’ time and want to work on the multiple instances I would still find some value in it. No pressure, no hurry. I appreciate all the work you have put into this module and the MM forum in general. Great work!

              J 1 Reply Last reply Reply Quote 0
              • J Offline
                j.e.f.f Project Sponsor Module Developer @P-Bo726
                last edited by

                @P-Bo726 Need to get NFL up and running before anything else. Pre-season starts this week!

                1 Reply Last reply Reply Quote 0
                • K Offline
                  Krisalexroberts 0
                  last edited by

                  Could you get this working with Pointstreak? Lots of minority leagues/sports use Pointstreak such as the UK Elite Ice Hockey League (EIHL)

                  J 1 Reply Last reply Reply Quote 0
                  • J Offline
                    j.e.f.f Project Sponsor Module Developer @Krisalexroberts 0
                    last edited by

                    @Krisalexroberts-0 I’ll take a look to see if there is a public data feed available for this. If so, it should be doable. It will take some time to amass all of the logos and such, but I like the potential for many leagues working with a single API.

                    I still have to finish with NFL – I had it working with last night’s game, but I’d like to run it against next week’s preseason lineup to see if there are any gotchas before I release it.

                    So far I have requests for NCAAF, Pointstreak and eSports. Should be an interesting summer!

                    K 1 Reply Last reply Reply Quote 0
                    • K Offline
                      Krisalexroberts 0 @j.e.f.f
                      last edited by

                      @j.e.f.f you’re a star!

                      I don’t know if this helps: https://github.com/eikeco/pointstreak-leauge-table

                      J 1 Reply Last reply Reply Quote 0
                      • J Offline
                        j.e.f.f Project Sponsor Module Developer @Krisalexroberts 0
                        last edited by

                        @Krisalexroberts-0 it does. Seems to be hit or miss as to which leagues have data feeds. Are there specific leagues that you’re looking to see incorporated? Doesn’t look like I can just incorporate blanket pointstreak support.

                        1 Reply Last reply Reply Quote 0
                        • K Offline
                          Krisalexroberts 0
                          last edited by

                          I’m selfish so only care about EIHL

                          J 1 Reply Last reply Reply Quote 0
                          • J Offline
                            j.e.f.f Project Sponsor Module Developer @Krisalexroberts 0
                            last edited by

                            @Krisalexroberts-0 An API key is required, but I can’t see anywhere on Pointstreak’s site to get one. Nor can I find any documentation on the endpoints (The link you provided was for standings, not for scores). At this point I’m not sure it’s going to be possible… :(

                            1 Reply Last reply Reply Quote 0
                            • J Offline
                              j.e.f.f Project Sponsor Module Developer @Spankythemusical
                              last edited by j.e.f.f

                              @Spankythemusical @onetwankyfive I’m in the process of gathering everything I need for NCAAF. I’ve managed to source all of the logos for Division I (FBS 1-A, FCS 1-AA). Forgive me if this isn’t obvious to me –
                              college football is not really a thing in Canada – but does anyone care about Division II and Division III? From what I can gather, Division I seems to only be what people generally follow.

                              Sourcing logos for Div II and III looks like it will take some time and work, and I’d like to avoid it if it’s not really something people care about. Even ESPN’s web site only has a few logos for those teams.

                              S 1 Reply Last reply Reply Quote 0
                              • S Offline
                                Spankythemusical @j.e.f.f
                                last edited by

                                @j.e.f.f I believe that division 1 is the one that’s followed by the most people. I don’t even know f it’s possible to get info from the other divisions through the major sites.

                                Thank you for doing this. I’m curious to see how far off my attempt is from what you come up with.

                                J 1 Reply Last reply Reply Quote 0
                                • J Offline
                                  j.e.f.f Project Sponsor Module Developer @Spankythemusical
                                  last edited by

                                  @Spankythemusical Actually now that I look at the feed I’m using, it appears that it’s only returning games for FBS (1-A) teams, not FCS (1-AA) unless they are playing a FBS team. This is the feed I found. Is this the same feed you’re using?

                                  http://site.api.espn.com/apis/site/v2/sports/football/college-football/scoreboard?dates=20170907&limit=100

                                  (value for dates is specified to query for a specific day limit sets a maximum number of returned games)

                                  In the above example, one game gets returned for September 7 – Idaho State Bengals vs Utah State Aggies – which corresponds to the one FBS game scheduled for that date. However, if I switch the schedule (say on ESPN’s website) I see four games scheduled, one of which is an overlap with the single FBS game, as Utah is an FBS team, but Idaho State is FCS.

                                  So it appears that FBS teams play FCS teams, and such games will show up in the ESPN feed. However games that feature FCS-only games do not. It appears that FCS teams play games against Division II or III – I see one game on Sept 7: West Alabama Tigers vs Samford Bulldogs. West Alabama is a Division II team.

                                  I have learned from this Wiki that FBS teams don’t play Division II/III teams, only FCS teams, as victories against anything below FCS don’t count for bowl eligibility.
                                  https://en.wikipedia.org/wiki/NCAA_Division_II

                                  Is this a hard and fast rule? I wouldn’t want to go through the effort of sourcing Div II/III logos if they will never appear against FBS teams.

                                  In any case, it appears that I can only support FBS (1-A) games at the moment. Is this good enough for the college football fans?

                                  S 2 Replies Last reply Reply Quote 0
                                  • S Offline
                                    Spankythemusical @j.e.f.f
                                    last edited by

                                    @j.e.f.f Code written for FBS, but also having FCS logos in the folder (for overlapping game types), should work for 99.9% of the people. If that’s possible.

                                    I’ll have to look in morning to see if that’s the website that I’ve been using. It does seem about right.

                                    J 1 Reply Last reply Reply Quote 0
                                    • J Offline
                                      j.e.f.f Project Sponsor Module Developer @Spankythemusical
                                      last edited by

                                      @Spankythemusical yeah certainly doable. I have already sourced all the FBS and FCS team logos. So if the feed only covers FBS games then we should be covered for all team logos.

                                      I’ve learned so much about American college football over the last few days!

                                      O 1 Reply Last reply Reply Quote 0
                                      • O Offline
                                        onetwankyfive @j.e.f.f
                                        last edited by

                                        @j.e.f.f This excites me! Div 1 is what I was looking for

                                        1 Reply Last reply Reply Quote 0
                                        • S Offline
                                          Spankythemusical @j.e.f.f
                                          last edited by

                                          @j.e.f.f just FYI, that is the site I’ve been using, minus the date and limit items.

                                          J 1 Reply Last reply Reply Quote 0
                                          • J Offline
                                            j.e.f.f Project Sponsor Module Developer
                                            last edited by

                                            NFL support has been added. To install the update, first go into the MMM-MyScoreboard and execute git pull, the type npm install as there are new dependencies you’ll need.

                                            I monitored games over last week and this week and everything looks pretty good, but I haven’t seen a game go into overtime yet. So I’m not 100% positive things won’t go wonky for an overtime game yet.

                                            Also, there is a new view style added: smallLogos. It’s layout is similar to the default, but each row is the same height as the oneLine view style.

                                            0_1502660518728_viewStyle_smallLogos.png

                                            Have fun! And let me know if something looks weird.

                                            1 Reply Last reply Reply Quote 1

                                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                            With your input, this post could be even better 💗

                                            Register Login
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 5
                                            • 13
                                            • 14
                                            • 2 / 14
                                            • First post
                                              Last post
                                            Enjoying MagicMirror? Please consider a donation!
                                            MagicMirror created by Michael Teeuw.
                                            Forum managed by Sam, technical setup by Karsten.
                                            This forum is using NodeBB as its core | Contributors
                                            Contact | Privacy Policy