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.

    Hi very beginners question here.

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    6 Posts 3 Posters 1.3k 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.
    • S Offline
      steveuk
      last edited by

      Hi all.
      I’m very new to magic mirror.
      So I managed to get it running on the basic layout and thought I’d try my first module and with the simple dad jokes one.
      I have the folder showing in the modules folders and then 8 went to the main config.js file to enter the bit of code.

      var config = {
          modules: [
              {
                  module: 'MMM-Dad-Jokes',
                  position: 'bottom_left', // Or wherever you want
                  config: {
                      updateInterval: 60000,
                      fadeSpeed: 4000
                  }
              }
          ]
      }
      

      But it’s not working I’m getting a error when loading saying about not having a valid config file.
      I think I’m copying and pasting it in the wrong part or I’m copying too much of it.
      Could someone break it down for me with what I do with the above code on a fresh config file as I’m not actually sure where to do the curser click when I click paste is it after the last closed bracket ?
      Cheers

      S Mykle1M 2 Replies Last reply Reply Quote 0
      • S Offline
        sdetweil @steveuk
        last edited by sdetweil

        @steveuk it looks good… try running the checker

        npm run check:config
        

        from the MM folder

        u need all that upper stuff too, right?

          address: "", // 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: 8086,
          ipWhitelist: [], // 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",
        

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        S 1 Reply Last reply Reply Quote 0
        • S Offline
          steveuk @sdetweil
          last edited by

          @sdetweil
          Hi thanks the reply yeah I have all the upper parts as normal.
          I deleted the file and tried again with a different module following YouTube and got it to work.
          I noticed some of these instructions on the module installation come with extra bits of text I don’t need to copy and paste in, I think I’m confusing myself with when I need the { } and },
          But like I say I did get a module to show up but in the config I put “bottom_right” but it shows on the top left.
          Thanks again.

          S 1 Reply Last reply Reply Quote 0
          • S Offline
            sdetweil @steveuk
            last edited by sdetweil

            @steveuk a module entry will have at LEAST this

            {
                module: 'module_name',
                position: 'some_region_name',
                config: {
                    // module specific info
                }
            },
            

            see here for the region definitions
            https://forum.magicmirror.builders/topic/286/regions

            Sam

            How to add modules

            learning how to use browser developers window for css changes

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

              @steveuk said in Hi very beginners question here.:

              Could someone break it down for me with what I do with the above code on a fresh config file as I’m not actually sure where to do the curser click when I click paste is it after the last closed bracket ?

              It should look like this. Your entry was missing a comma after the last curly bracket.

              {
                          module: 'MMM-Dad-Jokes',
                          position: 'bottom_left', // Or wherever you want
                          config: {
                              updateInterval: 60000,
                              fadeSpeed: 4000
                          }
                      },
              

              This will help you understand the format of a config entry.

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

              Create a working config
              How to add modules

              S 1 Reply Last reply Reply Quote 1
              • S Offline
                steveuk @Mykle1
                last edited by

                @Mykle1 @sdetweil
                That’s great
                Thanks for the help guys.

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