Navigation

    MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord
    MagicMirror² v2.15.0 is available! For more information about this release, check out this topic.

    Mistake in the config.js and i dont no

    Troubleshooting
    4
    11
    6227
    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
      Thomas last edited by

      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;}

      broberg 1 Reply Last reply Reply Quote 0
      • broberg
        broberg Project Sponsor @Thomas last edited by

        @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
          Thomas last edited by

          @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;}

          broberg T yawns 3 Replies Last reply Reply Quote 0
          • broberg
            broberg Project Sponsor @Thomas last edited by

            @Thomas

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

            I’m Swedish btw.

            1 Reply Last reply Reply Quote 1
            • T
              Thomas @Thomas last edited by

              @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
              • yawns
                yawns Moderator @Thomas last edited by

                Please remove this

                  {
                  	module: 'calendar',
                T 1 Reply Last reply Reply Quote 1
                • T
                  Thomas @yawns last edited by

                  @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
                  • yawns
                    yawns Moderator last edited by yawns

                    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 Reply Quote 1
                    • T
                      Thomas @yawns last edited by

                      @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

                      strawberry 3.141 1 Reply Last reply Reply Quote 0
                      • strawberry 3.141
                        strawberry 3.141 Project Sponsor Module Developer @Thomas last edited by

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

                        .MODULENAME {
                          color: blue;
                        }
                        
                        T 1 Reply Last reply Reply Quote 1
                        • 1
                        • 2
                        • 1 / 2
                        • First post
                          Last post
                        Enjoying MagicMirror? Please consider a donation!
                        MagicMirror created by Michael Teeuw.
                        Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
                        This forum is using NodeBB as its core | Contributors
                        Contact | Privacy Policy