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

Help with config and adding modules

Scheduled Pinned Locked Moved Troubleshooting
7 Posts 2 Posters 2.4k Views 2 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.
  • M Offline
    mrfloppy88
    last edited by May 1, 2017, 12:07 PM

    after trying to add a face recognition my config is broken

    can someone help me out?

    p.s. i had to use the sample file, as i broke the original config before
    i copied it to overwrite config.js and reapplied my edits

    /* 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"], // Set [] to allow all IP addresses.
    
    language: "nl",
    timeFormat: 24,
    units: "metric",
    
    modules: [
    	{
    		module: 'MMM-Facial-Recognition',
    		config: {
    			// 1=LBPH | 2=Fisher | 3=Eigen
    			recognitionAlgorithm: 1,
    			// Threshold for the confidence of a recognized face before it's considered a
    			// positive match.  Confidence values below this threshold will be considered
    			// a positive match because the lower the confidence value, or distance, the
    			// more confident the algorithm is that the face was correctly detected.
    			lbphThreshold: 50,
    			fisherThreshold: 250,
    			eigenThreshold: 3000,
    			// force the use of a usb webcam on raspberry pi (on other platforms this is always true automatically)
    			useUSBCam: false,
    			// Path to your training xml
    			trainingFile: 'modules/MMM-Facial-Recognition/training.xml',
    			// recognition intervall in seconds (smaller number = faster but CPU intens!)
    			interval: 2,
    			// Logout delay after last recognition so that a user does not get instantly logged out if he turns away from the mirror for a few seconds
    			logoutDelay: 15,
    			// Array with usernames (copy and paste from training script)
    			users: [],
    			//Module set used for strangers and if no user is detected
    			defaultClass: "default",
    			//Set of modules which should be shown for every user
    			everyoneClass: "everyone",
    			// Boolean to toggle welcomeMessage
    			welcomeMessage: true
    		}
    	}
    		module: "alert",
    	},
    	{
    		module: "updatenotification",
    		position: "top_bar"
    	},
    	{
    		module: "clock",
    		position: "top_left"
    	},
    	{
    		module: "calendar",
    		header: "Feestdagen",
    		position: "top_left",
    		config: {
    			calendars: [
    				{
    					symbol: "calendar-check-o ",
    					url: "webcal://ical.mac.com/ical/Dutch32Holidays.ics"
    				}
    			]
    		}
    	},
    	{
    		module: "compliments",
    		position: "lower_third"
    	},
    	{
    		module: "currentweather",
    		position: "top_right",
    		config: {
    			location: "Best",
    			locationID: "2759040",  //ID from http://www.openweathermap.org/help/city_list.txt
    			appid: "XXX"
    		}
    	},
    	{
    		module: "weatherforecast",
    		position: "top_right",
    		header: "Weather Forecast",
    		config: {
    			location: "Best",
    			locationID: "2759040",  //ID from http://www.openweathermap.org/help/city_list.txt
    			appid: "XXX"
    		}
    	},
    	{
    		module: "newsfeed",
    		position: "bottom_bar",
    		config: {
    			feeds: [
    				{
    					title: "Eindhovens Dagblad",
    					url: "http://www.ed.nl/best-e-o/rss.xml"
    				}
    			],
    			showSourceTitle: true,
    			showPublishDate: true
    		}
    	},
    ]
    

    };

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

    1 Reply Last reply Reply Quote 0
    • C Offline
      cowboysdude Module Developer
      last edited by cowboysdude May 1, 2017, 12:17 PM May 1, 2017, 12:11 PM

      Missing a coma right after and just before alert module and the starting bracket for the next module… :)

             {
      	module: 'MMM-Facial-Recognition',
      	config: {
      		// 1=LBPH | 2=Fisher | 3=Eigen
      		recognitionAlgorithm: 1,
      		// Threshold for the confidence of a recognized face before it's considered a
      		// positive match.  Confidence values below this threshold will be considered
      		// a positive match because the lower the confidence value, or distance, the
      		// more confident the algorithm is that the face was correctly detected.
      		lbphThreshold: 50,
      		fisherThreshold: 250,
      		eigenThreshold: 3000,
      		// force the use of a usb webcam on raspberry pi (on other platforms this is always true automatically)
      		useUSBCam: false,
      		// Path to your training xml
      		trainingFile: 'modules/MMM-Facial-Recognition/training.xml',
      		// recognition intervall in seconds (smaller number = faster but CPU intens!)
      		interval: 2,
      		// Logout delay after last recognition so that a user does not get instantly logged out if he turns away from the mirror for a few seconds
      		logoutDelay: 15,
      		// Array with usernames (copy and paste from training script)
      		users: [],
      		//Module set used for strangers and if no user is detected
      		defaultClass: "default",
      		//Set of modules which should be shown for every user
      		everyoneClass: "everyone",
      		// Boolean to toggle welcomeMessage
      		welcomeMessage: true
      	}
          },
          {
          module: "alert",
      },
      
      1 Reply Last reply Reply Quote 1
      • M Offline
        mrfloppy88
        last edited by mrfloppy88 May 1, 2017, 12:18 PM May 1, 2017, 12:15 PM

        im sorry… but that did not help

        could you show me the the lines as they should be?

        https://pastebin.com/b6hpEDzc this might be easier to read

        C 1 Reply Last reply May 1, 2017, 12:17 PM Reply Quote 0
        • C Offline
          cowboysdude Module Developer @mrfloppy88
          last edited by cowboysdude May 1, 2017, 12:19 PM May 1, 2017, 12:17 PM

          @mrfloppy88 That’s because I missed the starting bracket to the next module… I corrected it… try that :)

          In the future to avoid issues backup your working config.js to config.bak because you know that works then add your module :)

          Also put your config.js through this -> http://jshint.com/
          It will tell you where your issue is :)

          1 Reply Last reply Reply Quote 1
          • M Offline
            mrfloppy88
            last edited by May 1, 2017, 12:20 PM

            thanks, yes i backup after every successfull edit ^^

            1 Reply Last reply Reply Quote 1
            • M Offline
              mrfloppy88
              last edited by May 1, 2017, 12:29 PM

              damn, after that edit it just shows black

              i tried the jshint, but i dont understand why it would be expecting some characters

              are you familliar with the face recognition module?

              https://pastebin.com/640sLwqB

              C 1 Reply Last reply May 1, 2017, 12:45 PM Reply Quote 0
              • C Offline
                cowboysdude Module Developer @mrfloppy88
                last edited by May 1, 2017, 12:45 PM

                @mrfloppy88 No, not at all. I’m sure someone here does. If you take it out and it works again I would leave it out and do some forum searching to see if others had the same issues :)

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