• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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.

Adding Modules

Scheduled Pinned Locked Moved Troubleshooting
12 Posts 3 Posters 759 Views 3 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.
  • B Offline
    bkcarroll1
    last edited by Oct 13, 2020, 5:26 PM

    Hello
    I am trying to add MMM-My Standings modules to my magic mirror. I have the default config running fine, but when i add this module it breaks the config

    modules: [
      {
    		module: "MMM-MyStandings",
    		position: "bottom_left",
    		config: {
    			updateInterval: 60 * 60 * 1000, // every 60 minutes
    			rotateInterval: 1 * 60 * 1000, // every 1 minute
    			sports: [
    				{ league: "NBA", groups: ["Atlantic", "Central", "Southeast", "Northwest", "Pacific", "Southwest"] },
    				{ league: "MLB", groups: ["American League East", "American League Central", "American League West", "National League East", "National League Central", "National League West"] },
    				{ league: "NFL", groups: ["AFC East", "AFC North", "AFC South", "AFC West", "NFC East", "NFC North", "NFC South", "NFC West"] },
    				{ league: "NHL", groups: ["Atlantic Division", "Metropolitan Division", "Central Division", "Pacific Division"] },
    				{ league: "MLS", groups: ["Eastern Conference", "Western Conference"] },
    				{ league: "NCAAF", groups: ["American Athletic - East", "American Athletic - West", "Atlantic Coast Conference - Atlantic", "Atlantic Coast Conference - Coastal",
    										"Big 12 Conference", "Big Ten - East", "Big Ten - West", "Conference USA - East", "Conference USA - West",
    										"FBS Independents", "Mid-American - East", "Mid-American - West", "Mountain West - Mountain", "Mountain West - West",
    										"Pac 12 - North", "Pac 12 - South", "SEC - East", "SEC - West", "Sun Belt - East", "Sun Belt - West"] }
    				{ league: "NCAAM", groups: ["America East Conference", "American Athletic Conference", "Atlantic 10 Conference", "Atlantic Coast Conference", "Atlantic Sun Conference",
    										"Big 12 Conference", "Big East Conference", "Big Sky Conference", "Big South Conference",
    										"Big Ten Conference", "Big West Conference", "Colonial Athletic Association", "Conference USA",
    										"Horizon League", "Ivy League", "Metro Atlantic Athletic Conference", "Mid-American Conference",
    										"Mid-Eastern Athletic Conference", "Missouri Valley Conference", "Mountain West Conference", "Northeast Conference",
    										"Ohio Valley Conference", "Pac-12 Conference", "Patriot League", "Southeastern Conference",
    										"Southern Conference", "Southland Conference", "Southwestern Athletic Conference", "Summit League",
    										"Sun Belt Conference", "West Coast Conference", "Western Athletic Conference"] }
    			],
    			nameStyle: "short",
    			showLogos: true,
    			useLocalLogos: true,
    			showByDivision: true,
    			fadeSpeed: 2000,
    		}
      }
    ][
    		{
    			module: "alert",
    		},
    		{
    			module: "updatenotification",
    			position: "top_bar"
    		},
    		{
    			module: "clock",
    			position: "top_left"
    
    S 1 Reply Last reply Oct 13, 2020, 5:44 PM Reply Quote 0
    • S Offline
      sdetweil @bkcarroll1
      last edited by sdetweil Oct 13, 2020, 5:46 PM Oct 13, 2020, 5:44 PM

      @bkcarroll1 run

      npm run config:check
      

      from the MagicMirror folder

      the error is usually on the line before the problem reported

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      S 1 Reply Last reply Oct 13, 2020, 6:45 PM Reply Quote 0
      • S Offline
        sdetweil @sdetweil
        last edited by sdetweil Oct 13, 2020, 6:46 PM Oct 13, 2020, 6:45 PM

        @bkcarroll1 also see the How to add modules link in my signature.

        each { has a }
        each [ has a ]
        sections continued have a trailing ,

        general rules.
        thing on the left of : does NOT need quotes
        if the thing on the right of : is a number or true/false, quotes not used
        otherwise it needs quotes. either kind is ok, long as the are the same for the thing being quoted

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        M B 2 Replies Last reply Oct 13, 2020, 7:14 PM Reply Quote 1
        • M Offline
          Mykle1 Project Sponsor Module Developer @sdetweil
          last edited by Oct 13, 2020, 7:14 PM

          @sdetweil said in Adding Modules:

          also see the How to add modules link in my signature.

          Brilliant! :-)

          Create a working config
          How to add modules

          1 Reply Last reply Reply Quote 0
          • B Offline
            bkcarroll1 @sdetweil
            last edited by Oct 13, 2020, 7:37 PM

            @sdetweil I have zero clue what I’m doing. I think -{- this is whats causing the issue. I dont know what to do with it though

            pi@raspberrypi:~ $ cd ~/Magic Mirror
            bash: cd: too many arguments
            pi@raspberrypi:~ $ cd ~ /MagicMirror
            bash: cd: too many arguments
            pi@raspberrypi:~ $ cd ~/MagicMirror
            pi@raspberrypi:~/MagicMirror $ npm run config:check
            
            > magicmirror@2.13.0 config:check /home/pi/MagicMirror
            > node js/check_config.js
            
            [2020-10-13 14:31:52.815] [INFO]   Checking file...  /home/pi/MagicMirror/config/config.js
            [2020-10-13 14:31:53.114] [ERROR]  Your configuration file contains syntax errors :(
            [2020-10-13 14:31:53.120] [ERROR]  Line 120 col 5 Parsing error: Unexpected token {
            pi@raspberrypi:~/MagicMirror $ 
            
            modules: [
            		{
            			module: "alert",
            		},
            		{
            			module: "updatenotification",
            			position: "top_bar"
            		},
            		{
            			module: "clock",
            			position: "top_left"
            		},
            		{
            			module: "calendar",
            			header: "Calendar",
            			position: "upper_third",
            			config: {
            				calendars: [
            					{
            						symbol: "My Calendar",
            						url: "https://calendar.google.com/calendar/ical/sucmeup%40gmail.com/public/basic.ics"					}
            				]
            			}
            		},
            		{
            			module: "compliments",
            			position: "lower_third"
            		},
            		{
            			module: "currentweather",
            			position: "top_right",
            			config: {
            				location: "Conroe",
            				locationID: "4682991", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
            				appid: "3aa7f394b0c7484a03d49ef6f9e85a48"
            			}
            		},
            		{
            			module: "weatherforecast",
            			position: "bottom_right",
            			header: "Weather Forecast",
            			config: {
            				location: "Conroe",
            				locationID: "4682991", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
            				appid: "3aa7f394b0c7484a03d49ef6f9e85a48"
            			}
            		},
            		{
            			module: "newsfeed",
            			position: "bottom_bar",
            			config: {
            				feeds: [
            					{
            						title: "New York Times",
            						url: "https://rss.nytimes.com/services/xml/rss/nyt/HomePage.xml"
            					}
            				],
            				showSourceTitle: true,
            				showPublishDate: true,
            				broadcastNewsFeeds: true,
            				broadcastNewsUpdates: true
            			}
            		},
            	[
              {
            		module: "MMM-MyStandings",
            		position: "top_right",
            		config: {
            			updateInterval: 60 * 60 * 1000, // every 60 minutes
            			rotateInterval: 1 * 60 * 1000, // every 1 minute
            			sports: [
            				{ league: "NBA", groups: ["Atlantic", "Central", "Southeast", "Northwest", "Pacific", "Southwest"] },
            				{ league: "MLB", groups: ["American League East", "American League Central", "American League West", "National League East", "National League Central", "National League West"] },
            				{ league: "NFL", groups: ["AFC East", "AFC North", "AFC South", "AFC West", "NFC East", "NFC North", "NFC South", "NFC West"] },
            				{ league: "NHL", groups: ["Atlantic Division", "Metropolitan Division", "Central Division", "Pacific Division"] },
            				{ league: "MLS", groups: ["Eastern Conference", "Western Conference"] },
            				{ league: "NCAAF", groups: ["American Athletic - East", "American Athletic - West", "Atlantic Coast Conference - Atlantic", "Atlantic Coast Conference - Coastal",
            										"Big 12 Conference", "Big Ten - East", "Big Ten - West", "Conference USA - East", "Conference USA - West",
            										"FBS Independents", "Mid-American - East", "Mid-American - West", "Mountain West - Mountain", "Mountain West - West",
            										"Pac 12 - North", "Pac 12 - South", "SEC - East", "SEC - West", "Sun Belt - East", "Sun Belt - West"] }
            				{ league: "NCAAM", groups: ["America East Conference", "American Athletic Conference", "Atlantic 10 Conference", "Atlantic Coast Conference", "Atlantic Sun Conference",
            										"Big 12 Conference", "Big East Conference", "Big Sky Conference", "Big South Conference",
            										"Big Ten Conference", "Big West Conference", "Colonial Athletic Association", "Conference USA",
            										"Horizon League", "Ivy League", "Metro Atlantic Athletic Conference", "Mid-American Conference",
            										"Mid-Eastern Athletic Conference", "Missouri Valley Conference", "Mountain West Conference", "Northeast Conference",
            										"Ohio Valley Conference", "Pac-12 Conference", "Patriot League", "Southeastern Conference",
            										"Southern Conference", "Southland Conference", "Southwestern Athletic Conference", "Summit League",
            										"Sun Belt Conference", "West Coast Conference", "Western Athletic Conference"] }
            			],
            			nameStyle: "short",
            			showLogos: true,
            			useLocalLogos: true,
            			showByDivision: true,
            			fadeSpeed: 2000,
            		}
              }
            ]
            ]
            };
            
            S 1 Reply Last reply Oct 13, 2020, 7:47 PM Reply Quote 0
            • S Offline
              sdetweil @bkcarroll1
              last edited by sdetweil Oct 13, 2020, 7:59 PM Oct 13, 2020, 7:47 PM

              @bkcarroll1 as I said, the error is usually on the line before the one reported

              missing comma

              when u see
              “unexpected token”
              99% of the time there is a missing trailing comma on the line before

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              B 1 Reply Last reply Oct 13, 2020, 8:59 PM Reply Quote 0
              • B Offline
                bkcarroll1 @sdetweil
                last edited by Oct 13, 2020, 8:59 PM

                @sdetweil I just tried to do your Jeopardy tutorial and i got it working. Your tutorial was missing the line for animationSpeed. After adding that line it worked. I cant copy and paste. My format changes when I do and thats whats breaking the config. If i manually type the lines it works perfectly. Just wanted to make something for the wife. Thanks for help.

                S 1 Reply Last reply Oct 13, 2020, 9:10 PM Reply Quote 0
                • S Offline
                  sdetweil @bkcarroll1
                  last edited by sdetweil Oct 13, 2020, 9:10 PM Oct 13, 2020, 9:10 PM

                  @bkcarroll1 jeopardy tutorial?

                  animationspeed??

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  B M 2 Replies Last reply Oct 13, 2020, 9:20 PM Reply Quote 0
                  • B Offline
                    bkcarroll1 @sdetweil
                    last edited by Oct 13, 2020, 9:20 PM

                    @sdetweil My mistake is was a post with a tutorial from @Mykle1

                    S 1 Reply Last reply Oct 13, 2020, 9:23 PM Reply Quote 1
                    • S Offline
                      sdetweil @bkcarroll1
                      last edited by Oct 13, 2020, 9:23 PM

                      @bkcarroll1 I just reference it Everytime someone new comes along.

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      1 Reply Last reply Reply Quote 1
                      • 1
                      • 2
                      • 1 / 2
                      1 / 2
                      • First post
                        1/12
                        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