MagicMirror² v2.4.1 is available! For more information about this release, check out this topic.
Please read the release notes carefully since this update requires adjustments to your Raspberry Pi configuration!

Trouble With config file



  • Hi I copied the sample config.js file and renamed it config.js

    MM2 works with default locations and feeds… Alls good.

    OK so my issues is always with the titles

    Calender
    url change is ok and MM2 displays from my location but once i change the
    header: “US Holidays”, to header: “Irish Holidays”,
    I get the message Please create a config file. so i change the header back to the US.

    moving on to Weather forcast
    Location ID change works and my Appid WORK.
    But again change the Location: “New York” to Dublin i get that message again.

    then in the news feed my URL works but change the title name and the same issues happens again

    /* Magic Mirror Config Sample
     *
     * By Michael Teeuw http://michaelteeuw.nl
     * MIT Licensed.
     *
     * For more information how you can configurate this file
     * See https://github.com/MichMich/MagicMirror#configuration
     *
     */
    
    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: "clock",
    			position: "top_left"
    		},
    		{
    			module: "calendar",
    			header: "US Holidays",
    			position: "top_left",
    			config: {
    				calendars: [
    					{
    						symbol: "calendar-check-o ",
    						url: "webcal://www.calendarlabs.com/ical-calendar/ics/51/Ireland_Holidays.ics"
    					}
    				]
    			}
    		},
    		{
    			module: "compliments",
    			position: "lower_third"
    		},
    		{
    			module: "currentweather",
    			position: "top_right",
    			config: {
    				location: "New York",
    				locationID: "",  //ID from http://www.openweathermap.org/help/city_list.txt
    				appid: "YOUR_OPENWEATHER_API_KEY"
    			}
    		},
    		{
    			module: "weatherforecast",
    			position: "top_right",
    			header: "Weather Forecast",
    			config: {
    				location: "New York",
    				locationID: "2964574",  //ID from http://www.openweathermap.org/help/city_list.txt
    				appid: "MYKEYMYKEY*************************"
    			}
    		},
    		{
    			module: "newsfeed",
    			position: "bottom_bar",
    			config: {
    				feeds: [
    					{
    						title: “RTE News”,
    						url: "https://www.rte.ie/news/rss/news-headlines.xml"
    					}
    				],
    				showSourceTitle: true,
    				showPublishDate: true
    			}
    		},
    	]
    
    };
    
    /*************** DO NOT EDIT THE LINE BELOW ***************/
    if (typeof module !== "undefined") {module.exports = config;}
    

    Thanks for all the help 🙂


  • Module Developer

    @paddyhughes

    Most likely you’re getting syntax errors because of a missing quote or incorrect quote, or missing comma when you make your changes. By this I mean that all quotes are not valid within the code. I noticed this in your example above. title: “RTE News”,. Those quotes are enough to make your config fail. They should look like this title: "RTE News",. It’s a small detail, but as you are finding out, a very important one.

    I tried your Irish Holidays url and changed my header and it works fine. I’m sure this is where your problem lies. So, check your edits carefully for the proper syntax. 🙂

    0_1517187489230_Capture.PNG



  • @Mykle1

    Thanks Mike i am using CyberDuck on IMac when i do a live edit it changes the ‘’ to " for some reason thanks i would have not spotted that at all.


  • Module Developer

    @paddyhughes

    You’re welcome, mate. It’s common enough. Perhaps there’s an option within CyberDuck that will use the necessary quotes or maybe consider another text editor that doesn’t use them. There are plenty of free editors



  • Try Xcode 😉

    In cyberduck do a right click and say “edit with --> Xcode”

    For ssh i use “terminus”