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

Not sure what doing wrong :( adding modules

Scheduled Pinned Locked Moved Troubleshooting
modulesaddinghelp
6 Posts 4 Posters 2.6k 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.
  • J Offline
    jamietd
    last edited by Mar 8, 2018, 10:39 PM

    HI,

    ALways having trouble adding modules and not sure how to add the config items?> as soon as i seem to do anything i get error no config file

    for instance this is my current one that worked until i added uptime robot and now doesn’t… tried adding a few modules but most of the time end up removing them

    here is my config file if anybody can see whats up?

    thanks in advance :

    
    language: "en",
    	timeFormat: 24,
    	units: "metric",
    
    	modules: [
    		{
    			module: "alert",
    		},
    		{
    			module: "updatenotification",
    			position: "top_bar"
    		},
    		{
    			module: 'uptimerobot',
    			position: 'top_right',
                		config: {
    			useColors: true
    			api_key:'u505342-b40737465f0eada9bb8a',
    		},
    		{
    			module: "clock",
    			position: "top_left"
    		},
    		{
    			module: 'MMM-Globe',
    			position: 'lower_third',
    			config: {
    			style: 'geoColor',
    			imageSize: 400,
    			ownImagePath:'',
    			updateInterval: 10*60*1000
    		}
    },
    		{
    			module: "calendar",
    			header: "UK Holidays",
    			position: "top_left",
    			config: {
    				calendars: [
    					{
    						symbol: "calendar-check-o ",
    						url: "webcal://www.calendarlabs.com/ical-calendar/ics/75/UK_Holidays.ics"
    					}
    				]
    			}
    		},
    		{
    			module: "compliments",
    			position: "lower_third"
    		},
    		{
    			module: "currentweather",
    			position: "top_right",
    			config: {
    				location: "Spain",
    				locationID: "2514169",  //ID from http://www.openweathermap.org/help/city_list.txt
    				appid: "825910983bae6910153f11c5"
    			}
    		},
    		{
    			module: "weatherforecast",
    			position: "top_right",
    			header: "Weather Forecast",
    			config: {
    				location: "UK",
    				locationID: "2514169",  //ID from http://www.openweathermap.org/help/city_list.txt
    				appid: "825910983bae6979766611c5"
    			}
    		},
    		{
    			module: "newsfeed",
    			position: "bottom_bar",
    			config: {
    				feeds: [
    					{
    						title: "BBC UK",
    						url: "http://feeds.bbci.co.uk/news/video_and_audio/news_front_page/rss.xml?edition=uk"
    					}
    				],
    				showSourceTitle: true,
    				showPublishDate: true
    			}
    		},{
    		    module: 'MMM-Hue',
    		    position: 'top_right',
    		    config:{
                    bridgeip: "192.168.1.4",
    		        userid: "V1mkM0KAT2qi2Z0LUIET-UFp47GZpxJyJB1R58j0",
                    colour: true
                }
    		}
    	]
    
    }
    /*************** DO NOT EDIT THE LINE BELOW ***************/
    if (typeof module !== "undefined") {module.exports = config;}
    
    
    
    1 Reply Last reply Reply Quote 0
    • M Offline
      Mykle1 Project Sponsor Module Developer
      last edited by Mykle1 Mar 9, 2018, 1:23 AM Mar 9, 2018, 1:21 AM

      You had a bunch of syntax problems. Missing } , and ;

      You can compare yours to this if you like, but this should work for you.

      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: 'uptimerobot',
      			position: 'top_right',
                  		config: {
      			useColors: true
      			api_key:'u505342-b40737465f0eada9bb8a',
      					}
      		},
      		{
      			module: "clock",
      			position: "top_left"
      		},
      		{
      			module: 'MMM-Globe',
      			position: 'lower_third',
      			config: {
      			style: 'geoColor',
      			imageSize: 400,
      			ownImagePath:'',
      			updateInterval: 10*60*1000
      		}
      		},
      		{
      			module: "calendar",
      			header: "UK Holidays",
      			position: "top_left",
      			config: {
      				calendars: [
      					{
      						symbol: "calendar-check-o ",
      						url: "webcal://www.calendarlabs.com/ical-calendar/ics/75/UK_Holidays.ics"
      					}
      				]
      			}
      		},
      		{
      			module: "compliments",
      			position: "lower_third"
      		},
      		{
      			module: "currentweather",
      			position: "top_right",
      			config: {
      				location: "Spain",
      				locationID: "2514169",  //ID from http://www.openweathermap.org/help/city_list.txt
      				appid: "825910983bae6910153f11c5"
      			}
      		},
      		{
      			module: "weatherforecast",
      			position: "top_right",
      			header: "Weather Forecast",
      			config: {
      				location: "UK",
      				locationID: "2514169",  //ID from http://www.openweathermap.org/help/city_list.txt
      				appid: "825910983bae6979766611c5"
      			}
      		},
      		{
      			module: "newsfeed",
      			position: "bottom_bar",
      			config: {
      				feeds: [
      					{
      						title: "BBC UK",
      						url: "http://feeds.bbci.co.uk/news/video_and_audio/news_front_page/rss.xml?edition=uk"
      					}
      				],
      				showSourceTitle: true,
      				showPublishDate: true
      			}
      		},
      		{
      		    module: 'MMM-Hue',
      		    position: 'top_right',
      		    config:{
                      bridgeip: "192.168.1.4",
      		        userid: "V1mkM0KAT2qi2Z0LUIET-UFp47GZpxJyJB1R58j0",
                      colour: true
                  }
      		},
      	]
      
      };
      /*************** DO NOT EDIT THE LINE BELOW ***************/
      if (typeof module !== "undefined") {module.exports = config;}
      

      For future reference, this should help you add modules.

      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 3
      • P Offline
        pinsdorf Module Developer
        last edited by Mar 9, 2018, 8:01 AM

        One syntax error I spot is in uptimeroot module. The curly bracket of config: is not matched. @Mykle1 writes there is even more which I don’t spot immediately.

          {
          	module: 'uptimerobot',
          	position: 'top_right',
                		config: {
          	useColors: true
          	api_key:'u505342-b40737465f0eada9bb8a',
          },
        

        In such cases it is good to do a syntax check of the config. Please run npm check:config to do so. You’ll get a detailed statement of what is wrong where syntactically. The reference @Mykle1 gives above is a must read. It shows an example of what the syntax check provides you.

        If a syntax check does not solve the issue, I’d comment out all modules but one and start the mirror. Use /* commented out module */ to make multi-line comments. If start-up works, you add the next module and restart. Repeat this until start-up fails which means you’ve found a(!) module that causes the issue. Please note that there might be more than one wrong module.

        If you have the module, copy the desired config elsewhere and redo the module’s configuration with the simplest possible config, which you often find in the ReadMe file of the same module.

        Good hunt.

        cruunnerrC 1 Reply Last reply Mar 10, 2018, 11:07 AM Reply Quote 1
        • cruunnerrC Offline
          cruunnerr @pinsdorf
          last edited by cruunnerr Mar 10, 2018, 11:08 AM Mar 10, 2018, 11:07 AM

          @pinsdorf said in Not sure what doing wrong :( adding modules:

          {
          module: ‘uptimerobot’,
          position: ‘top_right’,
          config: {
          useColors: true
          api_key:‘u505342-b40737465f0eada9bb8a’,
          },

          Missing comma behind the “true”.

          Must look like this:

          {
          		module: 'uptimerobot',
          		position: 'top_right',
                  		config: {
          		useColors: true,
          		api_key:'u505342-b40737465f0eada9bb8a'
          	},
          

          Just a copy/paste failure from Mykle ;)

          M 1 Reply Last reply Mar 10, 2018, 12:55 PM Reply Quote 2
          • M Offline
            Mykle1 Project Sponsor Module Developer @cruunnerr
            last edited by Mar 10, 2018, 12:55 PM

            @cruunnerr said in Not sure what doing wrong :( adding modules:

            Just a copy/paste failure from Mykle ;)

            Nope, I missed that one. Nice catch! :-)

            Create a working config
            How to add modules

            1 Reply Last reply Reply Quote 1
            • J Offline
              jamietd
              last edited by Mar 10, 2018, 4:14 PM

              Wow what a great forum!!
              thanks for the help… really is appreciated :)
              Will try now

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