MagicMirror² v2.12.0 is available! For more information about this release, check out this topic.

Problems with my Config file



  • Hey guys,
    I just refound my old pi and now I am trying to create a MagicMirror. I came pretty far now I have a problem with my config file.

    If you could help me it would be great 😃

    Thanks for your help.

    /* Magic Mirror Config Sample
    *
    * By Michael Teeuw http://michaelteeuw.nl
    * MIT Licensed.
    */
    
    var config = {
       port: 8080,
       ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"],
    
       language: 'de',
       timeFormat: 24,
       units: 'metric',
    
       modules: [
       	{
       		module: 'alert',
       	},
       	{
       		module: "updatenotification",
       		position: "top_bar"
       	},
       	{
       		module: 'clock',
       		position: 'top_left'
       	},
       	{
       		module: 'MMM-DWD-WarnWeather',
       		position: 'top_left',
       		header: 'DWD Wetterwarnungen',
       		config: {
       			region: 'Rhein-Neckar-Kreis und Stadt Heidelberg',
       			changeColor: true,
       			interval: 5 * 60 * 1000, // every 5 minutes
       			longversion: true,
       			loadingText: 'Warnungen werden geladen...',
       			noWarningText: 'Keine Warnungen'
       			}
       	},
    
       	{
       		module: 'currentweather',
       		position: 'top_right',
       		config: {
       			location: 'Heidelberg',
       			locationID: '2907911',  //ID from http://www.openweathermap.org
       			appid: 'd8b2c41a44ce77e3c34237894cbf055b'
       		}
       	},
       	{
       		module: 'weatherforecast',
       		position: 'top_right',
       		header: 'Weather Forecast',
       		config: {
       			location: 'Heidelberg',
       			locationID: '2907911',  //ID from http://www.openweathermap.org
       			appid: 'd8b2c41a44ce77e3c34237894cbf055b'
       		}
       	},
    
       	{
       		module: 'newsfeed',
       		position: 'bottom_bar',
       		config: {
       			feeds: [
       				{
       					title: "Sport",
       					url: "http://www.sport1.de/news.rss"
       				}
       			],
       			showSourceTitle: true,
       			showPublishDate: true
       		}
       	},
    
       	{
       		module: 'newsfeed',
       		position: 'bottom_bar',
       		config: {
       			feeds: [
       				{
    
       					title: "Tagesschau",
       					url: "http://www.tagesschau.de/xml/rss2"
       				}
       			],
       			showSourceTitle: true,
       			showPublishDate: true
       		}
       	},
    
       	{
       		module: 'newsfeed',
       		position: 'bottom_bar',
       		config: {
       			feeds: [
       				{
    
       					title: "Heise News",
       					url: "https://www.heise.de/newsticker/heise-atom.xml"
       				}
       			],
       			showSourceTitle: true,
       			showPublishDate: true
       		}
       	},
    {
       		module: "calendar",
       		header: "Events",
       		position: "top_right",
       		config: {
       			calendars: [
       				{
       					symbol: "calendar-check-o ",
       					url: "https://calendar.google.com/calendar/embed?src=h5gvpq6g8rhfk2lbu8n70rc71g%40group.calendar.google.com&ctz=Europe%2FBerlin"
       				}
       			]
       		}
       	},
       {
         module: "MMM-NowPlayingOnSpotify",
         position: "top_bar",
    
         config: {
           clientID: "69f1b99772754d889d9a7542303fbe1e",
           clientSecret: "*******************************",
           accessToken: "BQA_OLriFvy1ORb-Um55wNFHQE5Mw9yhqoVINvkTUlBD-HYL9So_WEJz4vh5lDGW1nAiTjWnZa0x0hq5PWWMIrrGl4XtEAOl6ErU5bCxsb4hCEAAFH7PT5uXFBO6ni_cDM8ODEutvTHyuNLsHoceZQ",
           refreshToken: "AQBr-Ft2KPpjCERS1jfHdcg74gKlnL_otE4NKKVCGeVL3_0a-5G7L1AeBu8RHaZsowLV6pOAlaiLduave_Ea1nVBuxbdGKr8iYiSQ4XbHLybk-fSvVOYgoXTocQIwUUAK0o"
         }
    },
       ]
    
    };
    
    
    
    /*************** DO NOT EDIT THE LINE BELOW ***************/
    if (typeof module !== 'undefined') {module.exports = config;}
    


  • What kind of problem are you having? Have you run:

    npm run config:check

    to see if there are any syntax errors?



  • well I don’t know what this really means.
    do you have an idea?

    pi@raspberrypi:~ $ npm run config:check
    npm ERR! Linux 4.4.50-v7+
    npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "config:check"
    npm ERR! node v6.17.1
    npm ERR! npm  v3.10.10
    npm ERR! path /home/pi/package.json
    npm ERR! code ENOENT
    npm ERR! errno -2
    npm ERR! syscall open
    
    npm ERR! enoent ENOENT: no such file or directory, open '/home/pi/package.json'
    npm ERR! enoent ENOENT: no such file or directory, open '/home/pi/package.json'
    npm ERR! enoent This is most likely not a problem with npm itself
    npm ERR! enoent and is related to npm not being able to find a file.
    npm ERR! enoent
    
    npm ERR! Please include the following file with any support request:
    npm ERR!     /home/pi/npm-debug.log
    


  • @EdO my problem is that when I run MM, it sais: please create config file



  • @Omensch please, run that in the MagicMirror folder



  • @Omensch I ran config:check and don’t see any errors…

    what problem are u having?



  • I’m not seeing anything jump out at me though I’m not familiar with all of your modules. If the config:check doesn’t show any errors, then you need to go through each module definition to make sure it is correct.

    You can go through each one checking the documentation as you go or you can do what I’ve done. When I ran into a similar problem I commented out every module except one. Then one at a time I restarted MM to see if that module was defined properly until I found the offending module. Once you know the one that is causing problems, you will need to pull up the documentation for it to find out what is wrong.

    When you find the offending module, now you need to check to see what is wrong with that module definition. Chances are it’s a parameter that is misspelled or not applicable or specified incorrectly.



  • @Omensch also, how did u do the setup of MagicMirror?

    Manually, or with my automated install script?
    From here
    https://github.com/sdetweil/MagicMirror_scripts



  • @EdO thanks I’ll try that



  • @sdetweil with the command from the website of MagicMirror


Log in to reply