Read the statement by Michael Teeuw here.
I am stuck need help
-
Hello, very new to coding and the magic mirror platform. I have installed magic mirror and the modules correctly. I then went into the config.js file and edited it to add the modules etc. Every time I try to start magic mirror it tells me that I have no validated config. js file and that there are errors. Could someone please tell me what I am doing wrong.
Here is the entire config.js file:var config = { address: "localhost", // Address to listen on, can be: // - "localhost", "127.0.0.1", "::1" // - another specific IPv4/6 // - "", "0.0.0.0", "::" // port: 8080, ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], language: "en", timeFormat: 24, units: "imperial", modules: [ { module: "alert", }, { module: "updatenotification", position: "top_bar", }, { module: "clock", position: "top_left", }, { module: "calendar" header: "Calendar" position: "top_left", config: { calendars: [ { symbol: "calendar-check", url: "webcal://www.calendarlabs.com/templates/ical/US-Holidays.ics" }, { symbol: "calendar-plus-o ", url: "https://calendar.google.com/XXXXXXXX/basic.ics" }, { symbol: "calendar-plus-o ", url: "https://calendar.google.com/XXXXXXX/basic.ics" } }, { module: "helloworld", position: "top_bar", config: { text: "Welcome to the Carls Residence" } }, { module: "MMM-DarkSkyForecast", header: "Weather", position: "top_right", classes: "default everyone", disabled: false, config: { apikey: "Xxxxxxxxxxdda4d069a", latitude: "39.548935", longitude: "-89.294533", iconset: "4c", concise: false, forecastLayout: "table" } }, { module: "MMM-MyScoreboard", position: "bottom_left", classes: "default everyone", header: "My Scoreboard", config: { show LeagueSeparators: true, colored: true, viewStyle: "mediumLogos", sports: [ { league: "NHL", groups: ["Western"] }, { league: "NFL", groups: ["NFC North"] }, { league: "MLB", groups: ["NL Central"] }, { league: "NCAAM", groups: ["Big Ten"] }, { league: "NCAAF", groups: ["Big Ten"] } }, { module: 'MMM-iFrame-Ping', position: 'bottom_left', config: { // See 'Configuration options' for more information. url: "https://radar.weather.gov/radar.php?rid=ILX&product=NCR&overlay=11101111&loop=yes", height:"100%", width:"100%", autoRefresh: true, updateInterval: 10, displayLastUpdate: true, width: "100%", height: "400px", scrolling: "no" } }, { module: "newsfeed", position: "bottom_bar", config: { feeds: [ { title: "Fox News", url: "http://feeds.foxnews.com/foxnews/latest" } ], showSourceTitle: true, showPublishDate: true } }, ] }; if (typeof module !== "undefined") {module.exports = config;} -
You may want to start from scratch, adding one module at a time and running the mirror to confirm your entries are correct. Then add the next module and repeat. There are a bunch of errors which leads me to believe that you added everything at once. Really, that’s the best way to do it and you learn the process at the same time. If an entry fails then you know where the problem is because you’re saving the config after each successful addition.
-
Thank you, I’ll try that. I’m honestly in over my head i believe, but I’m gonna keep working on it.
-
You’ll be fine. :thumbsup:
https://forum.magicmirror.builders/topic/4231/how-to-add-modules-for-absolute-beginners
-
Thank you for the help
-
You’re welcome. If you have trouble adding one module, by all means, come back here and ask for help. Troubleshooting the addition of one module is a whole lot easier than troubleshooting your entire config. So, start with the default config and try adding a single module. Keep me posted
-
@dcarls91 said in I am stuck need help:
Thank you, I’ll try that. I’m honestly in over my head i believe, but I’m gonna keep working on it.
We all were in the beginning…hang in there it’ll get easier for you :)
-
@dcarls91 said in I am stuck need help:
In your config fil are missing a lot of , and ]
check this -
One of the best commands to know is
npm run config:checkStart at the topmost error and work your way down the file - it’s got lots of problems, but is easily fixed. Also, I highly recommend a graphical type editor if possible - Geany is what I use.
I installed samba on my magic mirror so I can edit with the PC version of Geany and save it right to the Pi. It’s great.
-
var config = { address: "localhost", // Address to listen on, can be: // - "localhost", "127.0.0.1", "::1" // - another specific IPv4/6 // - "", "0.0.0.0", "::" // port: 8080, ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], language: "en", timeFormat: 24, units: "imperial", modules: [ { module: "alert", }, { module: "updatenotification", position: "top_bar", }, { module: "clock", position: "top_left", }, { module: "calendar", header: "Calendar", position: "top_left", config: { calendars: [ { symbol: "calendar-check", url: "webcal://www.calendarlabs.com/templates/ical/US-Holidays.ics" }, { symbol: "calendar-plus-o ", url: "https://calendar.google.com/XXXXXXXXX/basic.ics" }, { symbol: "calendar-plus-o ", url: "https://calendar.google.com/XXXXXXX/basic.ics" } ] } }, { module: "helloworld", position: "top_bar", config: { text: "Welcome to the Carls Residence" } }, { module: "MMM-DarkSkyForecast", header: "Weather", position: "top_right", classes: "default everyone", disabled: false, config: { apikey: "Xxxxxxxxxxdda4d069a", latitude: "39.548935", longitude: "-89.294533", iconset: "4c", concise: false, forecastLayout: "table" } }, { module: "MMM-MyScoreboard", position: "bottom_left", classes: "default everyone", header: "My Scoreboard", config: { showLeagueSeparators: true, colored: true, viewStyle: "mediumLogos", sports: [ { league: "NHL", groups: ["Western"] }, { league: "NFL", groups: ["NFC North"] }, { league: "MLB", groups: ["NL Central"] }, { league: "NCAAM", groups: ["Big Ten"] }, { league: "NCAAF", groups: ["Big Ten"] } ] } }, { module: 'MMM-iFrame-Ping', position: 'bottom_left', config: { // See 'Configuration options' for more information. url: "https://radar.weather.gov/radar.php?rid=ILX&product=NCR&overlay=11101111&loop=yes", autoRefresh: true, updateInterval: 10, displayLastUpdate: true, width: "100%", height: "400px", scrolling: "no" } }, { module: "newsfeed", position: "bottom_bar", config: { feeds: [ { title: "Fox News", url: "http://feeds.foxnews.com/foxnews/latest" } ], showSourceTitle: true, showPublishDate: true } }, ] }; if (typeof module !== "undefined") {module.exports = config;}You missed some
,, some]and some}
Oh, and you should never post your apikeys or links to personal calendars. I truncated both for you -
@yawns thank you for doing that, I’m very new to this, what else do i need to do to the above config file you posted
-
Give this a try. A handy tool
pi@raspberrypi:~/MagicMirror $ npm run config:check
hope its sorted -
Just wanted to say thanks again for all of the help. I have spent the last couple of days trying to figure this out to no avail. I have decided to scrap the project for now until I can figure out what I am doing because I clearly do not have a clue.
-
@dcarls91
I understand that in the beginning the amount information can be overwhelming, but how are you going to find out what you are doing when you scrape your project?
Especially when you are so close in getting the ‘Mirror’ started; just a few characters are missing in the config file.
The community here is very active and very helpful and can step down a nodge when it is getting too technical.
Of course it is expected that you have a certain level of knowledge or that you are willing to obtain that level.Besides spending several hours, did you spend any money on equipment, etc?
If you decide to give it a last effort, then it would help to tell us on what platform your Mirror is running (Raspberry, PC, Ubuntu, etc) and it would help to report back with a bit more details (other than I tried and it did not work).
And if someone tells you to perform action XYZ and you have no idea what the heck XYZ is or how to execute, then don’t be afraid to say so.The suggestions given, like try it module by module and the config check are very useful (I guess everyone was in this position, I know I was) and will solve your issues.
If you decide to move away from Magic Mirror, then I respect that, but perhaps you will reconsider.
Disclaimer: I do not have any shares in the project and am by no means an expert. Just reaching out. :-)
-
@dcarls91 said in I am stuck need help:
@yawns thank you for doing that, I’m very new to this, what else do i need to do to the above config file you posted
Sorry, I did not see your reply. Copy the config I posted, save it as config.js and add your API keys and links to calendars again. Or, to clearly see the changes I made, use this:
https://www.diffchecker.com/QQhBPpNOLeft is your config, right is my fixed config.
-
@yawns might also want to consider removing lat/long too
-
@dcarls91 Don’t give up.
Keep at it, you’re so close to having a working MM - a little self study and work and it’s done.
-
Thank you all for your help, after a long day yesterday i was able to get it up and running.
-
@dcarls91 said in I am stuck need help:
Thank you all for your help, after a long day yesterday i was able to get it up and running.
You see, we knew you could do it !! :-)
Congratulations. -
@dcarls91 congratulations!!.. could you summarize what the problem was? config, system, ? something else?
I am looking for how to help others that express the same problem…
thanks for any insight…
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