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.

    Are you tired of editing config.js, or have trouble doing it, see my new module

    Scheduled Pinned Locked Moved Utilities
    293 Posts 28 Posters 399.9k Views 31 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.
    • BKeyportB Offline
      BKeyport Module Developer
      last edited by

      So, I’m getting the header and nothing else.

      310e0ba5-a44c-4045-9bc2-861d161a8f96-image.png

      fresh install of MagicMirror using the script, PM2. Here’s my config, as you can see, the only changes are the listening address, the ipWhitelist, and the addition of the module as shown in the readme.

      modules I installed (but didn’t configure for testing) were MMM-Config, MMM-Multimonth, and MMM-OpenWeatherForecast.

      var config = {
              address: "0.0.0.0",     // Address to listen on, can be:
              port: 8080,
              basePath: "/",  // The URL path where MagicMirror is hosted. If you are using a Reverse proxy
              ipWhitelist: [],        // Set [] to allow all IP addresses
              useHttps: false,                // Support HTTPS or not, default "false" will use HTTP
              httpsPrivateKey: "",    // HTTPS private key path, only require when useHttps is true
              httpsCertificate: "",   // HTTPS Certificate path, only require when useHttps is true
              language: "en",
              locale: "en-US",
              logLevel: ["INFO", "LOG", "WARN", "ERROR"], // Add "DEBUG" for even more logging
              timeFormat: 24,
              units: "metric",
              // serverOnly:  true/false/"local" ,
              // local for armv6l processors, default
              //   starts serveronly and then starts chrome browser
              // false, default for all NON-armv6l devices
              // true, force serveronly mode, because you want to.. no UI on this device
      
              modules: [
              {
                      module:"MMM-Config",
                      position:"top_right",  // the QR code (if requested) will appear here
                      config:{
      
                      }
              },
      ... (no changes after this point) 
      

      The "E" in "Javascript" stands for "Easy"

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

        @bkeyport if u open the developers window, ctrl-shift-i, and select the console tab. are there errors shown

        also if u look in the pm2 logs, are there problems.

        do a
        git checkout newform
        and try again. lots of fixes there

        the latest code requires a port number to be passed to the form page… use the review link

        http://mm_ip:mm_port/modules/MMM-Config/review
        (thats the url on the qr image)

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        BKeyportB 1 Reply Last reply Reply Quote 0
        • BKeyportB Offline
          BKeyport Module Developer @sdetweil
          last edited by

          @sdetweil

          Failed to load resource (Connection refused) http://IP:8200/socket.io/?EIO=4&transport=polling&t=NchkO1_

          DevTools failed to load SourceMap: Could not load content for http://IP:8080/modules/MMM-Config/node_modules/jsonform/deps/opt/bootstrap.css.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE

          Then repeated
          (anonymous) @ VM6:1
          create @ polling-xhr.js:198
          Request @ polling-xhr.js:115
          request @ polling-xhr.js:62
          doPoll @ polling-xhr.js:90
          poll @ polling.js:74
          doOpen @ polling.js:23
          open @ transport.js:44
          open @ socket.js:194
          Socket @ socket.js:119
          ./node_modules/engine.io-client/lib/index.js.module.exports @ index.js:3
          open @ manager.js:112
          (anonymous) @ manager.js:342
          VM6:1 GET http://IP:8200/socket.io/?EIO=4&transport=polling&t=NchkPo7 net::ERR_CONNECTION_REFUSED

          The "E" in "Javascript" stands for "Easy"

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

            @bkeyport did u use the review link, its probably port 8300 now

            see the instructions here

            https://github.com/sdetweil/MMM-Config/issues/8

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            BKeyportB 1 Reply Last reply Reply Quote 0
            • BKeyportB Offline
              BKeyport Module Developer @sdetweil
              last edited by BKeyport

              @sdetweil review link as shown redirects to:

              http://raspberrypi:8080/modules/MMM-Config/config.html?port=8301

              which fails because it’s not in DNS - changing raspberrypi to my IP address results in same header as before. Did update newform, and restarted MM.

              The "E" in "Javascript" stands for "Easy"

              S 3 Replies Last reply Reply Quote 0
              • S Offline
                sdetweil @BKeyport
                last edited by

                @bkeyport i have cors allow all …

                Sam

                How to add modules

                learning how to use browser developers window for css changes

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

                  @bkeyport I asked the machine for its IP address /name…

                  most routers now -a-days register the DHCP requests to names…

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  BKeyportB 1 Reply Last reply Reply Quote 0
                  • BKeyportB Offline
                    BKeyport Module Developer @sdetweil
                    last edited by

                    Yeah, my router setup is stupid in my testing area. :)

                    The "E" in "Javascript" stands for "Easy"

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

                      @bkeyport and npm install after checkout newform?

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      BKeyportB 1 Reply Last reply Reply Quote 0
                      • BKeyportB Offline
                        BKeyport Module Developer @sdetweil
                        last edited by

                        @sdetweil Yeah, that did it… Forgot to npm install. D’oh!

                        The "E" in "Javascript" stands for "Easy"

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

                          @bkeyport I construct the review url like this

                                // thi is the name in the preferences pi
                                this.hostname = os.hostname();
                          
                                this.config.url =
                                  "http://" +
                                  (this.config.address == "0.0.0.0"
                                    ? this.hostname
                                    : this.config.address) +
                                  ":" +
                                  this.config.port;
                          

                          so, lacking the dns entry, I would configure to use one of the specific ip addresses

                          Sam

                          How to add modules

                          learning how to use browser developers window for css changes

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

                            @bkeyport

                            @bkeyport said in Are you tired of editing config.js, or have trouble doing it, see my new module:

                            Yeah, that did it…

                            does that mean you system is working now?

                            Sam

                            How to add modules

                            learning how to use browser developers window for css changes

                            BKeyportB 1 Reply Last reply Reply Quote 0
                            • BKeyportB Offline
                              BKeyport Module Developer @sdetweil
                              last edited by

                              @sdetweil Yeah. playing with it now making sure it works with my module and modules I’ve taken up support for.

                              The "E" in "Javascript" stands for "Easy"

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

                                @bkeyport cool… there are SO many variations… and guesses to make…

                                the upcoming multi-module version, will add on a new capability…

                                generate a new file that can be used to REALLY describe the parms, and take away any abiguity on my part.

                                I generate it ANYHOW to make the form work… so, its a nit to save it… I’m working thru USING the file, instead of recreating every time…

                                and then the author can tune it, to make selection lists, instead of text fields, etc…
                                optional sets of fields, depending on selection

                                the author packages that file with the module and voila, if its there my module uses it…

                                described here
                                https://github.com/sdetweil/MMM-Config/issues/11

                                Sam

                                How to add modules

                                learning how to use browser developers window for css changes

                                BKeyportB 1 Reply Last reply Reply Quote 0
                                • BKeyportB Offline
                                  BKeyport Module Developer @sdetweil
                                  last edited by

                                  @sdetweil OK, it seems to be horribly broken on my side. From save to save, it’s not keeping the modules in config.js - example, my MMM-Multimonth won’t stay configured.

                                  I can’t disable default modules. (Calendar, which I don’t use due to incompatibility with my agenda provider)

                                  You want the config files to look though and see what’s happening?

                                  The "E" in "Javascript" stands for "Easy"

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

                                    @bkeyport yes please…

                                    Sam

                                    How to add modules

                                    learning how to use browser developers window for css changes

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

                                      I have updated the module now to support multiple instances of the same module,
                                      a little config (adding name to a file) … altho the module will auto detect if multiples are being used NOW, regardless of the file

                                      ALSO, one lacking feature of this solution is being able to get the form exactly right… as the info is missing in the module data…

                                      BUT i am creating the form info ANYHOW, so it can be saved and manually edited to improve the module experience, and I will use THAT instead of constructing the info every time…

                                      this means u can add selection lists, and other features (very easily)
                                      see the two issues for instructions

                                      multi-module
                                      https://github.com/sdetweil/MMM-Config/issues/2

                                      and save and use schema file
                                      https://github.com/sdetweil/MMM-Config/issues/11

                                      Sam

                                      How to add modules

                                      learning how to use browser developers window for css changes

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

                                        @sdetweil said in Are you tired of editing config.js, or have trouble doing it, see my new module:

                                        I have updated the module now to support multiple instances of the same module,

                                        Oh, this is quite a feature, and much appreciated. :thumbsup:

                                        Create a working config
                                        How to add modules

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

                                          if u downloaded to test out multi-module, do another git pull…

                                          I had turned off rename of config.js while I tested save… oops… forgot to turn it back on
                                          corrected now

                                          Sam

                                          How to add modules

                                          learning how to use browser developers window for css changes

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

                                            I have promoted the multi-module version to be the only version…

                                            no need for any git checkout now

                                            Sam

                                            How to add modules

                                            learning how to use browser developers window for css changes

                                            Mykle1M 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
                                            • 4
                                            • 5
                                            • 14
                                            • 15
                                            • 3 / 15
                                            • 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