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.

    Need help with Config.js!

    Scheduled Pinned Locked Moved Troubleshooting
    magic mirrormodulesconfig modulesconfig.jsbeginner
    7 Posts 3 Posters 2.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.
    • strinoS Offline
      strino
      last edited by

      Hello all!

      I’ve finally taken the plunge and started on my mirror. I got it up and running now with the basic defaults but wanted to add a few modules and update some default module configurations.

      I have a working Config.js but when I swap in my new additions it ceases to work and gives me a “Please create a Config” message.

      I’ve ran my config through JSHint but it’s not giving me any useful errors!

      Please see my config below and let me know what I’m doing wrong. I’m pretty sure it’s something with the compliments module.

      Thanks!

      	language: "en",
      	timeFormat: 12,
      	units: "imperial",
      
      	modules: [
      		{
      			module: "alert",
      		},
      		{
      			module: "updatenotification",
      			position: "top_bar"
      		},
      		{
          module: 'MMM-Remote-Control',
          // uncomment the following line to show the URL of the remote control on the mirror
          position: 'bottom_left'
          // you can hide this module afterwards from the remote control itself
      		},
      		{
      			module: "clock",
      			position: "top_left"
      		},
      		{
      			module: "calendar",
      			header: "Upcoming",
      			position: "top_left",
      			config: {
      				calendars: [
      					{
      						symbol: "calendar-check-o ",
      						url: "xxxx"
      					}
      				]
      			}
      		},
      		{
      			module: "compliments",
      			position: "lower_third",
      			config: {
      							compliments: {
      											anytime: [
      														"Hi there!",
      														"I love you!",
      														"You look great!",
      														"You can do anything!",
      														"Don't forget your keys!"
      											],
      											morning: [
      														"Good morning beautiful!",
      														"Good morning handsome!",
      														"You is an icon",
      														"Enjoy your day!"
      											],
      											afternoon: [
      														"Looking good!",
      														"You look nice!",
      														"Have a good one!"
      											],
      											evening: [
      														"Wow, you look great!",
      														"Good evening!"
      											],
      											rain: [
      														"Stay dry!",
      														"Grab a jacket!"
      											],
      											showers: [
      														"Stay dry!",
      														"Grab a coat!"
      											],
      											day_sunny: [
      														"Suns out, guns out!",
      														"It's sunny! Go to a park!",
      														"It's a beautiful day!"
      											]
      					}
      				}
      		},
      		{
      			module: "currentweather",
      			position: "top_right",
      			config: {
      				location: "Seattle",
      				locationID: "5809844",  //ID from http://www.openweathermap.org/help/city_list.txt
      				appid: "xxxx",
      				roundTemp: "true"
      			}
      		},
      		{
      			module: "weatherforecast",
      			position: "top_right",
      			header: "Weather Forecast",
      			config: {
      				location: "Seattle",
      				locationID: "5809844",  //ID from http://www.openweathermap.org/help/city_list.txt
      				appid: "xxxx",
      				roundTemp: "true"
      			}
      		},
      		{
      			module: "newsfeed",
      			position: "bottom_bar",
      			config: {
      				feeds: [
      					{
      						title: "New York Times",
      						url: "http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml"
      					}
      					{
      						title: "Reuters",
      						url: "http://feeds.reuters.com/reuters/topNews"
      					}
      					{
      						title: "Google News"
      						url: "https://news.google.com/news/rss/?ned=us&gl=US&hl=en"
      					}
      				],
      				showSourceTitle: true,
      				showPublishDate: true
      			}
      		},
      	]
      
      };
      
      1 Reply Last reply Reply Quote 0
      • C Offline
        Charley Module Developer
        last edited by

        You are missing a comma

        {
        						title: "Google News", // ADD a comma here
        						url: "https://news.google.com/news/rss/?ned=us&gl=US&hl=en"
        					}
        

        MMM-Bose-Soundtouch, MMM-Domoticz, MMM-crypto-portfolio, MMM-Fibaro, MMM-rain-forecast

        strinoS 1 Reply Last reply Reply Quote 1
        • strinoS Offline
          strino @Charley
          last edited by

          @Charley Thanks!
          I added the comma and restarted and I still am getting the error.

          1 Reply Last reply Reply Quote 0
          • C Offline
            Charley Module Developer
            last edited by

            The best way is to comment out a module and restart the mirror if the error persists than it is another module.

            MMM-Bose-Soundtouch, MMM-Domoticz, MMM-crypto-portfolio, MMM-Fibaro, MMM-rain-forecast

            1 Reply Last reply Reply Quote 1
            • yawnsY Offline
              yawns Moderator
              last edited by

              You missed 2 or 3 commas in newsfeed module. The comma Charley spotted, and 2 commas after each newsfeed { }

              This is passing jshint without any error.

              
              /* 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: 12,
              	units: "imperial",
              
              	modules: [
              		{
              			module: "alert",
              		},
              		{
              			module: "updatenotification",
              			position: "top_bar"
              		},
              		{
                  module: 'MMM-Remote-Control',
                  // uncomment the following line to show the URL of the remote control on the mirror
                  position: 'bottom_left'
                  // you can hide this module afterwards from the remote control itself
              		},
              		{
              			module: "clock",
              			position: "top_left"
              		},
              		{
              			module: "calendar",
              			header: "Upcoming",
              			position: "top_left",
              			config: {
              				calendars: [
              					{
              						symbol: "calendar-check-o ",
              						url: "xxxx"
              					}
              				]
              			}
              		},
              		{
              			module: "compliments",
              			position: "lower_third",
              			config: {
              							compliments: {
              											anytime: [
              														"Hi there!",
              														"I love you!",
              														"You look great!",
              														"You can do anything!",
              														"Don't forget your keys!"
              											],
              											morning: [
              														"Good morning beautiful!",
              														"Good morning handsome!",
              														"You is an icon",
              														"Enjoy your day!"
              											],
              											afternoon: [
              														"Looking good!",
              														"You look nice!",
              														"Have a good one!"
              											],
              											evening: [
              														"Wow, you look great!",
              														"Good evening!"
              											],
              											rain: [
              														"Stay dry!",
              														"Grab a jacket!"
              											],
              											showers: [
              														"Stay dry!",
              														"Grab a coat!"
              											],
              											day_sunny: [
              														"Suns out, guns out!",
              														"It's sunny! Go to a park!",
              														"It's a beautiful day!"
              											]
              					}
              				}
              		},
              		{
              			module: "currentweather",
              			position: "top_right",
              			config: {
              				location: "Seattle",
              				locationID: "5809844",  //ID from http://www.openweathermap.org/help/city_list.txt
              				appid: "xxxx",
              				roundTemp: "true"
              			}
              		},
              		{
              			module: "weatherforecast",
              			position: "top_right",
              			header: "Weather Forecast",
              			config: {
              				location: "Seattle",
              				locationID: "5809844",  //ID from http://www.openweathermap.org/help/city_list.txt
              				appid: "xxxx",
              				roundTemp: "true"
              			}
              		},
              		{
              			module: "newsfeed",
              			position: "bottom_bar",
              			config: {
              				feeds: [
              					{
              						title: "New York Times",
              						url: "http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml"
              					},
              					{
              						title: "Reuters",
              						url: "http://feeds.reuters.com/reuters/topNews"
              					},
              					{
              						title: "Google News",
              						url: "https://news.google.com/news/rss/?ned=us&gl=US&hl=en"
              					}
              				],
              				showSourceTitle: true,
              				showPublishDate: true
              			}
              		},
              	]
              
              };
                  
              /*************** DO NOT EDIT THE LINE BELOW ***************/
              if (typeof module !== "undefined") {module.exports = config;}
              
              1 Reply Last reply Reply Quote 1
              • C Offline
                Charley Module Developer
                last edited by

                @yawns I also missed them just after the } bracket.

                MMM-Bose-Soundtouch, MMM-Domoticz, MMM-crypto-portfolio, MMM-Fibaro, MMM-rain-forecast

                1 Reply Last reply Reply Quote 1
                • strinoS Offline
                  strino
                  last edited by

                  Thank you @yawns and @Charley!!! It’s all set and good to go now!

                  1 Reply Last reply Reply Quote 0
                  • 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