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.

    Syntax Error.

    Scheduled Pinned Locked Moved Troubleshooting
    3 Posts 2 Posters 1.8k Views 1 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.
    • N Offline
      Nico Biester
      last edited by

      And here Is my next question :D . I have this module but when I start my MagicMirror2 I get this message : " Please create a config file." Here is my code :

      {
      module: “MMM-WeeklySchedule”,
      position: “top_center”,
      header: “Stundenplan”,
      config: {
      schedule: {
      timeslots: [ “8:00”, “8:30”, “10:00”, “11:40”, “11:50” “13:00” “14:00” “14:45” “16:00”],
      lessons: {
      Mo: [ “GA”, "LZ - ", “Pause (30)”, “1 FS”, “2 FS”, “Pause (60)”, “LB”, “3 FS”, “Feierabend”],
      Di: [ “GA”, "LZ - ", “Pause (30)”, “1 FS”, “2 FS”, “Pause (60)”, “LB”, “3 FS”, “Feierabend”],
      Mi: [ “GA”, "LZ - ", “Pause (30)”, “1 FS”, “2 FS”, “Pause (60)”, “LB”, “3 FS”, “Feierabend”],
      Do: [ “GA”, "LZ - ", “Pause (30)”, “1 FS”, “2 FS”, “Pause (60)”, “LB”, “3 FS”, “Feierabend”],
      Fr: [ “GA”, "LZ - ", “Pause (30)”, “1 FS”, “2 FS”, “Pause (60)”, “LB”, “3 FS”, “Feierabend”],

              }
          },
          updateInterval: 1 * 60 * 60 * 1000, // every hour
          showNextDayAfter: 22:00
      

      },

      I´m sorry that the code looks so strange but I dont know how to do it right.

      1 Reply Last reply Reply Quote 0
      • A Offline
        AxLed Module Developer
        last edited by

        @Nico-Biester
        There are some mistakes in your module config:

        • wrong quotes, you use “ instead of " (are you using mac to edit config.js?)
        • missing commas (in lessons, after 11:50)
        • missing brackets and/or bracket on the wrong position
        • wrong translations, you cant translate mon:to Mo:, as the module is looking for the array name of mon:
        • general advice: always use brackets in pair (every bracket which opens, has to close somewhere)

        This code shoud work:

        {
                    module: "MMM-WeeklySchedule",
                    position: "top_center",
                    header: "Stundenplan",
                    config: {
                        schedule: {
                            timeslots: [ "8:00", "8:30", "10:00", "11:40", "11:50" ,"13:00", "14:00", "14:45", "16:00"],
                            lessons: {
                                mon: [ "GA", "LZ - ", "Pause (30)", "1 FS", "2 FS", "Pause (60)", "LB", "3 FS", "Feierabend"],
                                tue: [ "GA", "LZ - ", "Pause (30)", "1 FS", "2 FS", "Pause (60)", "LB", "3 FS", "Feierabend"],
                                wed: [ "GA", "LZ - ", "Pause (30)", "1 FS", "2 FS", "Pause (60)", "LB", "3 FS", "Feierabend"],
                                thu: [ "GA", "LZ - ", "Pause (30)", "1 FS", "2 FS", "Pause (60)", "LB", "3 FS", "Feierabend"],
                                fri: [ "GA", "LZ - ", "Pause (30)", "1 FS", "2 FS", "Pause (60)", "LB", "3 FS", "Feierabend"],
                                    },
                                updateInterval: 1 * 60 * 60 * 1000, // every hour
                                showNextDayAfter: "22:00"
                            },
                    },
                },
        

        AxLED

        N 1 Reply Last reply Reply Quote 1
        • N Offline
          Nico Biester @AxLed
          last edited by Nico Biester

          @axled said in Syntax Error.:

          {
          module: “MMM-WeeklySchedule”,
          position: “top_center”,
          header: “Stundenplan”,
          config: {
          schedule: {
          timeslots: [ “8:00”, “8:30”, “10:00”, “11:40”, “11:50” ,“13:00”, “14:00”, “14:45”, “16:00”],
          lessons: {
          mon: [ “GA”, "LZ - ", “Pause (30)”, “1 FS”, “2 FS”, “Pause (60)”, “LB”, “3 FS”, “Feierabend”],
          tue: [ “GA”, "LZ - ", “Pause (30)”, “1 FS”, “2 FS”, “Pause (60)”, “LB”, “3 FS”, “Feierabend”],
          wed: [ “GA”, "LZ - ", “Pause (30)”, “1 FS”, “2 FS”, “Pause (60)”, “LB”, “3 FS”, “Feierabend”],
          thu: [ “GA”, "LZ - ", “Pause (30)”, “1 FS”, “2 FS”, “Pause (60)”, “LB”, “3 FS”, “Feierabend”],
          fri: [ “GA”, "LZ - ", “Pause (30)”, “1 FS”, “2 FS”, “Pause (60)”, “LB”, “3 FS”, “Feierabend”],
          },
          updateInterval: 1 * 60 * 60 * 1000, // every hour
          showNextDayAfter: “22:00”
          },
          },
          },

          Thanks for your help and your tips. It´s working very well!

          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