Read the statement by Michael Teeuw here.
Not sure what doing wrong :( adding modules
-
You had a bunch of syntax problems. Missing } , and ;
You can compare yours to this if you like, but this should work for you.
var config = { address: "localhost", // Address to listen on, can be: // - "localhost", "127.0.0.1", "::1" to listen on loopback interface // - another specific IPv4/6 to listen on a specific interface // - "", "0.0.0.0", "::" to listen on any interface // Default, when address config is left out, is "localhost" port: 8080, ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], // Set [] to allow all IP addresses // or add a specific IPv4 of 192.168.1.5 : // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"], // or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format : // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"], language: "en", timeFormat: 24, units: "metric", modules: [ { module: "alert", }, { module: "updatenotification", position: "top_bar" }, { module: 'uptimerobot', position: 'top_right', config: { useColors: true api_key:'u505342-b40737465f0eada9bb8a', } }, { module: "clock", position: "top_left" }, { module: 'MMM-Globe', position: 'lower_third', config: { style: 'geoColor', imageSize: 400, ownImagePath:'', updateInterval: 10*60*1000 } }, { module: "calendar", header: "UK Holidays", position: "top_left", config: { calendars: [ { symbol: "calendar-check-o ", url: "webcal://www.calendarlabs.com/ical-calendar/ics/75/UK_Holidays.ics" } ] } }, { module: "compliments", position: "lower_third" }, { module: "currentweather", position: "top_right", config: { location: "Spain", locationID: "2514169", //ID from http://www.openweathermap.org/help/city_list.txt appid: "825910983bae6910153f11c5" } }, { module: "weatherforecast", position: "top_right", header: "Weather Forecast", config: { location: "UK", locationID: "2514169", //ID from http://www.openweathermap.org/help/city_list.txt appid: "825910983bae6979766611c5" } }, { module: "newsfeed", position: "bottom_bar", config: { feeds: [ { title: "BBC UK", url: "http://feeds.bbci.co.uk/news/video_and_audio/news_front_page/rss.xml?edition=uk" } ], showSourceTitle: true, showPublishDate: true } }, { module: 'MMM-Hue', position: 'top_right', config:{ bridgeip: "192.168.1.4", userid: "V1mkM0KAT2qi2Z0LUIET-UFp47GZpxJyJB1R58j0", colour: true } }, ] }; /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") {module.exports = config;}
For future reference, this should help you add modules.
https://forum.magicmirror.builders/topic/4231/how-to-add-modules-for-absolute-beginners
-
One syntax error I spot is in uptimeroot module. The curly bracket of
config:
is not matched. @Mykle1 writes there is even more which I don’t spot immediately.{ module: 'uptimerobot', position: 'top_right', config: { useColors: true api_key:'u505342-b40737465f0eada9bb8a', },
In such cases it is good to do a syntax check of the config. Please run
npm check:config
to do so. You’ll get a detailed statement of what is wrong where syntactically. The reference @Mykle1 gives above is a must read. It shows an example of what the syntax check provides you.If a syntax check does not solve the issue, I’d comment out all modules but one and start the mirror. Use
/* commented out module */
to make multi-line comments. If start-up works, you add the next module and restart. Repeat this until start-up fails which means you’ve found a(!) module that causes the issue. Please note that there might be more than one wrong module.If you have the module, copy the desired config elsewhere and redo the module’s configuration with the simplest possible config, which you often find in the ReadMe file of the same module.
Good hunt.
-
@pinsdorf said in Not sure what doing wrong :( adding modules:
{
module: ‘uptimerobot’,
position: ‘top_right’,
config: {
useColors: true
api_key:‘u505342-b40737465f0eada9bb8a’,
},Missing comma behind the “true”.
Must look like this:
{ module: 'uptimerobot', position: 'top_right', config: { useColors: true, api_key:'u505342-b40737465f0eada9bb8a' },
Just a copy/paste failure from Mykle ;)
-
@cruunnerr said in Not sure what doing wrong :( adding modules:
Just a copy/paste failure from Mykle ;)
Nope, I missed that one. Nice catch! :-)
-
Wow what a great forum!!
thanks for the help… really is appreciated :)
Will try now