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.

    Modules won't show up on mirror?

    Scheduled Pinned Locked Moved Troubleshooting
    19 Posts 5 Posters 10.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.
    • B Offline
      bmbaugh
      last edited by

      I am completely new to this, and am building a magic mirror for my girlfriend for Christmas. I have everything done, and have even put Alexa on my pi, but for whatever reason I am having trouble loading the modules and the only ones that are working are the ones that are turned on by default, the messages, holidays, and news feed at the bottom. How do I turn on the other ones, such as clock? I tried adding it to the array in config.js but nothing showed up, any ideas?

      brobergB Mykle1M 2 Replies Last reply Reply Quote 0
      • brobergB Offline
        broberg Project Sponsor @bmbaugh
        last edited by

        @bmbaugh

        Post your config file (without personal api-keys etc) complete here so people can check it to start with. (use the code button in the forum for your config file) the “</>” symbol.

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

          @bmbaugh

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

          Create a working config
          How to add modules

          homebrewH 1 Reply Last reply Reply Quote 1
          • homebrewH Offline
            homebrew @Mykle1
            last edited by

            @Mykle1
            I tried following this and got a config.js error
            I copied my code into Esprima syntax validator and it is giving me an “Unexpected token” error for line 3, which denotes the position specification. Any ideas?

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

              @homebrew

              I wouldn’t know without seeing it, but you’re missing the beginning of your config.js if position: 'top_left', is line 3.

              var config = {
              	address: "localhost", 
              	port: 8080,
              	ipWhitelist: [],
              
              	language: "en",
              	timeFormat: 12,
              	units: "imperial",
              
              	modules: [
              		{
              		    module: 'MMM-voice',
              		    position: 'bottom_bar',
              		    config: {
              			microphone: 2,
              		    }
              		},
              

              Create a working config
              How to add modules

              homebrewH 1 Reply Last reply Reply Quote 1
              • D Offline
                doubleT Module Developer
                last edited by

                @bmbaugh said in Modules won’t show up on mirror?:

                I tried adding it to the array in config.js but nothing showed up, any ideas?

                Every bracket closed correctly? Commas used correctly? I’d also like to see the config.js.
                You can also start the software with npm start dev to have a look at the console, often it tells you what is wrong.

                1 Reply Last reply Reply Quote 0
                • homebrewH Offline
                  homebrew @Mykle1
                  last edited by

                  @Mykle1

                  For some reason when I edited the actual config.js in text editor it worked! (as opposed to editing the document within Terminal)

                  Thank you!!

                  Mykle1M 1 Reply Last reply Reply Quote 1
                  • D Offline
                    doubleT Module Developer
                    last edited by

                    nano? In the terminal, you have to use “sudo nano” to get rights to write to the file.

                    1 Reply Last reply Reply Quote 0
                    • B Offline
                      bmbaugh @broberg
                      last edited by

                      This post is deleted!
                      1 Reply Last reply Reply Quote 0
                      • D Offline
                        doubleT Module Developer
                        last edited by

                        Can you edit that and put the tags for code around it?

                        B 1 Reply Last reply Reply Quote 0
                        • B Offline
                          bmbaugh @doubleT
                          last edited by

                          @doubleT Ill repost it. for whatever reason it was flagged as spam

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

                            /* 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: 12,
                            	units: "imperial",
                            
                            	modules: [
                            		{
                            			module: "clock",
                            			position: "top_left",
                            			
                            	
                            			
                            		},
                            		{
                            			module: "alert",
                            		},
                            		{
                            			module: "updatenotification",
                            			position: "top_center"
                            		},
                            		
                            		{
                            			module: "calendar",
                            			header: "US Holidays",
                            			position: "top_right",
                            			config: {
                            				calendars: [
                            					{
                            						symbol: "calendar-check-o ",
                            						url: "webcal://www.calendarlabs.com/templates/ical/US-Holidays.ics"
                            					}
                            				]
                            			}
                            		},
                            		{
                            			module: "compliments",
                            			position: "lower_third"
                            		},
                            		{
                            			module: "currentweather",
                            			position: "bottom_right",
                            			config: {
                            				location: "New York",
                            				locationID: "",  //ID from http://www.openweathermap.org/help/city_list.txt
                            				appid: "YOUR_OPENWEATHER_API_KEY"
                            			}
                            		},
                            		{
                            			module: "weatherforecast",
                            			position: "top_right",
                            			header: "Weather Forecast",
                            			config: {
                            				location: "New York",
                            				locationID: "5128581",  //ID from http://www.openweathermap.org/help/city_list.txt
                            				appid: "YOUR_OPENWEATHER_API_KEY"
                            			}
                            		},
                            		{
                            			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
                            			}
                            		},
                            	]
                            
                            };
                            
                            /*************** DO NOT EDIT THE LINE BELOW ***************/
                            if (typeof module !== "undefined") {module.exports = config;}
                            
                            
                            1 Reply Last reply Reply Quote 0
                            • D Offline
                              doubleT Module Developer
                              last edited by

                              (and nested objects and arrays). The last property never gets a comma, these are only separators.

                              That’s probably it. The developer console would probably have hinted at that, saying something like the next thing after the comma was expected to be something else.

                              While you’re removing the last comma in the clock module’s settings, also remove the three empty lines that follow.

                              {
                                   module: "clock",
                                   position: "top_left" // no comma
                              },
                              

                              another example:

                              {
                                   module: "clock",
                                   position: "top_left", // comma, because "config" follows
                                   config: {
                                        displayType: "digital" // no comma
                                   } // no comma
                              },
                              
                              B 1 Reply Last reply Reply Quote 0
                              • B Offline
                                bmbaugh @doubleT
                                last edited by

                                @doubleT I’ll be able to look at it tomorrow and let you know if that fixes it

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

                                  @bmbaugh said in Modules won’t show up on mirror?:

                                  I’ll be able to look at it tomorrow and let you know if that fixes it

                                  The config that you posted above works, as is. I just tested it. @doubleT is correct about removing the comma and the spaces but those are not causing the config to fail. Is MM failing to launch? Or you are expecting to see something different? I don’t see where you stated what the problem is.

                                  Create a working config
                                  How to add modules

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

                                    @homebrew said in Modules won’t show up on mirror?:

                                    For some reason when I edited the actual config.js in text editor it worked! (as opposed to editing the document within Terminal)
                                    Thank you!!

                                    You’re welcome, mate. You don’t HAVE to use the terminal to edit all files if you are not familiar or comfortable with its use. I prefer notepad++ for Windows (notepadqq for linux) for editing code. There are others. Find one you like. Makes life a whole lot easier.

                                    Peace!

                                    Create a working config
                                    How to add modules

                                    1 Reply Last reply Reply Quote 0
                                    • B Offline
                                      bmbaugh @Mykle1
                                      last edited by

                                      @Mykle1 my config.js works, but the only modules showing on the MM are Holidays, Compliments, and news feed. I didn’t know how to get other ones (such as clock, weather forecast, etc) to display on the MM. My assumption was that they displayed by default (I did the automatic installation). Since they didn’t, i was unsure on how to get them to display where I wanted them to (like having the clock in the top left). That was my main issue. Since I’m new to this, I didn’t know if there was an extra step I needed to take or if they were disabled for whatever reason. I apologize if I haven’t been clear enough as to what was wrong

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

                                        @bmbaugh

                                        No worries, mate. Clock should have been displayed by default with the other three you mentioned. weather and weatherforecast require you to get an API key. The directions and url should be in the readme file of those modules. If you modified the clock.js file that may account for it not showing. If that is the case, you can D/L the clock module and replace it.

                                        Now, if you want to add 3rd party modules, a good place to learn how to do that is by clicking “How to add modules” in my signature below my post.

                                        Come back if you need help after reading that.

                                        Create a working config
                                        How to add modules

                                        B 1 Reply Last reply Reply Quote 0
                                        • B Offline
                                          bmbaugh @Mykle1
                                          last edited by

                                          @Mykle1 I just now got around to trying everything. I copied and pasted the default .cs files from all the original modules and that seemed to do the trick. All of them are working now the way I want them to. Thanks so much for all your help

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