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.

    Config.fs

    Scheduled Pinned Locked Moved Troubleshooting
    troubleshootconfigconfig.jsconfiguration
    22 Posts 4 Posters 8.4k 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.
    • S Offline
      scoller
      last edited by

      I have recently downloaded the magicmirror project and started to edit the config.js sample file. After i wrote in my information such as, weather, calendar, and compliments I tried to re start the project. The project started with still a notice saying edit you config file and I cant figure out where this problem comes from. A good thing to know is that the config.js file was the sample file so I saved it with out the sample. I have also run the code through the jshint and it says alot of things that idon’t understand :). PLEASE can someone help me

      lavolp3L 1 Reply Last reply Reply Quote 0
      • lavolp3L Offline
        lavolp3 Module Developer @scoller
        last edited by lavolp3

        @scoller said in Config.fs:

        . I have also run the code through the jshint and it says alot of things that idon’t understand :). PLEASE can someone help me

        Well for that we’d need to know what jshint says :-)
        Can you please post your config.js here (WITHOUT sensitive data please)

        And for the next time:
        In the magicmirror directory you can put in

        npm run config:check
        

        and it will also give you the errors in the config.
        You can then look up the lines using e.g.

        sudo nano -c config/config.js
        

        which will add the columns to nano

        How to troubleshoot modules
        MMM-soccer v2, MMM-AVStock

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

          Thank you very much here is my config:

          /* 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: 24,
          units: "metric",
          
          modules: [
          	{
          		module: "alert",
          	},
          	{
          		module: "updatenotification",
          		position: "top_bar"
          	},
          	{
          		module: "clock",
          		position: "top_left"
          	},
          	{
          		module: "calendar",
          		header: "Uppkommande Högtider",
          		position: "top_left",
          		config: {
          			calendars: [
          				{
          					symbol: "calendar-check",
          					url: "http://www.calendarlabs.com/templates/ical/us-holidays.ics"
          				}
          			]
          		}
          	},
          	{
          		module: "compliments",
          		position: "lower_third"
          	},
          	{
          		module: "currentweather",
          		position: "top_right",
          		config: {
          			location: "Alsike,Sweden",
          			locationID: "2726470"
          			appid: "c17305e68b5d2b54d3f2c8b5e2cc4002"
          		}
          	},
          	{
          		module: "weatherforecast",
          		position: "top_right",
          		header: "Vädret i Framtiden",
          		config: {
          			location: "Alsike,Sweden",
          			locationID: "2726470"
          			appid: "c17305e68b5d2b54d3f2c8b5e2cc4002"
          		}
          	},
          	{
          		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
          • ? Offline
            A Former User @scoller
            last edited by

            @scoller said in Config.fs:

            locationID: “2726470”

            comma missed.

            99% of configuration failure was due to this mistake.

            S lavolp3L 2 Replies Last reply Reply Quote 1
            • S Offline
              scoller @Guest
              last edited by

              @sean thank you

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

                @sean how do i know where the comma should be? I know im stupid :)

                ? 1 Reply Last reply Reply Quote 0
                • lavolp3L Offline
                  lavolp3 Module Developer @Guest
                  last edited by

                  @sean said in Config.fs:

                  comma missed.

                  A classic!

                  How to troubleshoot modules
                  MMM-soccer v2, MMM-AVStock

                  1 Reply Last reply Reply Quote 0
                  • ? Offline
                    A Former User @scoller
                    last edited by A Former User

                    @scoller
                    In {} (object) and [] (array), there could be several items. Each item should be separated by comma,. Only last item could omit ,.
                    By example

                    someObject: {
                      someProperty: someValue ,
                      anotherProperty: anotherValue ,
                      lastProperty: lastValue
                    }, //< - this object also could be an element of other list
                    someArray: [
                      someElement, 
                      otherElement, 
                      lastElement //< - you can omit comma here.
                    ] // < - You can omit last comma of list.
                    
                    S 3 Replies Last reply Reply Quote 0
                    • S Offline
                      scoller @Guest
                      last edited by

                      @sean so you mean like {nothing,nothing}?

                      ? 1 Reply Last reply Reply Quote 0
                      • ? Offline
                        A Former User @scoller
                        last edited by

                        @scoller right.

                        S 1 Reply Last reply Reply Quote 0
                        • S Offline
                          scoller @Guest
                          last edited by

                          @sean but i mean where is the brackets where the comma should be. For an example high up or low down in the code

                          ? 2 Replies Last reply Reply Quote 0
                          • ? Offline
                            A Former User @scoller
                            last edited by A Former User

                            @scoller Well, that is a just grammar of JavaScript. So…
                            Hmmm…
                            Just remember these.

                            • Every bracket([], {}) should be closed somewhere.
                            • Nested brackets should be matched their opening and closing.
                            • All Items should be separated with comma
                            • All text string should be quoted by quotation mark (`, " or ')
                            • true/false (boolean value) and number should not be quoted.

                            These are common rules for config.js

                            S 1 Reply Last reply Reply Quote 0
                            • S Offline
                              scoller @Guest
                              last edited by

                              @sean thank’s for the help will try that

                              1 Reply Last reply Reply Quote 0
                              • ? Offline
                                A Former User @scoller
                                last edited by

                                @scoller
                                You have two locationID: "2726470" in your code. both should be modified.

                                1 Reply Last reply Reply Quote 0
                                • S Offline
                                  scoller @Guest
                                  last edited by

                                  @sean Specific for my code can you point it out cause I can’t find it, may be because of my lack of knowledge :)

                                  1 Reply Last reply Reply Quote 0
                                  • S Offline
                                    scoller @Guest
                                    last edited by

                                    @sean my code goes like this is this an error?
                                    {.
                                    Hdhdhdhdu
                                    Hhdhdhfhdujd.
                                    Hdhdhhdh
                                    {
                                    And the bracket never closes, is that an error?

                                    ? 1 Reply Last reply Reply Quote 0
                                    • ? Offline
                                      A Former User @scoller
                                      last edited by

                                      @scoller

                                      {
                                        module: "currentweather",
                                        position: "top_right",
                                        config: {
                                          location: "Alsike,Sweden",
                                          locationID: "2726470", // < - I think here comma missed.
                                          appid: "c17305e68b5d2b54d3f2c8b5e2cc4002"
                                        }
                                      },
                                      {
                                        module: "weatherforecast",
                                        position: "top_right",
                                        header: "Vädret i Framtiden",
                                        config: {
                                          location: "Alsike,Sweden",
                                          locationID: "2726470", // < - Here also.
                                          appid: "c17305e68b5d2b54d3f2c8b5e2cc4002"
                                        }
                                      },
                                      
                                      S 1 Reply Last reply Reply Quote 0
                                      • S Offline
                                        scoller @Guest
                                        last edited by

                                        @sean What is that? I see its the code but what?

                                        :::

                                        ? 1 Reply Last reply Reply Quote 0
                                        • ? Offline
                                          A Former User @scoller
                                          last edited by

                                          @scoller
                                          Exchange those with your current currentweather and weatherforecast in config.js

                                          S 1 Reply Last reply Reply Quote 0
                                          • S Offline
                                            scoller @Guest
                                            last edited by

                                            @sean Thank you again. Is that the problem?

                                            Mykle1M ? 2 Replies 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
                                            • 1 / 2
                                            • 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