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.js file Syntax

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    26 Posts 7 Posters 27.6k Views 6 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.
    • A Offline
      amosh83 @letsirk
      last edited by

      @letsirk YES!!!
      I MADE IT!!! turns out that all I was missing was that “/”, are you kidding me??? ahahah

      I’m so thankful to ALL of you, I’ve never touched a Terminal in my life and I managed to do this with manual installation all thanks to you geniuses!!!
      Thank you
      @Mykle1 @bhepler @letsirk

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

        @amosh83 said in Config.js file Syntax:

        all I was missing was that “/”,

        Ahh, you missed when you copied and pasted. That’s fairly common.

        are you kidding me???

        Now where have I heard this before? Oh yeah, I said it!

        Enjoy your mirror

        Create a working config
        How to add modules

        1 Reply Last reply Reply Quote 0
        • jadeJ Offline
          jade
          last edited by

          I’m having this exact problem, but I’ve used a linter to check for errors and there are none, and my file is in /var/www/html/MagicMirror/config/config.js, I have no idea what I’m doing wrong!

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

            @jade said in Config.js file Syntax:

            my file is in /var/www/html/MagicMirror/config/config.js,

            Your installation of MM belongs as follows, and so the path to your config.js file

            pi@raspberry ~/MagicMirror/config/config.js

            Then we can work on your config.js if need be

            Create a working config
            How to add modules

            strawberry 3.141S jadeJ 2 Replies Last reply Reply Quote 0
            • strawberry 3.141S Offline
              strawberry 3.141 Project Sponsor Module Developer @Mykle1
              last edited by

              @Mykle1 not necessarily, you can install the mirror in every directory you like

              Please create a github issue if you need help, so I can keep track

              A 1 Reply Last reply Reply Quote 0
              • A Offline
                Anhalter42 @strawberry 3.141
                last edited by

                @strawberry-3.141 … except for directories with different read/write permissions. Not a linux expert, but I guess this includes /var/ in its default status!?

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

                  I was referring to this forums very own “Complete Setup Tutorial.” Specifically, this:
                  https://forum.magicmirror.builders/topic/236/complete-setup-tutorial/6

                  I guess I shouldn’t assume that everyone follows the installation procedure.

                  Create a working config
                  How to add modules

                  1 Reply Last reply Reply Quote 1
                  • jadeJ Offline
                    jade @Mykle1
                    last edited by jade

                    @Mykle1 said in Config.js file Syntax:

                    Your installation of MM belongs as follows, and so the path to your config.js file

                    pi@raspberry ~/MagicMirror/config/config.js

                    When I first started using Linux I was taught the very bad habit of switching to the root user and doing everything as root, so I moved the file into where it needs to be in /home/pi but I still have the same problem

                    var config = {
                        port: 8080,
                        ipWhitelist: [],
                        language: "en",
                        timeFormat: 24,
                        units: "metric",
                        modules: [
                            {
                                module: "clock",
                                position: "top_left"
                            },
                            {
                                module: "calendar",
                                header: "CWG  Pi",
                                position: "top_left",
                                config: {
                                    calendars: [
                                        {
                                            symbol: "calendar-check-o ",
                                            url: "https://calendar.google.com/calendar/ical/cwgpi2017%40gmail.com/private-b287e4ebe0e8f5d66665e0c83f9e3fa0/basic.ics"
                                        }
                                    ]
                                }
                            },
                            {
                                module: "compliments",
                                position: "lower_third",
                                updateInterval: 3600000,
                                config: {
                                    compliments: {
                                        morning: [
                                            "Valar Morghulis",
                                            "Valar Dohaeris",
                                            "When You Play The Game Of Thrones You Win Or You Die",
                                            "Where Is The God Of Tits And Wine?"
                                        ],
                                        afternoon: [
                                            "Sometimes, Those With The Most Power Have The Least Grace",
                                            "A Mind Needs Books Like A Sword Needs A Whetstone",
                                            "Chaos Isn't A Pit, Chaos Is A Ladder",
                                            "A Lion Doesn't Concern Himself With The Opinions Of Sheep"
                                        ],
                                        evening: [
                                            "The Night Is Dark And Full Of Terrors",
                                            "Night Gathers And Now My Watch Begins",
                                            "Winter Is Coming",
                                            "Power Resides Where Men Believe It Resides. It's A Trick, A Shadow On The Wall, And A Very Small Man Can Cast A Very Large Shadow"
                                        ]
                                    }
                                }
                            },
                            {
                                module: "currentweather",
                                position: "top_right",
                                config: {
                                    location: "Corby",
                                    locationID: "2652381",  //ID from http://www.openweathermap.org/help/city_list.txt
                                    appid: "39ab36a3fa513354fbe406263f175c07"
                                }
                            }
                        ]
                    };
                    
                    

                    Everything is ok according to jslint but something has got to be not working. Incidentally if I use the sample file and don’t change anything I have the same problem.

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

                      @jade said in Config.js file Syntax:

                      When I first started using Linux I was taught the very bad habit of switching to the root user and doing everything as root, so I moved the file into where it needs to be in /home/pi but I still have the same problem

                      Again, I hate to refer to the Complete Setup Tutorial but item #7 of Notes at the very beginning of the tutorial states:
                      "DO NOT INSTALL MagicMirror² as the root user! Always do it as the regular, non privileged pi user"

                      With that said, your config is not the problem. I just tested it and it fired right up.
                      0_1500031554343_v.JPG

                      Unless, it’s not named correctly (config.js) or MM can’t find it at its proper path

                      Create a working config
                      How to add modules

                      jadeJ 1 Reply Last reply Reply Quote 0
                      • jadeJ Offline
                        jade @Mykle1
                        last edited by

                        @Mykle1 I’m wondering if the problem was actually that I was using a Pi 0, I’m testing now on a Pi 2 and I’ve run the automatic installer, though it is now just sitting doing absolutely nothing, the last thing it said is:

                        >node-gyp rebuild > build_log.txt 2>&1 || exit 0
                        

                        And now it’s just sitting there. It hasn’t bought the prompt back up yet so maybe I’m being impatient.

                        A 1 Reply Last reply Reply Quote 0
                        • A Offline
                          Anhalter42 @jade
                          last edited by

                          @jade several people were struggling with PI0 IIRC. Search the forum (for example start here).

                          jadeJ 2 Replies Last reply Reply Quote 0
                          • jadeJ Offline
                            jade @Anhalter42
                            last edited by

                            @Anhalter42 I’ve got it mostly up and running on Pi 2 now, my only issue now is it’s loading a black screen with no info, the terminal says launching application and then access denied to IP address 0.0.0.0/0 I have no idea what’s going on now!

                            1 Reply Last reply Reply Quote 0
                            • jadeJ Offline
                              jade @Anhalter42
                              last edited by

                              @Anhalter42 Ok, it’s all good, I just took the ipWhitelist section from the sample pasted it in and now I have a working mirror that sporadically gives me game of thrones quotes! My office at work is now much brighter!

                              bheplerB 1 Reply Last reply Reply Quote 1
                              • bheplerB Offline
                                bhepler Module Developer @jade
                                last edited by

                                @jade said in Config.js file Syntax:

                                now I have a working mirror that sporadically gives me game of thrones quotes! My office at work is now much brighter!

                                Well, you do until he kills off another Stark child.

                                1 Reply Last reply Reply Quote 1

                                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
                                • 2 / 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