• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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 280.8k Views 30 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 Away
    sdetweil @josh45631
    last edited by sdetweil Nov 28, 2021, 3:36 AM Nov 28, 2021, 3:34 AM

    @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 Nov 28, 2021, 4:09 AM Reply Quote 0
    • J Offline
      josh45631 @sdetweil
      last edited by Nov 28, 2021, 4:09 AM

      @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:

      M S 2 Replies Last reply Nov 28, 2021, 6:24 AM Reply Quote 0
      • M Offline
        mumblebaj Module Developer @josh45631
        last edited by mumblebaj Nov 28, 2021, 9:49 AM Nov 28, 2021, 6:24 AM

        @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

        S 1 Reply Last reply Nov 28, 2021, 12:38 PM Reply Quote 0
        • S Away
          sdetweil @josh45631
          last edited by Nov 28, 2021, 12:36 PM

          @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 Nov 28, 2021, 3:26 PM Reply Quote 0
          • S Away
            sdetweil @mumblebaj
            last edited by Nov 28, 2021, 12:38 PM

            @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

            M 1 Reply Last reply Nov 28, 2021, 4:19 PM Reply Quote 0
            • J Offline
              josh45631 @sdetweil
              last edited by Nov 28, 2021, 3:26 PM

              @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 Nov 28, 2021, 4:17 PM Reply Quote 0
              • S Away
                sdetweil @josh45631
                last edited by Nov 28, 2021, 4:17 PM

                @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 Nov 28, 2021, 9:35 PM Reply Quote 0
                • M Offline
                  mumblebaj Module Developer @sdetweil
                  last edited by Nov 28, 2021, 4:19 PM

                  @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

                  M S 2 Replies Last reply Nov 28, 2021, 4:21 PM Reply Quote 0
                  • M Offline
                    mumblebaj Module Developer @mumblebaj
                    last edited by Nov 28, 2021, 4:21 PM

                    @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

                    S 1 Reply Last reply Nov 28, 2021, 4:25 PM Reply Quote 0
                    • S Away
                      sdetweil @mumblebaj
                      last edited by Nov 28, 2021, 4:25 PM

                      @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
                      • 1
                      • 2
                      • 18
                      • 19
                      • 20
                      • 21
                      • 22
                      • 29
                      • 30
                      • 20 / 30
                      20 / 30
                      • First post
                        193/293
                        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