• 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.

I am stuck need help

Scheduled Pinned Locked Moved Unsolved Troubleshooting
25 Posts 11 Posters 8.7k Views 10 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.
  • D Offline
    dcarls91
    last edited by yawns Feb 2, 2019, 8:10 PM Feb 1, 2019, 10:59 PM

    Hello, very new to coding and the magic mirror platform. I have installed magic mirror and the modules correctly. I then went into the config.js file and edited it to add the modules etc. Every time I try to start magic mirror it tells me that I have no validated config. js file and that there are errors. Could someone please tell me what I am doing wrong.
    Here is the entire config.js file:

    var config = {
    	address: "localhost", // Address to listen on, can be:
    	                      // - "localhost", "127.0.0.1", "::1" 
    	                      // - another specific IPv4/6 
    	                      // - "", "0.0.0.0", "::" 
    	                      // 
    	port: 8080,
    	ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], 
    	
            language: "en",
    	timeFormat: 24,
    	units: "imperial",
    
    	modules: [
    		  {
    			module: "alert",
    		  },
    		  {
    			module: "updatenotification",
    			position: "top_bar",
    		  },
    		  {
    			module: "clock",
    			position: "top_left",
    		  },
    		  {
    		 	module: "calendar"
    			header: "Calendar"
    			position: "top_left",
    			config: {
    				calendars: [
    					{
    						symbol: "calendar-check",
    						url: "webcal://www.calendarlabs.com/templates/ical/US-Holidays.ics"
    					
    				         },
                                             {
    
    						symbol: "calendar-plus-o ",
    						url: "https://calendar.google.com/XXXXXXXX/basic.ics"
    					},
    					{
    						symbol: "calendar-plus-o ",
    						url: "https://calendar.google.com/XXXXXXX/basic.ics"
    				}	
    				
    			
    		  },
    		  {
    			module: "helloworld",
    		        position: "top_bar",
    		        config: {
    			         
    			         text: "Welcome to the Carls Residence"
    			        } 
    		  },
    		  {
    			
                             module: "MMM-DarkSkyForecast",
                             header: "Weather",
                             position: "top_right",
                             classes: "default everyone",
                             disabled: false,
                             config: {
                                      apikey: "Xxxxxxxxxxdda4d069a",
                                      latitude: "39.548935",
                                      longitude: "-89.294533",      
                                      iconset: "4c",
                                      concise: false,
                                      forecastLayout: "table"
                                     }
    			
    		  },
    		  {
    			 module: "MMM-MyScoreboard",
                             position: "bottom_left",
                             classes: "default everyone",
                             header: "My Scoreboard",
                             config: {
                                      show LeagueSeparators: true,
                                      colored: true,
                                      viewStyle: "mediumLogos",
                                         sports: [
                                                  {
                                                   league: "NHL",
                                                   groups: ["Western"]
                                                  },
                                                  {
                                                   league: "NFL",
                                                   groups: ["NFC North"]
                                                  },
                                                  {
                                                   league: "MLB",
                                                   groups: ["NL Central"]
                                                 },
                                                 {
                                                  league: "NCAAM",
                                                  groups: ["Big Ten"]
                                                 },
                                                 {
                                                  league: "NCAAF",
                                                  groups: ["Big Ten"]
                                      }
    		  },
    		  {
    		
    
    		       module: 'MMM-iFrame-Ping',
    		       position: 'bottom_left',	
    		       config: {
    			        // See 'Configuration options' for more information.
    			        url: "https://radar.weather.gov/radar.php?rid=ILX&product=NCR&overlay=11101111&loop=yes", 
    			        height:"100%", 
    			        width:"100%",
    			        autoRefresh: true, 
    			        updateInterval: 10, 
    			        displayLastUpdate: true,
    			        width: "100%", 
    			        height: "400px", 
    			       scrolling: "no" 
    			}
    	           },
                       {
                  
    
    
                    	module: "newsfeed",
    			position: "bottom_bar",
    			config: {
    				 feeds: [
    					{
    						title: "Fox News",
    						url: "http://feeds.foxnews.com/foxnews/latest"
    					}
    				 ],
    				  showSourceTitle: true,
    				  showPublishDate: true
    			        }
    		 },
    	   ]
    
    };
    
    
    if (typeof module !== "undefined") {module.exports = config;}
    
    A 1 Reply Last reply Feb 3, 2019, 9:46 PM Reply Quote 0
    • M Offline
      Mykle1 Project Sponsor Module Developer
      last edited by Feb 1, 2019, 11:41 PM

      You may want to start from scratch, adding one module at a time and running the mirror to confirm your entries are correct. Then add the next module and repeat. There are a bunch of errors which leads me to believe that you added everything at once. Really, that’s the best way to do it and you learn the process at the same time. If an entry fails then you know where the problem is because you’re saving the config after each successful addition.

      Create a working config
      How to add modules

      1 Reply Last reply Reply Quote 1
      • D Offline
        dcarls91
        last edited by Feb 2, 2019, 2:13 AM

        Thank you, I’ll try that. I’m honestly in over my head i believe, but I’m gonna keep working on it.

        M C 2 Replies Last reply Feb 2, 2019, 2:14 AM Reply Quote 0
        • M Offline
          Mykle1 Project Sponsor Module Developer @dcarls91
          last edited by Feb 2, 2019, 2:14 AM

          @dcarls91

          You’ll be fine. :thumbsup:

          https://forum.magicmirror.builders/topic/4231/how-to-add-modules-for-absolute-beginners

          Create a working config
          How to add modules

          1 Reply Last reply Reply Quote 1
          • D Offline
            dcarls91
            last edited by Feb 2, 2019, 2:31 AM

            Thank you for the help

            M 1 Reply Last reply Feb 2, 2019, 2:56 AM Reply Quote 0
            • M Offline
              Mykle1 Project Sponsor Module Developer @dcarls91
              last edited by Feb 2, 2019, 2:56 AM

              @dcarls91

              You’re welcome. If you have trouble adding one module, by all means, come back here and ask for help. Troubleshooting the addition of one module is a whole lot easier than troubleshooting your entire config. So, start with the default config and try adding a single module. Keep me posted

              Create a working config
              How to add modules

              1 Reply Last reply Reply Quote 0
              • C Offline
                cowboysdude Module Developer @dcarls91
                last edited by Feb 2, 2019, 2:59 AM

                @dcarls91 said in I am stuck need help:

                Thank you, I’ll try that. I’m honestly in over my head i believe, but I’m gonna keep working on it.

                We all were in the beginning…hang in there it’ll get easier for you :)

                1 Reply Last reply Reply Quote 0
                • R Offline
                  robiv8
                  last edited by Feb 2, 2019, 8:38 AM

                  @dcarls91 said in I am stuck need help:

                  In your config fil are missing a lot of , and ]
                  check this

                  1 Reply Last reply Reply Quote 0
                  • B Offline
                    BKeyport Module Developer
                    last edited by Feb 2, 2019, 8:51 AM

                    One of the best commands to know is

                     npm run config:check
                    

                    Start at the topmost error and work your way down the file - it’s got lots of problems, but is easily fixed. Also, I highly recommend a graphical type editor if possible - Geany is what I use.

                    I installed samba on my magic mirror so I can edit with the PC version of Geany and save it right to the Pi. It’s great.

                    The "E" in "Javascript" stands for "Easy"

                    1 Reply Last reply Reply Quote 2
                    • Y Offline
                      yawns Moderator
                      last edited by Feb 2, 2019, 8:09 PM

                      var config = {
                      	address: "localhost", // Address to listen on, can be:
                      	                      // - "localhost", "127.0.0.1", "::1" 
                      	                      // - another specific IPv4/6 
                      	                      // - "", "0.0.0.0", "::" 
                      	                      // 
                      	port: 8080,
                      	ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], 
                      	
                              language: "en",
                      	timeFormat: 24,
                      	units: "imperial",
                      
                      	modules: [
                      		  {
                      			module: "alert",
                      		  },
                      		  {
                      			module: "updatenotification",
                      			position: "top_bar",
                      		  },
                      		  {
                      			module: "clock",
                      			position: "top_left",
                      		  },
                      		  {
                      		 	module: "calendar",
                      			header: "Calendar",
                      			position: "top_left",
                      			config: {
                      				calendars: [
                      					{
                      						symbol: "calendar-check",
                      						url: "webcal://www.calendarlabs.com/templates/ical/US-Holidays.ics"
                      					
                      				         },
                                                               {
                      
                      						symbol: "calendar-plus-o ",
                      						url: "https://calendar.google.com/XXXXXXXXX/basic.ics"
                      					},
                      					{
                      						symbol: "calendar-plus-o ",
                      						url: "https://calendar.google.com/XXXXXXX/basic.ics"
                      				}	
                      				]
                            }
                      			
                      		  },
                      		  {
                      			module: "helloworld",
                      		        position: "top_bar",
                      		        config: {
                      			         
                      			         text: "Welcome to the Carls Residence"
                      			        } 
                      		  },
                      		  {
                      			
                                               module: "MMM-DarkSkyForecast",
                                               header: "Weather",
                                               position: "top_right",
                                               classes: "default everyone",
                                               disabled: false,
                                               config: {
                                                        apikey: "Xxxxxxxxxxdda4d069a",
                                                        latitude: "39.548935",
                                                        longitude: "-89.294533",      
                                                        iconset: "4c",
                                                        concise: false,
                                                        forecastLayout: "table"
                                                       }
                      			
                      		  },
                      		  {
                      			 module: "MMM-MyScoreboard",
                                               position: "bottom_left",
                                               classes: "default everyone",
                                               header: "My Scoreboard",
                                               config: {
                                                        showLeagueSeparators: true,
                                                        colored: true,
                                                        viewStyle: "mediumLogos",
                                                           sports: [
                                                                    {
                                                                     league: "NHL",
                                                                     groups: ["Western"]
                                                                    },
                                                                    {
                                                                     league: "NFL",
                                                                     groups: ["NFC North"]
                                                                    },
                                                                    {
                                                                     league: "MLB",
                                                                     groups: ["NL Central"]
                                                                   },
                                                                   {
                                                                    league: "NCAAM",
                                                                    groups: ["Big Ten"]
                                                                   },
                                                                   {
                                                                    league: "NCAAF",
                                                                    groups: ["Big Ten"]
                                                                   }
                                                             ]
                                                        }
                      		  },
                      		  {
                      		
                      
                      		       module: 'MMM-iFrame-Ping',
                      		       position: 'bottom_left',	
                      		       config: {
                      			        // See 'Configuration options' for more information.
                      			        url: "https://radar.weather.gov/radar.php?rid=ILX&product=NCR&overlay=11101111&loop=yes", 
                      			        autoRefresh: true, 
                      			        updateInterval: 10, 
                      			        displayLastUpdate: true,
                      			        width: "100%", 
                      			        height: "400px", 
                      			       scrolling: "no" 
                      			}
                      	           },
                                         {
                                    
                      
                      
                                      	module: "newsfeed",
                      			position: "bottom_bar",
                      			config: {
                      				 feeds: [
                      					{
                      						title: "Fox News",
                      						url: "http://feeds.foxnews.com/foxnews/latest"
                      					}
                      				 ],
                      				  showSourceTitle: true,
                      				  showPublishDate: true
                      			        }
                      		 },
                      	   ]
                      
                      };
                      
                      
                      if (typeof module !== "undefined") {module.exports = config;}
                      

                      You missed some ,, some ] and some }
                      Oh, and you should never post your apikeys or links to personal calendars. I truncated both for you

                      D N 2 Replies Last reply Feb 3, 2019, 12:10 AM Reply Quote 3
                      • 1
                      • 2
                      • 3
                      • 1 / 3
                      1 / 3
                      • First post
                        2/25
                        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