• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Mistake in the config.js and i dont no

Scheduled Pinned Locked Moved Troubleshooting
11 Posts 4 Posters 9.7k Views 3 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    Thomas
    last edited by Dec 27, 2016, 12:22 PM

    I´m a Newbie and a have a problem with the config.js at the Magic Mirror.
    I ´m insert a the third module MMM-Fuel and now a have a error after the boot.
    Here ist my config.js datei.
    can someone help me with this Problem ?
    Many thanks !!
    Thomas

    /* Magic Mirror Config Sample
    *

    • By Michael Teeuw http://michaelteeuw.nl
    • MIT Licensed.
      */

    var config = {
    port: 8080,

    language: 'en',
    timeFormat: 24,
    units: 'metric',
    
    modules: [
    	{
    		module: 'alert',
    	},
    	{
    		module: 'clock',
    		position: 'top_left'
    	},
    	{
    		module: 'calendar',
    	{
    		module: 'compliments',
    		position: 'lower_third'
    	},
    	{
    		module: 'currentweather',
    		position: 'top_right',
    		config: {
    			location: 'New York',
    			locationID: '',  //ID from http://www.openweathermap.org
    			appid: 'YOUR_OPENWEATHER_API_KEY'
    		}
    	},
    	{
    		module: 'weatherforecast',
    		position: 'top_right',
    		header: 'Weather Forecast',
    		config: {
                location: 'New York',
    			locationID: '5128581',  //ID from http://www.openweathermap.org
                appid: 'YOUR_OPENWEATHER_API_KEY'
    		}
    	},
               	{
    		module: 'newsfeed',
    		position: 'bottom_bar',
    		config: {
    			feeds: [
    				{
    					title: "New York Times",
    					url: "http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml"
    				}
    			],
    			showSourceTitle: true,
    			showPublishDate: true
    		}
    	},
          
                        module: "MMM-Fuel",
                        position: "top_left",
                        config: {
                            api_key: "e4a59b56-f6c7-4bef-1eb3-456af035d82c",
                            lat: 52.518611,
                            lng: 13.408333,
                            types: ["diesel"],
                            ...
    

    ]

    };

    /*************** DO NOT EDIT THE LINE BELOW ***************/
    if (typeof module !== ‘undefined’) {module.exports = config;}

    B 1 Reply Last reply Dec 27, 2016, 12:35 PM Reply Quote 0
    • B Offline
      broberg Project Sponsor @Thomas
      last edited by Dec 27, 2016, 12:35 PM

      @Thomas

      you are missing { }, around the fuel module

      should look like this

                  {
                          module: "MMM-Fuel",
                          position: "top_left",
                          config: {
                              api_key: "",
                              lat: 52.518611,
                              lng: 13.408333,
                              types: ["diesel"],
                              
                   },
      

      And btw, don’t give out your API-key, remove it when you post config files

      1 Reply Last reply Reply Quote 1
      • T Offline
        Thomas
        last edited by Dec 27, 2016, 3:17 PM

        @broberg
        Many thanks for your answer.
        Please lock at my config.js again.
        There is a error in it but i dont no.
        Sorry that i request you again !!
        Many thanks ! (you are german ?)
        Thomas

        var config = {
        port: 8080,

        language: 'en',
        timeFormat: 24,
        units: 'metric',
        
        modules: [
        	{
        		module: 'alert',
        	},
        	{
        		module: 'clock',
        		position: 'top_left'
        	},
        	{
        		module: 'calendar',
        	{
        		module: 'compliments',
        		position: 'lower_third'
        	},
        	{
        		module: 'currentweather',
        		position: 'top_right',
        		config: {
        			location: 'New York',
        			locationID: '',  //ID from http://www.openweathermap.org
        			appid: 'YOUR_OPENWEATHER_API_KEY'
        		}
        	},
        	{
        		module: 'weatherforecast',
        		position: 'top_right',
        		header: 'Weather Forecast',
        		config: {
                    location: 'New York',
        			locationID: '5128581',  //ID from http://www.openweathermap.org
                    appid: 'YOUR_OPENWEATHER_API_KEY'
        		}
        	},
                   	{
        		module: 'newsfeed',
        		position: 'bottom_bar',
        		config: {
        			feeds: [
        				{
        					title: "New York Times",
        					url: "http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml"
        				}
        			],
        			showSourceTitle: true,
        			showPublishDate: true
        		}
        	},
                {
                            module: "MMM-Fuel",
                            position: "top_left",
                            config: {
                                api_key: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
                                lat: 52.518611,
                                lng: 13.408333,
                                types: ["diesel"],
                                ...
                     },       
        

        ]

        };

        /*************** DO NOT EDIT THE LINE BELOW ***************/
        if (typeof module !== ‘undefined’) {module.exports = config;}

        B T Y 3 Replies Last reply Dec 27, 2016, 3:27 PM Reply Quote 0
        • B Offline
          broberg Project Sponsor @Thomas
          last edited by Dec 27, 2016, 3:27 PM

          @Thomas

          try to remove the dots under types: [“diesel”],

          I’m Swedish btw.

          1 Reply Last reply Reply Quote 1
          • T Offline
            Thomas @Thomas
            last edited by Dec 28, 2016, 9:00 AM

            @Thomas
            Good morning and thanks for your answer.
            i delete the points under diesel but it doesn´t work.
            we will see :-)
            Many thanks for your support !
            Best Regards Thomas

            1 Reply Last reply Reply Quote 0
            • Y Offline
              yawns Moderator @Thomas
              last edited by Dec 28, 2016, 10:27 AM

              Please remove this

                {
                	module: 'calendar',
              
              T 1 Reply Last reply Dec 29, 2016, 10:52 AM Reply Quote 1
              • T Offline
                Thomas @yawns
                last edited by Dec 29, 2016, 10:52 AM

                @yawns
                Good morning , thanks for the support !
                I delete the entires and now i have no error but a blank screen :-)
                Idont now …it very difficult.
                i think i quit the projekt…its better :-)
                here is my config again …
                Best regards from Germany !
                Thomas

                var config = {
                port: 8080,

                language: 'en',
                timeFormat: 24,
                units: 'metric',
                
                modules: [
                	{
                		module: 'alert',
                	},
                	{
                		module: 'clock',
                		position: 'top_left'
                	},
                	{
                		module: 'compliments',
                		position: 'lower_third'
                	},
                	{
                		module: 'currentweather',
                		position: 'top_right',
                		config: {
                			location: 'New York',
                			locationID: '',  //ID from http://www.openweathermap.org
                			appid: 'YOUR_OPENWEATHER_API_KEY'
                		}
                	},
                	{
                		module: 'weatherforecast',
                		position: 'top_right',
                		header: 'Weather Forecast',
                		config: {
                            location: 'New York',
                			locationID: '5128581',  //ID from http://www.openweathermap.org
                            appid: 'YOUR_OPENWEATHER_API_KEY'
                		}
                	},
                           	{
                		module: 'newsfeed',
                		position: 'bottom_bar',
                		config: {
                			feeds: [
                				{
                					title: "New York Times",
                					url: "http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml"
                				}
                			],
                			showSourceTitle: true,
                			showPublishDate: true
                		}
                	},
                        {
                                    module: "MMM-Fuel",
                                    position: "top_left",
                                    config: {
                                        api_key: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
                                        lat: 52.518611,
                                        lng: 13.408333,
                                        types: ["diesel"],
                                    }                
                             },       
                

                ]

                };

                /*************** DO NOT EDIT THE LINE BELOW ***************/
                if (typeof module !== ‘undefined’) {module.exports = config;}

                1 Reply Last reply Reply Quote 0
                • Y Offline
                  yawns Moderator
                  last edited by yawns Dec 29, 2016, 1:11 PM Dec 29, 2016, 1:10 PM

                  Okay, dann eben auf deutsch.
                  Ich habe deine config Datei komplett kopiert und bei mir eingefügt. Das funktioniert, also kopiere bitte das hier drunter komplett und ersetze deine config Datei dadurch.

                  var config = {
                  	port: 8080,
                  	
                  	language: 'de',
                  	timeFormat: 24,
                  	units: 'metric',
                  
                  	modules: [
                  		{
                  			module: 'alert',
                  		},
                  		{
                  			module: 'clock',
                  			position: 'top_left'
                  		},
                  		{
                  			module: 'compliments',
                  			position: 'lower_third'
                  		},
                  		{
                  			module: 'currentweather',
                  			position: 'top_right',
                  			config: {
                  				location: 'New York',
                  				locationID: '',  //ID from http://www.openweathermap.org
                  				appid: 'YOUR_OPENWEATHER_API_KEY'
                  			}
                  		},
                  		{
                  			module: 'weatherforecast',
                  			position: 'top_right',
                  			header: 'Weather Forecast',
                  			config: {
                  				location: 'New York',
                  				locationID: '5128581',  //ID from http://www.openweathermap.org
                  				appid: 'YOUR_OPENWEATHER_API_KEY'
                  			}
                  		},
                  		{
                  			module: 'newsfeed',
                  			position: 'bottom_bar',
                  			config: {
                  				feeds: [
                  					{
                  						title: "New York Times",
                  						url: "http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml"
                  					}
                  				],
                  				showSourceTitle: true,
                  				showPublishDate: true
                  			}
                  		},
                  		{
                  			module: "MMM-Fuel",
                  			position: "top_left",
                  			config: {
                  				api_key: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
                  				lat: 52.518611,
                  				lng: 13.408333,
                  				types: ["diesel"],
                  			}                
                  		 },
                  
                  ]
                  
                  };
                  
                  /*************** DO NOT EDIT THE LINE BELOW ***************/
                  if (typeof module !== 'undefined') {module.exports = config;}
                  
                  

                  Hier fehlen natürlich die Keys für Currentweather/Forecast und MMM-Fuel, aber ich sehe Ausgaben auf dem Bildschirm.
                  Hast du MMM-Fuel auch als Modul bei dir installiert? Oder hast du nur die Einträge in der config Datei gesetzt? Wenn ich nur die Einträge setze, sehe ich einen schwarzen Bildschirm. Wenn ich aber das Modul installiere, dann funktioniert es. Öffne eine Konsole auf dem Raspberry oder nutze eine SSH shell, um auf dem Raspberry zu arbeiten:

                  cd ~/MagicMirror/modules
                  git clone https://github.com/fewieden/MMM-Fuel.git
                  cd MMM-Fuel
                  npm install
                  

                  Danach den MagicMirror neu starten und testen.
                  Grüße aus Solingen, Stefan

                  T 1 Reply Last reply Dec 29, 2016, 4:09 PM Reply Quote 1
                  • T Offline
                    Thomas @yawns
                    last edited by Dec 29, 2016, 4:09 PM

                    @yawns
                    Hallo Stefan,
                    vielen vielen Dank für deine Hilfe.
                    Ich habe alles so gamacht wie Du beschrieben hast und siehe da es lief.
                    Super !
                    Es ist als absoluter Änfänger machmal gar nicht so leicht.
                    Eine Frag zu Abschluss. Kann man die Schriftfarbe der einzelnen Module auch ändern ?
                    Vielleicht hast Du ja da auch eine Lösung parat. :-)
                    Dir und deiner Familie einen guten Rutsch in´s neue Jahr und die besten Wünsche für 2017 !
                    Grüße aus Steinheim /Westf
                    Thomas

                    S 1 Reply Last reply Dec 29, 2016, 5:02 PM Reply Quote 0
                    • S Offline
                      strawberry 3.141 Project Sponsor Module Developer @Thomas
                      last edited by Dec 29, 2016, 5:02 PM

                      @Thomas you can define your own styling in ~/MagicMirror/css/custom.css, for the most modules this should work

                      .MODULENAME {
                        color: blue;
                      }
                      

                      Please create a github issue if you need help, so I can keep track

                      T 1 Reply Last reply Dec 29, 2016, 5:23 PM Reply Quote 1
                      • 1
                      • 2
                      • 1 / 2
                      1 / 2
                      • First post
                        8/11
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy