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.

    Third Party Modules Don't Work Please Help

    Scheduled Pinned Locked Moved Troubleshooting
    21 Posts 5 Posters 9.5k Views 4 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.
    • Z Offline
      zzaidi148
      last edited by

      Hello all,
      I’m a total noob to coding and magicmirror. I’ve got my mm working perfectly with the default modules. but for some reason when I add 3rd party modules, it all fails and says your config doesnt work. I download the module into MagicMirror/modules and not in default. I also added the config to config.js in every place imaginable and never got it to work. Please, if you can help, speel it out to me because I’m a total noob! My config is below. I tried it with many modules besides this google maps one that is at the bottom. The same result occured.

      //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: 12,
      	units: "imperial",
      
      	modules: [
      		{
      			module: "alert",
      		},
      		{
      			module: "updatenotification",
      			position: "top_bar"
      		},
      		{
      			module: "clock",
      			position: "top_left"
      		},
      		{
      			module: "calendar",
      			header: "US Holidays",
      			position: "top_left",
      			config: {
      				calendars: [
      					{
      						symbol: "calendar-check-o ",
      						url: "webcal://www.calendarlabs.com/templates/ical/US-Holidays.ics"
      					}
      				]
      			}
      		},
      		{
      			module: "compliments",
      			position: "lower_third"
      		},
      		{
      			module: "currentweather",
      			position: "top_right",
      			config: {
      				location: "Dallas",
      				locationID: "4684888",  //ID from http://www.openweathermap.org/help/city_list.txt
      				appid: "private"
      			}
      		},
      		{
      			module: "weatherforecast",
      			position: "top_right",
      			header: "Weather Forecast",
      			config: {
      				location: "Dallas",
      				locationID: "4684888",  //ID from http://www.openweathermap.org/help/city_list.txt
      				appid: "private"
      			}
      		},
      		{
      			module: "newsfeed",
      			position: "bottom_bar",
      			config: {
      				feeds: [
      					{
      						title: "New York Times",
      						url: "http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml"
      					}
      				],
      				showSourceTitle: true,
      				showPublishDate: true
      			}
      		},
      	]
      
      };
      var config = {
          modules: [
              {
                  module: 'MMM-GoogleMapsTraffic',
                  config: {
                      key: 'YOUR_KEY',
                      lat: 37.8262306,
                      lng: -122.2920096,
                      height: '300px',
                      width: '300px'
                  }
              }
          ]
      }
      
      	
      
      /*************** DO NOT EDIT THE LINE BELOW ***************/
      if (typeof module !== "undefined") {module.exports = config;}
      
      
      1 Reply Last reply Reply Quote 0
      • cowboysdudeC Offline
        cowboysdude Module Developer
        last edited by

        @zzaidi148 said in Third Party Modules Don’t Work Please Help:

        //var config

        should be

        var config take the // away

        1 Reply Last reply Reply Quote 0
        • Mykle1M Offline
          Mykle1 Project Sponsor Module Developer
          last edited by

          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
          • cowboysdudeC Offline
            cowboysdude Module Developer
            last edited by cowboysdude

            Rule of thumb for new guys/gals…

            Add one module at a time… if your config works then back it up before adding something else that way you have a working config… always :)

            Z 1 Reply Last reply Reply Quote 3
            • B Offline
              Bob
              last edited by Bob

              remove the second instance of

              var config = (
              module : [

              ]
              }

              at the bottom of the file

              1 Reply Last reply Reply Quote 2
              • Z Offline
                zzaidi148 @cowboysdude
                last edited by

                @cowboysdude I tried with only one module and it failed

                cowboysdudeC Mykle1M 2 Replies Last reply Reply Quote 0
                • cowboysdudeC Offline
                  cowboysdude Module Developer @zzaidi148
                  last edited by

                  @zzaidi148 It’s okay it’s how we learn :) We’ve all been there… if you try to get one module working and it doesn’t then post what you’ve done so we can help you…

                  We don’t mind … like I said we ALL had to learn and there is no such thing as a stupid question ever. I personally don’t care if you have to ask the same question 1000 times… I or someone else will answer you.

                  My education is in Education :) Just remember… whatever question you ask someone else may benefit from it too!

                  Z 2 Replies Last reply Reply Quote 0
                  • Mykle1M Offline
                    Mykle1 Project Sponsor Module Developer @zzaidi148
                    last edited by

                    @zzaidi148 said in Third Party Modules Don’t Work Please Help:

                    I tried with only one module and it failed

                    Your default config works, yes?

                    Create a working config
                    How to add modules

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

                      Ho hum, I got bored, so…

                      @zzaidi148 here you go, below is your working code.

                      As was said above, you needed to remove the // from var config, and the extra config section at the end. I also tidied up the code (putting spaces between modules to make them easier to read), and added some extra commas (because I tend to anyway) . You just need to replace the API keys with the correct ones and the code below will work.

                      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: 12,
                      	units: "imperial",
                      
                      	modules: [
                      	
                      		{
                      			module: "alert",
                      		},
                      
                      		{
                      			module: "updatenotification",
                      			position: "top_bar",
                      		},
                      
                      		{
                      			module: "clock",
                      			position: "top_left",
                      		},
                      
                      		{
                      			module: "calendar",
                      			header: "US Holidays",
                      			position: "top_left",
                      			config: {
                      				calendars: [
                      					{
                      						symbol: "calendar-check-o",
                      						url: "webcal://www.calendarlabs.com/templates/ical/US-Holidays.ics",
                      					}
                      				]
                      			}
                      		},
                      		
                      		{
                      			module: "compliments",
                      			position: "lower_third",
                      		},
                      		
                      		{
                      			module: "currentweather",
                      			position: "top_right",
                      			config: {
                      				location: "Dallas",
                      				locationID: "4684888",  //ID from http://www.openweathermap.org/help/city_list.txt
                      				appid: "private",
                      			}
                      		},
                      		
                      		{
                      			module: "weatherforecast",
                      			position: "top_right",
                      			header: "Weather Forecast",
                      			config: {
                      				location: "Dallas",
                      				locationID: "4684888",  //ID from http://www.openweathermap.org/help/city_list.txt
                      				appid: "private",
                      			}
                      		},
                      		
                      		{
                      			module: "newsfeed",
                      			position: "bottom_bar",
                      			config: {
                      				feeds: [
                      					{
                      						title: "New York Times",
                      						url: "http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml"
                      					}
                      				],
                      				showSourceTitle: true,
                      				showPublishDate: true
                      			}
                      		},
                              
                              {
                                  module: 'MMM-GoogleMapsTraffic',
                                  config: {
                                      key: 'YOUR_KEY',
                                      lat: 37.8262306,
                                      lng: -122.2920096,
                                      height: '300px',
                                      width: '300px',
                                  },
                              },
                      
                      	]
                      };
                      
                      /*************** DO NOT EDIT THE LINE BELOW ***************/
                      if (typeof module !== "undefined") {module.exports = config;}
                      
                      Z 1 Reply Last reply Reply Quote 0
                      • Z Offline
                        zzaidi148 @Mykle1
                        last edited by

                        @Mykle1 yes

                        1 Reply Last reply Reply Quote 0
                        • 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