• 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.

Possible sytax error in my config.js file?

Scheduled Pinned Locked Moved Troubleshooting
5 Posts 4 Posters 1.6k Views 2 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.
  • B Offline
    BenPoulson
    last edited by yawns Dec 13, 2017, 12:36 PM Dec 13, 2017, 6:41 AM

    (Resubmitted to remove personal info) I’m probably just an idiot, but I can’t figure out what my syntax error is here. Does someone else see it?

    /* 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 = {
            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: "imperial",
    
            modules: [
                    {
                            module: "alert",
                    },
                    {
                            module: "updatenotification",
                            position: "top_bar"
                    },
                    {
                            module: "clock",
                            position: "top_left"
                    },
                    {
                            module: "calendar",
                            header: "Family Calendar",
                            position: "top_left",
                            config: {
                                    calendars: [
                                            {
                                                    symbol: "calendar-check-o ",
                                                    url: "MY CALENDAR URL"
                                            }
                                    ]
                            }
                    },
    
                    {
                            module: "compliments",
                            position: "lower_third"
                            config: {
                                    updateInterval: 30000,
                                    compliments: {
                                            morning: [
                                                    "Good morning, sunshine!",
                                                    "Looking good!",
                                                    "Go get em!",
                                                    "You look great!",
                                                    "Perfect circle!",
                                                    "I bet you do the crossword in ink.",
                                                    "You're more fun than bubble wrap!"
                                                    ],
                                            afternoon: [
                                                    "What a gorgeous day!",
                                                    "Looking good!",
                                                    "Go get em!",
                                                    "You look great!",
                                                    "Perfect circle!",
                                                    "I bet you do the crossword in ink.",
                                                    "You're more fun than bubble wrap!"
                                                    ],
                                            evening: [
                                                    "It was such a great day!"
                                                    "Looking good!",
                                                    "Go get em!",
                                                    "You look great!",
                                                    "Perfect circle!",
                                                    "I bet you do the crossword in ink.",
                                                    "You're more fun than bubble wrap!"
                                                    ]
                                            }
                                    }
                    },
    
                    {
                            module: "currentweather",
                            position: "top_right",
                            config: {
                                    location: "New York",
                                    locationID: "",  //ID from http://www.openweathermap.org/help/city_list.txt
                                    appid: "YOUR_OPENWEATHER_API_KEY"
                            }
                    },
                    {
                            module: "weatherforecast",
                            position: "top_right",
                            header: "Weather Forecast",
                            config: {
                                    location: "Frisco",
                                    locationID: "5422503",  //ID from http://www.openweathermap.org/help/city_list.txt
                                    appid: "87ef9f3a1f3d7e4738344c85226dfd00"
                            }
                    },
                    {
                            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
    • B Offline
      barnosch
      last edited by Dec 13, 2017, 6:58 AM

      Since there isn’t yet so much “customized” stuff in there, i would suggest, you start again with the dummy file provided in the /config folder.

      Then add the first module, if this is working then, add the second… and so on.
      Otherwise you will go crazy.

      1 Reply Last reply Reply Quote 0
      • Y Offline
        yawns Moderator
        last edited by Dec 13, 2017, 12:41 PM

        Your problems are with the compliments module. You are missing a comma after position: "lower_third" and another comma after "It was such a great day!" in the evening array.

        B 1 Reply Last reply Dec 13, 2017, 4:04 PM Reply Quote 2
        • C Offline
          cowboysdude Module Developer
          last edited by cowboysdude Dec 13, 2017, 12:53 PM Dec 13, 2017, 12:53 PM

          Valid

          /* 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 = {
                  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: "imperial",
          
                  modules: [
                          {
                                  module: "alert",
                          },
                          {
                                  module: "updatenotification",
                                  position: "top_bar"
                          },
                          {
                                  module: "clock",
                                  position: "top_left"
                          },
                          {
                                  module: "calendar",
                                  header: "Family Calendar",
                                  position: "top_left",
                                  config: {
                                          calendars: [
                                                  {
                                                          symbol: "calendar-check-o ",
                                                          url: "MY CALENDAR URL"
                                                  }
                                          ]
                                  }
                          },
          
                          {
                                  module: "compliments",
                                  position: "lower_third",
                                  config: {
                                          updateInterval: 30000,
                                          compliments: {
                                                  morning: [
                                                          "Good morning, sunshine!",
                                                          "Looking good!",
                                                          "Go get em!",
                                                          "You look great!",
                                                          "Perfect circle!",
                                                          "I bet you do the crossword in ink.",
                                                          "You're more fun than bubble wrap!"
                                                          ],
                                                  afternoon: [
                                                          "What a gorgeous day!",
                                                          "Looking good!",
                                                          "Go get em!",
                                                          "You look great!",
                                                          "Perfect circle!",
                                                          "I bet you do the crossword in ink.",
                                                          "You're more fun than bubble wrap!"
                                                          ],
                                                  evening: [
                                                          "It was such a great day!",
                                                          "Looking good!",
                                                          "Go get em!",
                                                          "You look great!",
                                                          "Perfect circle!",
                                                          "I bet you do the crossword in ink.",
                                                          "You're more fun than bubble wrap!"
                                                          ]
                                                  }
                                          }
                          },
          
                          {
                                  module: "currentweather",
                                  position: "top_right",
                                  config: {
                                          location: "New York",
                                          locationID: "",  //ID from http://www.openweathermap.org/help/city_list.txt
                                          appid: "YOUR_OPENWEATHER_API_KEY"
                                  }
                          },
                          {
                                  module: "weatherforecast",
                                  position: "top_right",
                                  header: "Weather Forecast",
                                  config: {
                                          location: "Frisco",
                                          locationID: "5422503",  //ID from http://www.openweathermap.org/help/city_list.txt
                                          appid: "87ef9f3a1f3d7e4738344c85226dfd00"
                                  }
                          },
                          {
                                  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 1
          • B Offline
            BenPoulson @yawns
            last edited by Dec 13, 2017, 4:04 PM

            @yawns That was it, thanks!

            1 Reply Last reply Reply Quote 1
            • 1 / 1
            1 / 1
            • First post
              1/5
              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