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.

    config

    Scheduled Pinned Locked Moved Solved Troubleshooting
    57 Posts 9 Posters 27.5k Views 7 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.
    • FoziF Offline
      Fozi Project Sponsor
      last edited by

      I‘m 100% sure you have a syntax error in your config, very likely a missing comma or a bracket. The error message is some what misleading. Post your config and we‘ll look on it.

      HowTo: Replace PIR Sensor with a RCWL-0516 Microwave Sensor

      S G 2 Replies Last reply Reply Quote 0
      • S Do not disturb
        sdetweil @Fozi
        last edited by

        @Fozi @geo
        do

        cd ~/MagicMirror
        npm run config:check
        

        fix each error, starting from the top, make one change, rerun
        the error is usually reported on the line AFTER the problem

        unexpected token is usually a missing comma on the line before, or missing matched quotes

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • G Offline
          geo @Fozi
          last edited by

          @Fozi hi i am now really embarassed,how do i post tme config.
          i should explain i thought the mirror would be a great project but did not realise ,for me, how complicated it was.
          cheers
          geo

          1 Reply Last reply Reply Quote 0
          • B Offline
            BD0G
            last edited by

            Stick with it! Its a great learning experience. Just take your time and dont rush.

            Here is how you post your config entries.

            Open the MagicMirror/config/config.js file in a text editor. Highlight the entries in the config file. CTRL-C or copy command. Then come back to the forum and start a reply post. When you want to paste your code click on the little </> icon above the post. You will see a notification in the posting then that reads Code Here. Highlight that Code Here and choose CTRL-V or paste command. That will paste the code. Choose Submit! Done.

            1 Reply Last reply Reply Quote 0
            • G Offline
              geo
              last edited by

              code_text
              ```/* Magic Mirror Config Sample
               *
               * By Michael Teeuw http://michaelteeuw.nl
               * MIT Licensed.
               *
               * For more information how you can configurate this file
               * See https://github.com/MichMich/MagicMirror#configuration
               *
               */
              
              var config = {
              	address: "localhost", // Address to listen on, can be:
              	                      // - "localhost", "127.0.0.1", "::1" to listen on loopback interface
              	                      // - another specific IPv4/6 to listen on a specific interface
              	                      // - "", "0.0.0.0", "::" to listen on any interface
              	                      // Default, when address config is left out, is "localhost"
              	port: 8080,
              	ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], // Set [] to allow all IP addresses
              	                                                       // or add a specific IPv4 of 192.168.1.5 :
              	                                                       // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"],
              	                                                       // or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format :
              	                                                       // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"],
              
              	language: "en",
              	timeFormat: 24,
              	units: "metric",
              
              	modules: [
              		{
              			module: "alert",
              		},
              		{
              			module: "updatenotification",
              			position: "top_bar"
              		},
              		{
              			module: "clock",
              			position: "top_left"
              		},
              		{
              			module: "calendar",
              			header: "GB Holidays",
              			position: "top_left",
              			config: {
              				calendars: [
              					{
              						symbol: "calendar-check",
              						url: "webcal://www.calendar/embed?src=en.uk%23holiday%40group.v.calendar.google.com"					}
              				]
              			}
              		},
              		{
              			module: "compliments",
              			position: "lower_third"
              		},
              		{
              			module: "currentweather",
              			position: "top_right",
              			config: 
              				location: "",
              				locationID: "53.9576",  //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
              				appid: "76b503a29647f3a01dd9ba1055daea6d",
              			}
              		},
              		{
              			module: "weatherforecast",
              			position: "top_right",
              			header: "Weather Forecast",
              			config: {
              				location: "",
              				
              				,
              				locationID: "53.9576",  //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
              				appid: "76b503a29647f3a01dd9ba1055daea6d",
              			}
              		},
              		{
              			module: "newsfeed",
              			position: "bottom_bar",
              			config: {
              				feeds: [
              					{
              						title:  "BBC",
              						url: "http://WWW.BBC.com/services/xml/rss/bbc/HomePage.xml",
              					}
              				],
              				showSourceTitle: true,
              				
              				showPublishDate: true,
              				broadcastNewsFeeds: false,
              				broadcastNewsUpdates: true,
              			}
              		},
              	]
              
              };
              
              /*************** DO NOT EDIT THE LINE BELOW ***************/
              if (typeof module !== "undefined") {module.exports = config;}
              brobergB S 2 Replies Last reply Reply Quote 0
              • brobergB Offline
                broberg Project Sponsor @geo
                last edited by

                you were missing a { after config: under the module currentweather

                and also one to many , under the module weatherforecast

                Corrected code :

                		{
                			module: "currentweather",
                			position: "top_right",
                			config: {   
                				location: "",
                				locationID: "53.9576",  //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
                				appid: "76b503a29647f3a01dd9ba1055daea6d",
                			}
                		},
                		{
                			module: "weatherforecast",
                			position: "top_right",
                			header: "Weather Forecast",
                			config: {
                				location: "",
                				locationID: "53.9576",  //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
                				appid: "76b503a29647f3a01dd9ba1055daea6d",
                			}
                		},
                
                
                
                1 Reply Last reply Reply Quote 1
                • S Do not disturb
                  sdetweil @geo
                  last edited by sdetweil

                  @geo said in config:

                    {
                    	module: "currentweather",
                    	position: "top_right",
                    	config: 
                    		location: "",
                    		locationID: "53.9576",  //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
                    		appid: "76b503a29647f3a01dd9ba1055daea6d",
                    	}
                    },
                  

                  should be

                  		{
                  			module: "currentweather",
                  			position: "top_right",
                  			config:  {    // < ---- missing open brace
                  				location: "",
                  				locationID: "53.9576",  //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
                  				appid: "76b503a29647f3a01dd9ba1055daea6d",
                  			}
                  		},
                  

                  this

                  		{
                  			module: "weatherforecast",
                  			position: "top_right",
                  			header: "Weather Forecast",
                  			config: {
                  				location: "",
                  				
                  				,
                  				locationID: "53.9576",  //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
                  				appid: "76b503a29647f3a01dd9ba1055daea6d",
                  			}
                  		}
                  

                  should be

                  		{
                  			module: "weatherforecast",
                  			position: "top_right",
                  			header: "Weather Forecast",
                  			config: {
                  				location: "",
                  				
                  				//,   < ---  remove extra comma
                  				locationID: "53.9576",  //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
                  				appid: "76b503a29647f3a01dd9ba1055daea6d",
                  			}
                  		}
                  

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  1 Reply Last reply Reply Quote 1
                  • G Offline
                    geo
                    last edited by

                    hi and thx again.still no joy and i have poated the latest config```
                    code_text

                     *
                     * By Michael Teeuw http://michaelteeuw.nl
                     * MIT Licensed.
                     *
                     * For more information how you can configurate this file
                     * See https://github.com/MichMich/MagicMirror#configuration
                     *
                     */
                    
                    var config = {
                    	address: "localhost", // Address to listen on, can be:
                    	                      // - "localhost", "127.0.0.1", "::1" to listen on loopback interface
                    	                      // - another specific IPv4/6 to listen on a specific interface
                    	                      // - "", "0.0.0.0", "::" to listen on any interface
                    	                      // Default, when address config is left out, is "localhost"
                    	port: 8080,
                    	ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], // Set [] to allow all IP addresses
                    	                                                       // or add a specific IPv4 of 192.168.1.5 :
                    	                                                       // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"],
                    	                                                       // or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format :
                    	                                                       // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"],
                    
                    	language: "en",
                    	timeFormat: 24,
                    	units: "metric",
                    
                    	modules: [
                    		{
                    			module: "alert",
                    		},
                    		{
                    			module: "updatenotification",
                    			position: "top_bar"
                    		},
                    		{
                    			module: "clock",
                    			position: "top_left"
                    		},
                    		{
                    			module: "calendar",
                    			header: "GB Holidays",
                    			position: "top_left",
                    			config: {
                    				calendars: [
                    					{
                    						symbol: "calendar-check",
                    						url: "webcal://www.calendar/embed?src=en.uk%23holiday%40group.v.calendar.google.com"					}
                    				]
                    			}
                    		},
                    		{
                    			module: "compliments",
                    			position: "lower_third"
                    		},
                    		{
                    			module: "currentweather",
                    			position: "top_right",
                    			config:  {     
                    				location: "",
                    				locationID: "53.9576",  //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
                    				appid: "76b503a29647f3a01dd9ba1055daea6d",
                    			}
                    		},
                    		{
                    			module: "weatherforecast",
                    			position: "top_right",
                    			header: "Weather Forecast",
                    			config: {
                    				location: "",
                    				
                    				
                    				locationID: "53.9576",  //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
                    				appid: "76b503a29647f3a01dd9ba1055daea6d",
                    			}
                    		}
                    		{
                    			module: "newsfeed",
                    			position: "bottom_bar",
                    			config:
                    				feeds: [
                    					{
                    						title:  "BBC",
                    						url: "http://WWW.BBC.com/services/xml/rss/bbc/HomePage.xml",
                    					}
                    				],
                    				showSourceTitle: true,
                    				
                    				showPublishDate: true,
                    				broadcastNewsFeeds: false,
                    				broadcastNewsUpdates: true,
                    			}
                    		},
                    	]
                    
                    };
                    
                    /*************** DO NOT EDIT THE LINE BELOW ***************/
                    if (typeof module !== "undefined") {module.exports = config;}
                    S L 2 Replies Last reply Reply Quote 0
                    • S Do not disturb
                      sdetweil @geo
                      last edited by

                      @geo missing the /* as the 1st line

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      S 1 Reply Last reply Reply Quote 0
                      • S Do not disturb
                        sdetweil @sdetweil
                        last edited by sdetweil

                        @geo here is the fixed up config

                        run thru npm run config:check til no errors

                        missing comma and open {

                        /*
                         *
                         * By Michael Teeuw http://michaelteeuw.nl
                         * MIT Licensed.
                         *
                         * For more information how you can configurate this file
                         * See https://github.com/MichMich/MagicMirror#configuration
                         *
                         */
                        
                        var config = {
                        	address: "localhost", // Address to listen on, can be:
                        	                      // - "localhost", "127.0.0.1", "::1" to listen on loopback interface
                        	                      // - another specific IPv4/6 to listen on a specific interface
                        	                      // - "", "0.0.0.0", "::" to listen on any interface
                        	                      // Default, when address config is left out, is "localhost"
                        	port: 8080,
                        	ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], // Set [] to allow all IP addresses
                        	                                                       // or add a specific IPv4 of 192.168.1.5 :
                        	                                                       // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"],
                        	                                                       // or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format :
                        	                                                       // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"],
                        
                        	language: "en",
                        	timeFormat: 24,
                        	units: "metric",
                        
                        	modules: [
                        		{
                        			module: "alert",
                        		},
                        		{
                        			module: "updatenotification",
                        			position: "top_bar"
                        		},
                        		{
                        			module: "clock",
                        			position: "top_left"
                        		},
                        		{
                        			module: "calendar",
                        			header: "GB Holidays",
                        			position: "top_left",
                        			config: {
                        				calendars: [
                        					{
                        						symbol: "calendar-check",
                        						url: "webcal://www.calendar/embed?src=en.uk%23holiday%40group.v.calendar.google.com"					}
                        				]
                        			}
                        		},
                        		{
                        			module: "compliments",
                        			position: "lower_third"
                        		},
                        		{
                        			module: "currentweather",
                        			position: "top_right",
                        			config:  {     
                        				location: "",
                        				locationID: "53.9576",  //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
                        				appid: "76b503a29647f3a01dd9ba1055daea6d",
                        			}
                        		},
                        		{
                        			module: "weatherforecast",
                        			position: "top_right",
                        			header: "Weather Forecast",
                        			config: {
                        				location: "",
                        				
                        				
                        				locationID: "53.9576",  //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
                        				appid: "76b503a29647f3a01dd9ba1055daea6d",
                        			}
                        		},
                        		{
                        			module: "newsfeed",
                        			position: "bottom_bar",
                        			config: {
                        				feeds: [
                        					{
                        						title:  "BBC",
                        						url: "http://WWW.BBC.com/services/xml/rss/bbc/HomePage.xml",
                        					}
                        				],
                        				showSourceTitle: true,
                        				
                        				showPublishDate: true,
                        				broadcastNewsFeeds: false,
                        				broadcastNewsUpdates: true,
                        			}
                        		},
                        	]
                        
                        };
                        
                        /*************** DO NOT EDIT THE LINE BELOW ***************/
                        if (typeof module !== "undefined") {module.exports = config;}
                        

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

                        G 2 Replies Last reply Reply Quote 0
                        • G Offline
                          geo
                          last edited by

                          
                          
                          
                          
                           
                          
                          npm ERR! A complete log of this run can be found in:
                          npm ERR!     /home/pi/.npm/_logs/2019-11-16T14_09_4
                          code_text
                          ``
                          
                          
                          
                          
                          S 1 Reply Last reply Reply Quote 0
                          • S Do not disturb
                            sdetweil @geo
                            last edited by

                            @geo needs to be done from inside the MagicMirror folder…

                            Sam

                            How to add modules

                            learning how to use browser developers window for css changes

                            1 Reply Last reply Reply Quote 0
                            • G Offline
                              geo @sdetweil
                              last edited by

                              @sdetweil hi after another attempt i find the config is empty all that is available is the sample

                              S G 2 Replies Last reply Reply Quote 0
                              • S Do not disturb
                                sdetweil @geo
                                last edited by

                                @geo i posted the corrected config.js above, cut/paste it back into the ~/MagicMiror/config/config.js file

                                Sam

                                How to add modules

                                learning how to use browser developers window for css changes

                                1 Reply Last reply Reply Quote 0
                                • G Offline
                                  geo @geo
                                  last edited by

                                  @geo would it be better to delete and re install

                                  S 1 Reply Last reply Reply Quote 0
                                  • S Do not disturb
                                    sdetweil @geo
                                    last edited by

                                    @geo no… just missing the config file…
                                    select the text in my post above, right click mouse, select copy,
                                    then open an editor on the file and right click mouse paste

                                    i use ssh and BitVise ssh client so I can access and edit files thru my windows machine

                                    Sam

                                    How to add modules

                                    learning how to use browser developers window for css changes

                                    G 1 Reply Last reply Reply Quote 0
                                    • G Offline
                                      geo @sdetweil
                                      last edited by

                                      @sdetweil hi sorry but i am stuck config.js is empty and cant find text editor

                                      S 1 Reply Last reply Reply Quote 0
                                      • S Do not disturb
                                        sdetweil @geo
                                        last edited by sdetweil

                                        @geo nano is a text editor

                                        you can also do

                                        cp config.js.sample config.js
                                        

                                        to copy the initial

                                        Sam

                                        How to add modules

                                        learning how to use browser developers window for css changes

                                        1 Reply Last reply Reply Quote 0
                                        • G Offline
                                          geo
                                          last edited by

                                          totally totally out of my depth and do not understand why my config.js is empty and why the text editor is missing.sorry

                                          1 Reply Last reply Reply Quote 0
                                          • G Offline
                                            geo @sdetweil
                                            last edited by

                                            @sdetweil hi i think i am back on track.you say to cut,is that the same as copy,because when i right click on your config all i see is copy.cheers

                                            S 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
                                            • 1 / 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