Possible sytax error in my config.js file?



  • (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;}


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


  • Moderator

    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.



  • 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;}
    
    


  • @yawns That was it, thanks!


Log in to reply
 

Looks like your connection to MagicMirror Forum was lost, please wait while we try to reconnect.