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 not working

    Scheduled Pinned Locked Moved Troubleshooting
    4 Posts 2 Posters 2.0k 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.
    • D Offline
      Dandrea30
      last edited by

      Hi guys,

      I am able to get my magicmirror working with the standard config.js settings preinstalled, but when i then add aditional modules, the config file stops working.
      I have tried everything to get it running, but it fails to load.
      Could someone please review my config file and advise where i have gone wrong.

      All help appreciated

      /* Magic Mirror Config file
      *

      • By Michael Teeuw http://michaelteeuw.nl
      • MIT Licensed.
        */

      var config = {
      port: 8080,
      ipWhitelist: [“127.0.0.1”, “::ffff:127.0.0.1”, “::1”], // Set [] to allow all IP addresses.

      language: "en",
      timeFormat: 24,
      units: "metric",
      
      modules: [
      	{
      		module: "alert",
      	},
      	{
      		module: "updatenotification",
      		position: "top_bar"
      	},
      	{
      		module: "clock",
      		position: "top_left"
      	},
      	{
      		module: "calendar",
      		header: "UK Holidays",
      		position: "top_left",
      		config: {
      			calendars: [
      				{
      					symbol: "calendar-check-o ",
      					url: "https://www.calendarlabs.com/ical-calendar/ics/75/UK_Holidays.ics"
      				}
      			]
      		}
      	},
      	{
      		module: "compliments",
      		position: "lower_third"
      	},
      	{
      		module: "currentweather",
      		position: "top_right",
      		config: {
      			location: "Mansfield",
      			locationID: "2643097",  //ID from http://www.openweathermap.org/help/city_list.txt
      			appid: "1ff19eb375630ae2d015b49428d7cbec"
      		}
      	},
      	{
      		module: "weatherforecast",
      		position: "top_right",
      		header: "Weather Forecast",
      		config: {
      			location: "Mansfield",
      			locationID: "2643097",  //ID from http://www.openweathermap.org/help/city_list.txt
      			appid: "1ff19eb375630ae2d015b49428d7cbec"
      		}
      	},
      	{
      		module: "newsfeed",
      		position: "bottom_bar",
      		config: {
      			feeds: [
      				{
      					title: "Sky News",
      					url: "http://feed.skynews.com/feeds/rss/uk.xml"
      				}
      			],
      			showSourceTitle: true,
      			showPublishDate: true
                          }
                  },
                  {
                          module: 'MMM-Traffic',
                          position: 'bottom_right',
                          classes: 'dimmed medium', //optional, default is 'bright medium', only applies to commute info not route_name
                          config: {
                                  api_key: 'your_apikey_here',
                                  mode: 'driving',
                                  origin: '4 Pennsylvania Plaza, New York, NY 10001',
                                  destination: '1 MetLife Stadium Dr, East Rutherford, NJ 07073',
                                  mon_destination: '116th St & Broadway, New York, NY 10027',
                                  fri_destination: '1 E 161st St, Bronx, NY 10451',
                                  arrival_time: '0800', //optional, but needs to be in 24 hour time if used.
                                  route_name: 'Home to Work',
                                  changeColor: true
                                  showGreen: false,
                                  limitYellow: 5, //Greater than 5% of journey time due to traffic
                                  limitRed: 20, //Greater than 20% of journey time due to traffic
                                  traffic_model: 'pessimistic'
                                  interval: 120000 //2 minutes
                 },
           ]
      

      };

      /*************** DO NOT EDIT THE LINE BELOW ***************/
      if (typeof module !== “undefined”) {module.exports = config;}

      N 1 Reply Last reply Reply Quote 0
      • N Offline
        NoNameRo @Dandrea30
        last edited by

        @dandrea30

        you’re missing a }

                    {
                            module: 'MMM-Traffic',
                            position: 'bottom_right',
                            classes: 'dimmed medium',
                            config: {
                                    api_key: 'your_apikey_here',
                                    mode: 'driving',
                                    origin: '4 Pennsylvania Plaza, New York, NY 10001',
                                    destination: '1 MetLife Stadium Dr, East Rutherford, NJ 07073',
                                    mon_destination: '116th St & Broadway, New York, NY 10027',
                                    fri_destination: '1 E 161st St, Bronx, NY 10451',
                                    arrival_time: '0800', //optional, but needs to be in 24 hour time if used.
                                    route_name: 'Home to Work',
                                    changeColor: true
                                    showGreen: false,
                                    limitYellow: 5, //Greater than 5% of journey time due to traffic
                                    limitRed: 20, //Greater than 20% of journey time due to traffic
                                    traffic_model: 'pessimistic'
                                    interval: 120000 //2 minutes
                            }
                   },
        
        D 1 Reply Last reply Reply Quote 0
        • D Offline
          Dandrea30 @NoNameRo
          last edited by

          @nonamero thank you for your reply. I have edited the file as advised, but i still get the dread: Please Create a Config File.

          I have tried deleting the input and typing all manually, but to no avail.

          N 1 Reply Last reply Reply Quote 0
          • N Offline
            NoNameRo @Dandrea30
            last edited by

            @dandrea30
            there are two commas missing

            		{
                        module: 'MMM-Traffic',
                            position: 'bottom_right',
                            classes: 'dimmed medium', //optional, default is 'bright medium', only applies to commute info not route_name
                            config: {
                                    api_key: 'your_apikey_here',
                                    mode: 'driving',
                                    origin: '4 Pennsylvania Plaza, New York, NY 10001',
                                    destination: '1 MetLife Stadium Dr, East Rutherford, NJ 07073',
                                    mon_destination: '116th St & Broadway, New York, NY 10027',
                                    fri_destination: '1 E 161st St, Bronx, NY 10451',
                                    arrival_time: '0800', //optional, but needs to be in 24 hour time if used.
                                    route_name: 'Home to Work',
                                    changeColor: true,
                                    showGreen: false,
                                    limitYellow: 5, //Greater than 5% of journey time due to traffic
                                    limitRed: 20, //Greater than 20% of journey time due to traffic
                                    traffic_model: 'pessimistic',
                                    interval: 120000 //2 minutes
            				}
            		},
            
            1 Reply 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 / 1
            • 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