MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord

    SOLVED Config Help!

    Troubleshooting
    5
    9
    8003
    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
      IArentBen last edited by paviro

      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
        feuerball last edited by paviro

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

        I 1 Reply Last reply Reply Quote 1
        • P
          PtrBld Module Developer last edited by paviro

          There is a , missing After Position: line 8

          I 1 Reply Last reply Reply Quote 0
          • I
            IArentBen @feuerball last edited by

            @feuerball sure did!

            1 Reply Last reply Reply Quote 0
            • I
              IArentBen @PtrBld last edited by

              @PtrBld thanks but that didn’t do it either

              1 Reply Last reply Reply Quote 0
              • KirAsh4
                KirAsh4 Moderator last edited by

                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
                • KirAsh4
                  KirAsh4 Moderator last edited by

                  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
                  • MichMich
                    MichMich Admin last edited by

                    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 Reply Quote 0
                    • I
                      IArentBen @MichMich last edited by

                      @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
                      • First post
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy