Config Help!



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



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


  • Module Developer

    There is a , missing After Position: line 8



  • @feuerball sure did!



  • @PtrBld thanks but that didn’t do it either


  • Moderator

    You’re missing commas between your feed definitions.

    feeds: [
            {
                    title: "..."
                    url: "..."
            },      //  

  • Moderator

    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.


  • MagicMirror Creator

    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.



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


Log in to reply
 

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