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.
    • S Do not disturb
      sdetweil @josh45631
      last edited by sdetweil

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

      ipWhitelist: [“127.0.0.1”, “::ffff:127.0.0.1”, “::1”,“192.168.2.5”],

      this means ONLY apps on THIS machine (127.0.0.1 = localhost) are allowed to connect, EVEN if address: is NOT localhost

      1st thing to do is disable whitelist , set to [] (means no ip filtering)
      fix it after u get things working

      also u really want to add

      showQR:true
      in the MMM-Config
      config section

                     {
                             module:"MMM-Config",
                             position:"top_right",  // the QR code (if requested) will appear here
                             config:{
                                    showQR:true 
                           }
                     },
      

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      J 1 Reply Last reply Reply Quote 0
      • J Offline
        josh45631 @sdetweil
        last edited by

        @sdetweil Ok here’s where I am. I think I’ve made the proper changes in the config file.
        Changed address to 0.0.0.0
        Changed ipWhitelist to []
        Added showQR: “true”

        * Magic Mirror Config Sample
         *
         * By Michael Teeuw https://michaelteeuw.nl
         * MIT Licensed.
         *
         * For more information on how you can configure this file
         * see https://docs.magicmirror.builders/getting-started/configuration.html#general
         * and https://docs.magicmirror.builders/modules/configuration.html
         */
        let config = {
                address: "0.0.0.0",     // 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 or empty, is "localhost"
                port: 8080,
                basePath: "/",  // The URL path where MagicMirror is hosted. If you are using a Reverse proxy
                                                // you must set the sub path here. basePath must end with a /
                ipWhitelist: [],        // Set [] to allow all IP addresses
                                                                                                                                // or add a specific IPv4 of 192.168>
                                                                                                                                // ["127.0.0.1", "::ffff:127.0.0.1",>
                                                                                                                                // or IPv4 range of 192.168.3.0 --> >
                                                                                                                                // ["127.0.0.1", "::ffff:127.0.0.1",>
        
                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:{
                                        showQR: "true"
        
                                }
                        },
                        {
                                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",
                                                        url: "webcal://www.calendarlabs.com/ical-calendar/ics/76/US_Holidays.ics"
                                                }
                                        ]
                                }
                        },
                        {
                                module: "compliments",
                                position: "lower_third"
                        },
                        {
                                module: "weather",
                                position: "top_right",
                                config: {
                                        weatherProvider: "openweathermap",
                                        type: "current",
                                        location: "Gallipolis",
                                        locationID: "", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
                                        apiKey: "YOUR_OPENWEATHER_API_KEY"
                                }
                        },
                        {
                                module: "weather",
                                position: "top_right",
                                header: "Weather Forecast",
                                config: {
                                        weatherProvider: "openweathermap",
                                        type: "forecast",
                                        location: "New York",
                                        locationID: "5128581", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your ci>
                                        apiKey: "YOUR_OPENWEATHER_API_KEY"
                                }
                        },
                        {
                                module: "newsfeed",
                                position: "bottom_bar",
                                config: {
                                        feeds: [
                                                {
                                                        title: "New York Times",
                                                        url: "https://rss.nytimes.com/services/xml/rss/nyt/HomePage.xml"
                                                }
                                        ],
                                        showSourceTitle: true,
                                        showPublishDate: true,
                                        broadcastNewsFeeds: true,
                                        broadcastNewsUpdates: true
                                }
                        },
                ]
        };
        
        /*************** DO NOT EDIT THE LINE BELOW ***************/
        if (typeof module !== "undefined") {module.exports = config;}
        
        
        

        The QR code is showing up in the top right of the magic mirror.

        When I try to navigate to
        http://192.168.2.13:8080/modules/MM-Config/review
        all I get is “Cannot GET /modules/MM-Config/review”

        If it helps, this is the terminal output at startup:

        [27.11.2021 23:08.01.269] [LOG]   Starting MagicMirror: v2.17.1
        [27.11.2021 23:08.01.283] [LOG]   Loading config ...
        [27.11.2021 23:08.01.296] [LOG]   Loading module helpers ...
        [27.11.2021 23:08.01.954] [LOG]   Initializing new module helper ...
        [27.11.2021 23:08.01.956] [LOG]   Module helper loaded: MMM-Config
        [27.11.2021 23:08.01.959] [LOG]   No helper found for module: alert.
        [27.11.2021 23:08.01.968] [LOG]   Initializing new module helper ...
        [27.11.2021 23:08.01.969] [LOG]   Module helper loaded: updatenotification
        [27.11.2021 23:08.01.971] [LOG]   No helper found for module: clock.
        [27.11.2021 23:08.02.295] [LOG]   Initializing new module helper ...
        [27.11.2021 23:08.02.296] [LOG]   Module helper loaded: calendar
        [27.11.2021 23:08.02.298] [LOG]   No helper found for module: compliments.
        [27.11.2021 23:08.02.301] [LOG]   No helper found for module: weather.
        [27.11.2021 23:08.02.348] [LOG]   Initializing new module helper ...
        [27.11.2021 23:08.02.349] [LOG]   Module helper loaded: newsfeed
        [27.11.2021 23:08.02.350] [LOG]   All module helpers loaded.
        [27.11.2021 23:08.02.521] [LOG]   Starting server on port 8080 ...
        [27.11.2021 23:08.02.532] [WARN]  You're using a full whitelist configuration to allow for all IPs
        [27.11.2021 23:08.02.545] [LOG]   Server started ...
        [27.11.2021 23:08.02.547] [LOG]   Connecting socket for: MMM-Config
        [27.11.2021 23:08.02.548] [LOG]   Starting module helper: MMM-Config
        [27.11.2021 23:08.02.550] [LOG]   Connecting socket for: updatenotification
        [27.11.2021 23:08.02.552] [LOG]   Connecting socket for: calendar
        [27.11.2021 23:08.02.553] [LOG]   Starting node helper for: calendar
        [27.11.2021 23:08.02.554] [LOG]   Connecting socket for: newsfeed
        [27.11.2021 23:08.02.556] [LOG]   Starting node helper for: newsfeed
        [27.11.2021 23:08.02.557] [LOG]   Sockets connected & modules started ...
        [27.11.2021 23:08.02.932] [LOG]   Launching application.
        [27.11.2021 23:08.06.686] [LOG]   Create new calendarfetcher for url: http://www.calendarlabs.com/ical-calendar/ics/76/US_Holidays.ics - Interval: 300000
        [27.11.2021 23:08.07.027] [LOG]   Create new newsfetcher for url: https://rss.nytimes.com/services/xml/rss/nyt/HomePage.xml - Interval: 300000
        [27.11.2021 23:08.07.039] [LOG]   MMM-Config received a socket notification: CONFIG - Payload: [object Object]
        [27.11.2021 23:08.07.042] [LOG]   command =/home/pi/MagicMirror/modules/MMM-Config/test_convert.sh override
        [27.11.2021 23:08.07.044] [LOG]   Starting module helper:MMM-Config
        [27.11.2021 23:08.07.045] [LOG]   execing /home/pi/MagicMirror/modules/MMM-Config/test_convert.sh override
        [27.11.2021 23:08.07.340] [INFO]  Checking git for module: default
        [27.11.2021 23:08.07.378] [INFO]  Checking git for module: MMM-Config
        [27.11.2021 23:08.07.579] [LOG]    got port=8300
        [27.11.2021 23:08.08.352] [INFO]  Calendar-Fetcher: Broadcasting 1 events.
        [27.11.2021 23:08.09.037] [INFO]  Newsfeed-Fetcher: Broadcasting 55 items.
        [27.11.2021 23:08.13.839] [LOG]   stdout: completed
        
        

        I apologize if I’m being difficult. I was just getting very frustrated trying to manually configure modules, and when I stumbled across your module, I got excited! I feel like I’m overlooking something simple!:grimacing_face:

        mumblebajM S 2 Replies Last reply Reply Quote 0
        • mumblebajM Offline
          mumblebaj Module Developer @josh45631
          last edited by mumblebaj

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

          showQR: “true”

          This should be showQR: true without the quotes. Not sure if it makes much of a difference.

          The URL I used and which worked for me was:
          http://localhost:8080/modules/MMM-Config/config.html?port=8300

          @sdetweil Very cool module.

          Check out my modules at: https://github.com/mumblebaj?tab=repositories
          Check my blog-post: https://mumblebaj.xyz/
          Check my MM Container: https://hub.docker.com/repository/docker/mumblebaj/magicmirror/general

          S 1 Reply Last reply Reply Quote 0
          • S Do not disturb
            sdetweil @josh45631
            last edited by

            @josh45631 I had a typo which I corrected

            http://192.168.2.13:8080/modules/MM-Config/review
            

            notice the module name is MMM-Config

            3 M’s

            the content says the module is running

            if you use your phone on the qr does the page show?

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            J 1 Reply Last reply Reply Quote 0
            • S Do not disturb
              sdetweil @mumblebaj
              last edited by

              @mumblebaj don’t use the final url… use the review url as provided in the doc
              as the module discovers a free port for communication between the form and the module.

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              mumblebajM 1 Reply Last reply Reply Quote 0
              • J Offline
                josh45631 @sdetweil
                last edited by

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

                notice the module name is MMM-Config
                3 M’s

                :man_facepalming:
                There it is. I knew it would come down to something simple! I still can’t get to the form page by scanning the QR code, but I’m ok with that for now because I can access it via browser!

                Thank you so much!

                S 1 Reply Last reply Reply Quote 0
                • S Do not disturb
                  sdetweil @josh45631
                  last edited by

                  @josh45631 what are you using to scan the qr?

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  J 1 Reply Last reply Reply Quote 0
                  • mumblebajM Offline
                    mumblebaj Module Developer @sdetweil
                    last edited by

                    @sdetweil Which URL in the doc? From the screenshots? The review URL did not work for me. The one I posted above did. The QR code gave me a different URL which did not work for me but guess it is because of my install on my Windows laptop.

                    Check out my modules at: https://github.com/mumblebaj?tab=repositories
                    Check my blog-post: https://mumblebaj.xyz/
                    Check my MM Container: https://hub.docker.com/repository/docker/mumblebaj/magicmirror/general

                    mumblebajM S 2 Replies Last reply Reply Quote 0
                    • mumblebajM Offline
                      mumblebaj Module Developer @mumblebaj
                      last edited by

                      @sdetweil I found the URL bit in the doc.
                      http://machine_name:MM_Port/modules/MMM-Config/review
                      Did not work for me when I tried it though.

                      Check out my modules at: https://github.com/mumblebaj?tab=repositories
                      Check my blog-post: https://mumblebaj.xyz/
                      Check my MM Container: https://hub.docker.com/repository/docker/mumblebaj/magicmirror/general

                      S 1 Reply Last reply Reply Quote 0
                      • S Do not disturb
                        sdetweil @mumblebaj
                        last edited by

                        @mumblebaj u did change the symbolic names to actual, right?

                        machine_name
                        MM_port

                        right?

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

                        1 Reply Last reply Reply Quote 0
                        • S Do not disturb
                          sdetweil @mumblebaj
                          last edited by sdetweil

                          @mumblebaj windows should have worked

                          can u tell me what the url was?

                          when u configure mm for address:“0.0.0.0”
                          it’s not something I can connect to

                          so I get the machine hostname

                          I guess I need to figure out an IP address…

                          Sam

                          How to add modules

                          learning how to use browser developers window for css changes

                          mumblebajM 1 Reply Last reply Reply Quote 0
                          • mumblebajM Offline
                            mumblebaj Module Developer @sdetweil
                            last edited by mumblebaj

                            @sdetweil The QR code gave me machine name. But I figured that could not be correct. When I used the review URL earlier it did not work, When I started my Ubuntu Instance now and tried review with this URL:
                            http://localhost:8080/modules/MMM-Config/review
                            it worked fine and resolved to the following:
                            http://localhost:8080/modules/MMM-Config/config.html?port=8300
                            which I guess is what you were referring to?

                            Check out my modules at: https://github.com/mumblebaj?tab=repositories
                            Check my blog-post: https://mumblebaj.xyz/
                            Check my MM Container: https://hub.docker.com/repository/docker/mumblebaj/magicmirror/general

                            S 2 Replies Last reply Reply Quote 0
                            • S Do not disturb
                              sdetweil @mumblebaj
                              last edited by

                              @mumblebaj yes but localhost will only work w browser inside same machine as mm

                              Sam

                              How to add modules

                              learning how to use browser developers window for css changes

                              1 Reply Last reply Reply Quote 0
                              • S Do not disturb
                                sdetweil @mumblebaj
                                last edited by

                                @mumblebaj typically dhcp addresses now register the hostname in the router DNS server.

                                Sam

                                How to add modules

                                learning how to use browser developers window for css changes

                                1 Reply Last reply Reply Quote 0
                                • J Offline
                                  josh45631 @sdetweil
                                  last edited by

                                  @sdetweil I am using my cell phone connected to my wifi network. When I scan the code it sends me to

                                  http://raspberrypi:8080/modules/MMM-Config/review
                                  

                                  When I replace “raspberrypi” with the actual ip of the pi, it works.

                                  S 1 Reply Last reply Reply Quote 0
                                  • S Do not disturb
                                    sdetweil @josh45631
                                    last edited by sdetweil

                                    @josh45631 yes
                                    I ‘assumed’ that name will work… doesn’t…

                                    will fix, thx

                                    Sam

                                    How to add modules

                                    learning how to use browser developers window for css changes

                                    1 Reply Last reply Reply Quote 0
                                    • S Do not disturb
                                      sdetweil
                                      last edited by sdetweil

                                      @josh45631 @mumblebaj do a git pull in the module folder, and then restart mm and try the qr image again

                                      Sam

                                      How to add modules

                                      learning how to use browser developers window for css changes

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

                                        When I try to use your MMM-config I get this error…

                                        pi@raspberrypi:~ $ ~/MagicMirror/modules
                                        bash: /home/pi/MagicMirror/modules: No such file or directory

                                        S 1 Reply Last reply Reply Quote 0
                                        • S Do not disturb
                                          sdetweil @louise
                                          last edited by sdetweil

                                          @louise explain a little more… where are u typing that info ?

                                          where is your MagicMirror installed?

                                          read the link in my signature How to add modules (I didn’t write it)

                                          Sam

                                          How to add modules

                                          learning how to use browser developers window for css changes

                                          L 2 Replies Last reply Reply Quote 0
                                          • L Offline
                                            louise @sdetweil
                                            last edited by

                                            @sdetweil I am soooooo new at this. I had it working once by someone else, card got corrupted and the person building it no longer available. So I’m trying to rebuild on my own. Not a coder, programmer or anything else.

                                            I’ve tried the modules, got the calendar and weather in the config.js but it doesn’t run.

                                            So what do you need me to show you?

                                            S 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
                                            • 11
                                            • 12
                                            • 13
                                            • 14
                                            • 15
                                            • 15 / 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