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

Config Help!

Scheduled Pinned Locked Moved Solved Troubleshooting
9 Posts 5 Posters 8.6k Views 3 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.
  • I Offline
    IArentBen
    last edited by paviro May 20, 2016, 8:44 PM May 17, 2016, 3:46 PM

    Morning everyone!

    I’ve been trying to get my mirror running for the past few days but I am stumped! I cant get my config file to work the Magic Mirror screen pops up and says if you have a config file to lint it and I have. I rant the pm2 log and i says “mm-0 (err): WARNING! Could not find config. Please create one.”

    Would you please take a peek at my config file for me? If i missed an obvious step please let me know!

    var config = {
    	port : 8080,
    	language : 'en',
    	timeFormat : 24,
    	units : 'metric',
    	modules : [{
    			module : 'clock',
    			position : 'top_left'
    			config : {
    				timeFormat : 24,
    				displaySeconds : false,
    				showPeriod : false,
    				showPeriodUpper : false
    			}
    		}, {
    			module : 'calendar',
    			header : 'Calendar',
    			position : 'top_left',
    			config : {
    				calendars : [{
    						symbol : 'calendar-check-o',
    						url : 'webcal://www.calendarlabs.com/templates/ical/Canada-Holidays.ics'
    					}
    				]
    				maximumEntries : 10,
    				maximumNumberOfDays : 365,
    				displaySymbol : true,
    				defaultSymbol : calendar,
    				maxTitleLength : 25,
    				fetchInterval : 900000,
    				animationSpeed : 2000,
    				fade : true,
    				fadePoint : 0.25,
    				loadingText : 'Loading...',
    				emptyCalendarText : 'No Text to Display...',
    				todayText : 'Today',
    				tomorrowText : 'Tomorrow',
    				runningText : 'coming up'
    			}
    		}, {
    			module : 'currentweather',
    			position : 'top_right',
    			config : [{
    					location : 'Sylvan Lake',
    					appid : '6160806',
    					units : metric,
    					updateInterval : 900000,
    					animationSpeed : 2000,
    					timeFormat : 24,
    					showPeriod : false,
    					showPeriodUpper : false,
    					lang : en,
    					initialLoadDelay : 0,
    					retryDelay : 2500,
    					apiVersion : 2.5,
    					apiBase : 'http://api.openweathermap.org/data/',
    					weatherEndpoint : 'weather',
    					iconTable : {
    						'01d' : 'wi-day-sunny',
    						'02d' : 'wi-day-cloudy',
    						'03d' : 'wi-cloudy',
    						'04d' : 'wi-cloudy-windy',
    						'09d' : 'wi-showers',
    						'10d' : 'wi-rain',
    						'11d' : 'wi-thunderstorm',
    						'13d' : 'wi-snow',
    						'50d' : 'wi-fog',
    						'01n' : 'wi-night-clear',
    						'02n' : 'wi-night-cloudy',
    						'03n' : 'wi-night-cloudy',
    						'04n' : 'wi-night-cloudy',
    						'09n' : 'wi-night-showers',
    						'10n' : 'wi-night-rain',
    						'11n' : 'wi-night-thunderstorm',
    						'13n' : 'wi-night-snow',
    						'50n' : 'wi-night-alt-cloudy-windy'
    					}
    				}
    			]
    		}, {
    			module : 'newsfeed',
    			position : 'bottom_bar',
    			config : {
    				feeds : [{
    						title : "CBC Top Stories",
    						url : "http://rss.cbc.ca/lineup/topstories.xml",
    					}{
    						title : "CBC Calgary",
    						url : "http://rss.cbc.ca/lineup/canada-calgary.xml",
    					}{
    						title : "CBC World Stories",
    						url : "http://rss.cbc.ca/lineup/World.xml",
    					}
    				],
    				showSourceTitle : true,
    				showPublishDate : true,
    				showDescription : true,
    				reloadInterval : 900000,
    				updateInterval : 300000,
    				animationSpeed : 2000
    			}
    		}, ]
    };
    if (typeof module !== 'undefined') {
    	module.exports = config;
    }
    

    Note from admin: Please use Markdown on code snippets so it is easier to read!

    1 Reply Last reply Reply Quote 0
    • F Offline
      feuerball
      last edited by paviro May 17, 2016, 6:31 PM May 17, 2016, 4:08 PM

      did you rename your config.js.sample to config.js?

      I 1 Reply Last reply May 17, 2016, 7:13 PM Reply Quote 1
      • P Offline
        PtrBld Module Developer
        last edited by paviro May 17, 2016, 6:30 PM May 17, 2016, 5:21 PM

        There is a , missing After Position: line 8

        I 1 Reply Last reply May 17, 2016, 7:16 PM Reply Quote 0
        • I Offline
          IArentBen @feuerball
          last edited by May 17, 2016, 7:13 PM

          @feuerball sure did!

          1 Reply Last reply Reply Quote 0
          • I Offline
            IArentBen @PtrBld
            last edited by May 17, 2016, 7:16 PM

            @PtrBld thanks but that didn’t do it either

            1 Reply Last reply Reply Quote 0
            • K Offline
              KirAsh4 Moderator
              last edited by May 17, 2016, 8:11 PM

              You’re missing commas between your feed definitions.

              feeds: [
                      {
                              title: "..."
                              url: "..."
                      },      //  <--- you're missing commas there
                      }
                              title: "..."
                              url: "..."
                      }
              ]

              A Life? Cool! Where can I download one of those from?

              1 Reply Last reply Reply Quote 0
              • K Offline
                KirAsh4 Moderator
                last edited by May 17, 2016, 8:12 PM

                Also, you are not required to enter all of those weather parameters unless you are actually changing them. Bare minimum all you need is your location and your API ID. The iconTable, apiBase, Version, all of those things are already defined for you. Only if you want to change the defaults do you have to define them.

                A Life? Cool! Where can I download one of those from?

                1 Reply Last reply Reply Quote 0
                • MichMichM Offline
                  MichMich Admin
                  last edited by May 18, 2016, 8:55 AM

                  Best way to check your config.js is to check it using jshint.com or jslint.com - they will show you the errors if there are any.

                  I 1 Reply Last reply May 18, 2016, 11:52 AM Reply Quote 0
                  • I Offline
                    IArentBen @MichMich
                    last edited by May 18, 2016, 11:52 AM

                    @MichMich I tried the jshint and jslint but, was not successful because of my lack of knowledge in this language. I fixed it but basically scrapping the whole file and doing one section at a time. I learnt a whole lot in two hours though haha

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