Read the statement by Michael Teeuw here.
Syntax Error.
-
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.
-
@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:
toMo:
, as the module is looking for the array name ofmon:
- 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
- wrong quotes, you use
-
@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!