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

    Scheduled Pinned Locked Moved Troubleshooting
    4 Posts 3 Posters 2.9k 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.
    • C Offline
      cphacker
      last edited by KirAsh4

      Hello.
      I have been playing around with the con fig file and now its broken. And i cant find the error. Can some one please help me?
      Here is the config file. I added the config for the compliments section.

      /* Magic Mirror Config Sample
       *
       * By Michael Teeuw http://michaelteeuw.nl
       * MIT Licensed.
       */
      
      var config = {
              port: 8080,
      
              language: 'da',
              timeFormat: 24,
              units: 'metric',
      
              modules: [
      
      
      
                 {
          module: 'MMM-OlympicGames',
          position: 'top_center',
          config: {
                              highlight: 'Denmark',
                              maxRows: '10',
                              title: ['Olympic Games Rio 2016'],
                              reloadInterval: 1800000,
      
          }
      },
      
                      {
                              module: 'alert',
                      },
                      {
                              module: 'clock',
                              position: 'top_left'
                      },
                      {
                              module: 'calendar',
                              header: 'Helligdage',
                              position: 'top_left',
                              config: {
                                      calendars: [
                                              {
                                                      symbol: 'calendar-check-o ',
                                                      url: 'https://www.google.com/calendar/ical/4m72jkqjoat48ng6urkc6mbeg8%40group.calen$
                                              }
                                      ]
                              }
                      },
      				{
                              module: 'compliments',
                              position: 'lower_third'
      						config: {
                              compliments: {
                               morning: [
                                 'Good morning, handsome!',
                                 'Enjoy your day!',
                                 'How was your sleep?'
                                                      ],
                              afternoon: [
                                 'Hello, beauty!',
                                 'You look sexy!',
                                 'Looking good today!'
                                                      ],
                              evening: [
                                 'Wow, you look hot!',
                                 'You look nice!',
                                 'Hi, sexy!'
                                                      ]
                                                      }
                                                      }
                      },
                      {
                              module: 'currentweather',
                              position: 'top_right',
                              config: {
                                      location: 'Esbjerg',
                                      locationID: 'xxxxxx',  //ID from http://www.openweathermap.org
                                      appid: 'xxxxx'
                              }
                      },
                      {
                              module: 'weatherforecast',
                              position: 'top_right',
                              header: 'Vejrudsigt',
                              config: {
                          location: 'Esbjerg',
                                      locationID: 'xxxxxx',  //ID from http://www.openweathermap.org
                          appid: 'xxxxxxxx'
                              }
                      },
                      {
                              module: 'newsfeed',
                              position: 'bottom_bar',
                              config: {
                                      reloadInterval: '300000',
                                      showDescription: 'true',
                                      updateInterval: '10000',
                                      feeds: [
                                              {
                                                      title: "Danmark",
                                                      url: "http://www.dr.dk/nyheder/service/feeds/indland"
      
                                              }
      
      
                                      ],
                                      showSourceTitle: true,
                                      showPublishDate: true
                              }
                      },
              ]
      
      };
      
      /*************** DO NOT EDIT THE LINE BELOW ***************/
      if (typeof module !== 'undefined') {module.exports = config;}
      
      1 Reply Last reply Reply Quote 0
      • C Offline
        cphacker
        last edited by KirAsh4

        Okay i got it working again. But i had to take out this part:

        config: {
                                compliments: {
                                 morning: [
                                   'Good morning, handsome!',
                                   'Enjoy your day!',
                                   'How was your sleep?'
                                                        ],
                                afternoon: [
                                   'Hello, beauty!',
                                   'You look sexy!',
                                   'Looking good today!'
                                                        ],
                                evening: [
                                   'Wow, you look hot!',
                                   'You look nice!',
                                   'Hi, sexy!'
                                                        ]
                                                        }
                                                        }
        

        What is wrong with it?

        Note from Moderator: Please use Markdown on code snippets for easier reading.

        1 Reply Last reply Reply Quote 0
        • yo-lessY Offline
          yo-less Module Developer
          last edited by

          If in doubt, there’s usually a comma missing ;-). In your case, after ‘lower_third’…

          {	module: 'compliments',
          	position: 'lower_third',
          	config: {
          		compliments: {
          				morning: [
          						'Good morning, handsome!',
          						'Enjoy your day!',
          						'How was your sleep?'
                                                      ],
          						afternoon: [
                                 'Hello, beauty!',
                                 'You look sexy!',
                                 'Looking good today!'
                                                      ],
          						evening: [
                                 'Wow, you look hot!',
                                 'You look nice!',
                                 'Hi, sexy!'
                                                      ]
          					}
          			}
          },
          
          1 Reply Last reply Reply Quote 0
          • R Offline
            ronny3050 Module Developer
            last edited by

            For future reference, paste your code first on JSHint. It will tell you if you have any errors.

            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