• 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.

After adding MMM-GPIO-Notifications, config.js doesn't work...

Scheduled Pinned Locked Moved Unsolved Troubleshooting
13 Posts 3 Posters 3.4k 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
    tomXGames
    last edited by tomXGames Sep 8, 2019, 9:21 AM Sep 8, 2019, 9:20 AM

    Hi!

    My config.js has an error in it and I’m not able to solve it. Here it is:

    /* 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: "de",
    	timeFormat: 24,
    	units: "metric",
    
    	modules: [
    		{
    			module: "alert",
    		},
    		{
    			module: "updatenotification",
    			position: "top_bar"
    		},
    		{
    			module: "clock",
    			position: "top_left"
    		},
    
    		{
    			module: "newsfeed",
    			position: "bottom_bar",
    			config: {
    				feeds: [
    					{
    						title: "Neue Zürcher Zeitung",
    						url: "https://www.nzz.ch/recent.rss"
    					},
    
    
    				],
    				showSourceTitle: true,
    				showPublishDate: true,
    				broadcastNewsFeeds: true,
    				broadcastNewsUpdates: true
    			}
    		},
    
    		    {
    
          			module: "MMM-CalendarExt",
          			position: "top_left",
          			config: {
            		system: {
              				show: ["daily"],
              				locale: 'de',
              				redrawInterval:60000,
            			},
            			views: {
              				daily: {
                						position:'lower_third',
                						counts:7,
              					},
    
            				},
    
            			defaultCalendar: {
              						maxEntries:50,
              						maxDays:180,
              						interval: 1000*60*5,
            					},
    
            			calendars :[
              					{
                						name: "Tommaso",
                						url: "https://calendar.google.com/calendar/ical/tommaso.peduzzi%40gmx.ch/private-088063fff967db8474e57b3a7cdf176a/basic.ics",
    							profiles: ['Tom'],
              					},
              					{
                						name: "Ferien",
                						url: "https://www.ferienwiki.ch/exports/ferien/2019/ch/basel-stadt",
    							profiles: ['default'],
              					},
    
        
            				],
          				}
        		},    						
    				{
            		module: 'MMM-ProfileSwitcher',
           				config: {
               					// See 'Configuration options' for more information.
        					}
      			},
            {
                module: "currentweather",
                position: "top_right",
                config: {
                  location: "Basel",
                  locationID: "6458763",  //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
                  appid: "123"
              }
            },
            {
                module: "weatherforecast",
                position: "top_right",
                header: "Weather Forecast",
                config: {
                  location: "Basel",
                  locationID: "6458763",  //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
                  appid: "123"
              }
            },
    
    	
    
    
    			{
    			    module: 'MMM-GPIO-Notifications',
    			    config: {
    			        '17': {
    			          gpio_state: 1,
    			          gpio_debounce: 10,
    			          notifications: [
    			            {
    			              notification: "'CURRENT_PROFILE', 'Tom'",
    			              payload: { true }
    			            },
    			            {
    			              notification: 'SCREEN_ON',
    			              payload: { 'forced': false }
    			            }
    			          ]
    			        },
    			        '4': {
    			          gpio_state: 1,
    			          gpio_debounce: 20,
    			          notifications: [
    			            {
    			              'notification': 'SCREEN_TOGGLE',
    			              'payload': { 'forced': true }
    			            }
    			          ]
    			        }
    			    }
    },
    ]
    };
    
    
    /*************** DO NOT EDIT THE LINE BELOW ***************/
    if (typeof module !== "undefined") {module.exports = config;}
    
    
    

    Can anybody help me here?

    tomXGames

    S M 3 Replies Last reply Sep 8, 2019, 11:13 AM Reply Quote 0
    • S Away
      sdetweil @tomXGames
      last edited by Sep 8, 2019, 11:13 AM

      @tomXGames run

      npm check:config
      

      Fix errors top down

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • T Offline
        tomXGames
        last edited by Sep 8, 2019, 11:23 AM

        @sdetweil said in After adding MMM-GPIO-Notifications, config.js doesn't work...:

        npm check:config

        It says, that there is no such command… I’m running it in the MagicMirror directory…

        S 2 Replies Last reply Sep 8, 2019, 12:18 PM Reply Quote 0
        • S Away
          sdetweil @tomXGames
          last edited by Sep 8, 2019, 12:18 PM

          @tomXGames sorry,

          npm config:check

          See list of npm enabled commands in package.json

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          T 1 Reply Last reply Sep 11, 2019, 7:02 PM Reply Quote 0
          • T Offline
            tomXGames @sdetweil
            last edited by Sep 11, 2019, 7:02 PM

            @sdetweil The command still doesn’t work and after adding a comma, nothing is even shown. What am i doing wrong?

            S 2 Replies Last reply Sep 11, 2019, 7:04 PM Reply Quote 0
            • S Away
              sdetweil @tomXGames
              last edited by Sep 11, 2019, 7:04 PM

              @tomXGames you do this command in the MagicMirror folder

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              T 1 Reply Last reply Sep 12, 2019, 4:54 PM Reply Quote 0
              • T Offline
                tomXGames @sdetweil
                last edited by Sep 12, 2019, 4:54 PM

                @sdetweil Yeah that’s what I did

                1 Reply Last reply Reply Quote 0
                • M Offline
                  mumblebaj Module Developer @tomXGames
                  last edited by Sep 12, 2019, 5:13 PM

                  @tomXGames THis certainly doesn’t look right:
                  notification: "'CURRENT_PROFILE', 'Tom'",

                  Check out my modules at: https://github.com/mumblebaj?tab=repositories

                  1 Reply Last reply Reply Quote 0
                  • S Away
                    sdetweil @tomXGames
                    last edited by Sep 12, 2019, 5:17 PM

                    @tomXGames what do u mean by doesn’t work?

                    Black screen could indicate another problem
                    Are u using pm2?
                    If so, pm2 logs to see what the output is.

                    Also, dev mode

                    pm2 stop 0
                    cd ~/MagicMirror
                    npm start dev
                    

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    1 Reply Last reply Reply Quote 0
                    • M Offline
                      mumblebaj Module Developer @tomXGames
                      last edited by Sep 12, 2019, 5:27 PM

                      @tomXGames IF not mistaken, the “,” after the last module should not be there either.

                      Check out my modules at: https://github.com/mumblebaj?tab=repositories

                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 1 / 2
                      1 / 2
                      • First post
                        1/13
                        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