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-soccer v2

    Scheduled Pinned Locked Moved Sport
    52 Posts 9 Posters 27.0k Views 9 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.
    • M Offline
      matze86 @lavolp3
      last edited by matze86

      @lavolp3
      i tried to start my mirror n server mode, but than i got these errors…

      17.03.2021 20:05.53.544] [ERROR] WARNING! Could not load config file. Starting with default configuration. Error found: Error: The module '/home/pi/MagicMirror/modules/MMM-Navigate/node_modules/epoll/build/Release/epoll.node'
      was compiled against a different Node.js version using
      NODE_MODULE_VERSION 76. This version of Node.js requires
      NODE_MODULE_VERSION 83. Please try re-compiling or re-installing
      the module (for instance, using `npm rebuild` or `npm install`).
      [17.03.2021 20:05.53.547] [LOG]   Loading module helpers ...
      [17.03.2021 20:05.53.550] [LOG]   No helper found for module: alert.
      [17.03.2021 20:05.53.551] [LOG]   Initializing new module helper ...
      [17.03.2021 20:05.53.551] [LOG]   Module helper loaded: updatenotification
      [17.03.2021 20:05.53.552] [LOG]   No helper found for module: clock.
      [17.03.2021 20:05.53.558] [ERROR] Whoops! There was an uncaught exception...
      [17.03.2021 20:05.53.563] [ERROR] Error: The module '/home/pi/MagicMirror/modules/MMM-Navigate/node_modules/epoll/build/Release/epoll.node'
      was compiled against a different Node.js version using
      NODE_MODULE_VERSION 76. This version of Node.js requires
      NODE_MODULE_VERSION 83. Please try re-compiling or re-installing
      the module (for instance, using `npm rebuild` or `npm install`).
          at Object.Module._extensions..node (internal/modules/cjs/loader.js:1122:18)
          at Module.load (internal/modules/cjs/loader.js:928:32)
          at Function.Module._load (internal/modules/cjs/loader.js:769:14)
          at Module.require (internal/modules/cjs/loader.js:952:19)
          at require (internal/modules/cjs/helpers.js:88:18)
          at bindings (/home/pi/MagicMirror/modules/MMM-Navigate/node_modules/bindings/bindings.js:112:48)
          at /home/pi/MagicMirror/modules/MMM-Navigate/node_modules/epoll/epoll.js:7:31
          at Object.<anonymous> (/home/pi/MagicMirror/modules/MMM-Navigate/node_modules/epoll/epoll.js:15:3)
          at Module._compile (internal/modules/cjs/loader.js:1063:30)
          at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
      
      

      i reinstalled in the following order:
      the module “navigate”, npm, node.js, mirror software,
      but it doen’t change anything. i have to check this before i can try further…

      with npm run start the mirror works well…

      1 Reply Last reply Reply Quote 0
      • M Offline
        matze86 @lavolp3
        last edited by

        @lavolp3

        here is the output from the console

        MMM-soccer: "received a Socket Notification: MATCHES"
        MMM-soccer.js:432 MMM-soccer: "Calculating Team Display Boundaries"
        MMM-soccer.js:432 MMM-soccer: "Focus on Team"
        MMM-soccer.js:432 MMM-soccer: "Finding focus team for table..."
        MMM-soccer.js:432 MMM-soccer: "Focus Team found: FC Bayern München"
        MMM-soccer.js:432 MMM-soccer: "No Focus Team found! Please check your entry!"
        ReferenceError: numberOfNextMatches is not defined
            at Class.prepareMatches (MMM-soccer.js:232)
            at Class.getTemplateData (MMM-soccer.js:182)
            at module.js:89
            at new Promise (<anonymous>)
            at Class.getDom (module.js:86)
            at main.js:114
            at new Promise (<anonymous>)
            at updateDom (main.js:113)
            at Object.updateDom (main.js:551)
            at Class.updateDom (module.js:364)
        

        Why did it say, that no focus team has found? It is highlighted in “league mode”
        Furthermore i did not edit the MMM-soccer.js. so i don’t have any idea, why numberOfNextMatches is not defined

        M 1 Reply Last reply Reply Quote 0
        • M Offline
          matze86 @matze86
          last edited by

          i saw, that the focus for table was not found. thats correct. it is only highlighted in the current matchday…

          lavolp3L 2 Replies Last reply Reply Quote 0
          • lavolp3L Offline
            lavolp3 Module Developer @matze86
            last edited by

            @matze86 ok I’ll check that error.

            How to troubleshoot modules
            MMM-soccer v2, MMM-AVStock

            1 Reply Last reply Reply Quote 0
            • lavolp3L Offline
              lavolp3 Module Developer @matze86
              last edited by

              @matze86 OK i pushed a fix.
              Please do a git pull and let me know if it works better now.

              How to troubleshoot modules
              MMM-soccer v2, MMM-AVStock

              M 1 Reply Last reply Reply Quote 0
              • M Offline
                matze86 @lavolp3
                last edited by

                @lavolp3

                It worked! Very nice! Thx a lot👍🏻

                Now i‘m „fighting“ with the css and the alignment in the table. See the picture for more Details

                lavolp3L 1 Reply Last reply Reply Quote 0
                • lavolp3L Offline
                  lavolp3 Module Developer @matze86
                  last edited by

                  @matze86 yeah another issue i have just now realized. Give me a bit of time.

                  How to troubleshoot modules
                  MMM-soccer v2, MMM-AVStock

                  lavolp3L M 2 Replies Last reply Reply Quote 0
                  • lavolp3L Offline
                    lavolp3 Module Developer @lavolp3
                    last edited by

                    @lavolp3 should be fixed now. Only one css line
                    Again, please do a git pull

                    How to troubleshoot modules
                    MMM-soccer v2, MMM-AVStock

                    1 Reply Last reply Reply Quote 0
                    • M Offline
                      matze86 @lavolp3
                      last edited by

                      @lavolp3
                      I fixed it by my own

                      I can send you the css of you want

                      Is ist possible to delete the last games of my team?

                      I only found a Solution to reduce it from 3 to 2 , by editing line 247 (changing the number in bracktes), but each other Number than 3 will only reduce it to 2 Games

                      lavolp3L 1 Reply Last reply Reply Quote 0
                      • lavolp3L Offline
                        lavolp3 Module Developer @matze86
                        last edited by

                        @matze86 Change line 249 in MMM-soccer.js from

                        for (var i = index - 1; i < filteredMatches.length; i++) {
                                            nextMatches.push(filteredMatches[i]);
                                        }
                        

                        to

                        
                        for (var i = index; i < filteredMatches.length; i++) {
                                            nextMatches.push(filteredMatches[i]);
                                        }
                        

                        (Remove the “- 1”)

                        How to troubleshoot modules
                        MMM-soccer v2, MMM-AVStock

                        M 1 Reply Last reply Reply Quote 0
                        • M Offline
                          matze86 @lavolp3
                          last edited by

                          @lavolp3

                          i changed it to “+ 1”, because with with i = index it will still display the last game. Or when will the module update the game list? i think on the next matchday?

                          lavolp3L 1 Reply Last reply Reply Quote 0
                          • lavolp3L Offline
                            lavolp3 Module Developer @matze86
                            last edited by lavolp3

                            @matze86
                            Hm. The module has a range of future and recent games.
                            Then it searches for the index of the first game after the current date.
                            THen takes that value as index, so index should be the next game, index-1 the last and index+1 the one after the next.

                            Does your workaround actually work?
                            Then I’m thinking wrong.

                            How to troubleshoot modules
                            MMM-soccer v2, MMM-AVStock

                            M 1 Reply Last reply Reply Quote 0
                            • M Offline
                              matze86 @lavolp3
                              last edited by

                              @lavolp3

                              On monday it still displayed the last Game with „Index“
                              Today it works as you described. So this is the best Solution (for me)
                              next

                              Other Topic:
                              league

                              When will the matchday in „league“ change to the next?

                              Is it possible to add More columns to the table like this? Or to add up/down arrows? Or to add further Information like CL-Position/EL-Position and so on?

                              lavolp3L 1 Reply Last reply Reply Quote 1
                              • lavolp3L Offline
                                lavolp3 Module Developer @matze86
                                last edited by

                                @matze86 said in MMM-soccer v2:

                                Is it possible to add More columns to the table like this? Or to add up/down arrows? Or to add further Information like CL-Position/EL-Position and so on?

                                I added played games as a column just today . Up and down arrows are a good idea but I need to check if the API gives the most recent table. I don’t think so.
                                Good idea!
                                They positions (relegation, qualifications) is most probably not possible.
                                I’ll check.

                                How to troubleshoot modules
                                MMM-soccer v2, MMM-AVStock

                                M 1 Reply Last reply Reply Quote 0
                                • M Offline
                                  matze86 @lavolp3
                                  last edited by

                                  @lavolp3

                                  Great! I‘ll Update the Module soon

                                  Maybe with a different colour for the Position?

                                  lavolp3L 1 Reply Last reply Reply Quote 0
                                  • lavolp3L Offline
                                    lavolp3 Module Developer @matze86
                                    last edited by

                                    @matze86 said in MMM-soccer v2:

                                    @lavolp3

                                    Great! I‘ll Update the Module soon

                                    Maybe with a different colour for the Position?

                                    So I checked the API output. Unfortunately we don’t have a reference for the recent table position.

                                    
                                    "table": [{
                                    	"position": 1,
                                    	"team": {
                                    		"id": 5,
                                    		"name": "FC Bayern München",
                                    		"crestUrl": "https://crests.football-data.org/5.svg"
                                    	},
                                    	"playedGames": 26,
                                    	"form": "W,W,W,W,L",
                                    	"won": 19,
                                    	"draw": 4,
                                    	"lost": 3,
                                    	"points": 61,
                                    	"goalsFor": 78,
                                    	"goalsAgainst": 35,
                                    	"goalDifference": 43
                                      },
                                      ...
                                    

                                    We would have to call the API again for the last matchday’s table, which consumes API calls.
                                    I’m not sure if I want that.
                                    I still very much like the idea however.

                                    Also, you can see there’s no reference to relegation or qualification ranks

                                    How to troubleshoot modules
                                    MMM-soccer v2, MMM-AVStock

                                    M 1 Reply Last reply Reply Quote 0
                                    • M Offline
                                      matze86 @lavolp3
                                      last edited by

                                      @lavolp3

                                      Allright… Too Bad…

                                      Here you can see my momentary Soccer Dashboard. I copied your module three times with different configs.
                                      But i‘m Not statisfied with the Symbols of fontawesome. Are there other Styles possible?
                                      I think the api also does Not give the Information about the time of Match?

                                      lavolp3L 1 Reply Last reply Reply Quote 0
                                      • lavolp3L Offline
                                        lavolp3 Module Developer @matze86
                                        last edited by lavolp3

                                        @matze86 said in MMM-soccer v2:

                                        I think the api also does Not give the Information about the time of Match?

                                        It does.
                                        Usually APIs work with timestamps or date strings including date and time.
                                        My module is set to only show the time at the day of match. It does not show date AND time due to limited space.

                                        if (match.status == "SCHEDULED" || match.status == "POSTPONED") {
                                                            match.state = (moment(match.utcDate).diff(moment(), 'days') > 7) ? moment(match.utcDate).format("D.MM.") : (moment(match.utcDate).startOf('day') > moment()) ? moment(match.utcDate).format("dd") : moment(match.utcDate).format("LT");
                                                        
                                        

                                        How to troubleshoot modules
                                        MMM-soccer v2, MMM-AVStock

                                        M 1 Reply Last reply Reply Quote 0
                                        • M Offline
                                          matze86 @lavolp3
                                          last edited by

                                          @lavolp3

                                          thx. now i’ll come closer to a perfect overview :thumbs_up:

                                          1 Reply Last reply Reply Quote 0
                                          • E Offline
                                            Egnos
                                            last edited by Egnos

                                            Hi @lavolp3 I downloaded your module from here:
                                            https://bytemeta.vip/repo/lavolp3/MMM-soccer

                                            But for some reason the results of the Champions League do not show the logos of the teams and also the results seem to me formatted badly.
                                            Am I doing something wrong?
                                            Follow a screenshot:
                                            2022-09-01-135409-3280x1050-scrot

                                            Here is the config.js:

                                            {
                                                module: 'MMM-soccer',
                                                position: 'top_right',
                                                config: {
                                                    api_key: '2c709c5e9c9a491a88b810c43ae00f0e',
                                                    show: ['SA'],
                                                    colored: true,
                                                    logos: true,
                                                    updateInterval: 60,
                                                    showTables: false,
                                                    focus_on: {
                                            			'SA': 'FC Juventus'
                                            					},
                                                    max_teams: 5,
                                                    matchType: 'league'
                                            			}
                                            		},
                                            		
                                            		{
                                                module: 'MMM-soccer',
                                                position: 'top_left',
                                                config: {
                                                    api_key: '2c709c5e9c9a491a88b810c43ae00f0e',
                                                    show: ['CL'],
                                                    logos: true,
                                                    colored: true,
                                                    updateInterval: 60,
                                                    focus_on: {
                                            			'CL': 'FC Juventus'
                                            					},
                                                    max_teams: 5,
                                                    matchType: 'league'
                                            			}
                                            		},
                                            

                                            Thanks.

                                            My Mirror https://forum.magicmirror.builders/topic/17262/the-raspimirror-was-born/7

                                            1 Reply Last reply Reply Quote 0

                                            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
                                            • 2 / 3
                                            • 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