Now I added the configuration in config.js as followings:
modules: [
{
module: 'MMM-Logging',
classes: 'default everyone',
config: {
}
},
{
module: "alert",
classes: 'default everyone'
},
{
module: "updatenotification",
position: "top_bar",
classes: 'default everyone'
},
{
module: "compliments",
position: "lower_third",
classes: 'Xueping',
config: {
compliments: {
anytime: [
"Hello!THIS IS TESTING!"
],
}
}
},
{
module: "clock",
position: "top_left",
classes: 'everyone'
},
{
module: 'MMM-Facial-Recognition',
position: "top_right",
config: {
// 1=LBPH | 2=Fisher | 3=Eigen
recognitionAlgorithm: 1,
lbphThreshold: 50,
fisherThreshold: 250,
eigenThreshold: 3000,
alwaysShowLeave: false,
useUSBCam: false,
trainingFile: '/home/pi/MagicMirror/modules/MMM-Facial-Recognition-Tools/training.xml',
interval: 2,
logoutDelay: 30,
users: ['Xueping'],
defaultClass: "default",
everyoneClass: "everyone",
welcomeMessage: true,
}
},
{
module: 'MMM-ProfileSwitcher',
config: {
// Disable the enter messages for everyone but me and Kevin
enterMessages: {
"Xueping": "Hello :D", // Kevin has a custom message
"everyone": "Hello :D",
"default": "No Users were detected"
},
// Everyone has a custom message
leaveMessages: {
// %profile% will be replaced with the correct name
"everyone": "Hey %person%, already leaving?",
// I have a custom and the default message
// this is not the same as everyone since we changed it
"Xueping": ["Bye bye!"],
"default": "Goodbye"
}
}
},
{
module: "MMM-ping",
position: "bottom_right",
classes: 'default',
config: {
colored: true,
font: "xsmall",
updateInterval: 1,
hosts: [
"192.168.1.1",
"forum.magicmirror.builders"
]
}
},
]
When I run MagicMirror, the screen layout changed from default classes mode into user classes mode. the icons, which is in default classes mode, disappeared as I want. BUT in user classes mode, the very modes (compliments) did not appeared! the whole screen is still black.
The whole process log is as following:
2019-03-15T15:08:50 <log> [MMM-Facial-Recognition] Facerecognition started... (/home/pi/MagicMirror/modules/MMM-Facial-Recognition/node_helper.js:16 PythonShell.<anonymous>)
2019-03-15T15:08:50 <log> [MMM-Facial-Recognition] Loading training data... (/home/pi/MagicMirror/modules/MMM-Facial-Recognition/node_helper.js:16 PythonShell.<anonymous>)
2019-03-15T15:08:50 <log> [MMM-Facial-Recognition] ALGORITHM: LBPH (/home/pi/MagicMirror/modules/MMM-Facial-Recognition/node_helper.js:16 PythonShell.<anonymous>)
2019-03-15T15:08:55 <log> [MMM-Facial-Recognition] Training data loaded! (/home/pi/MagicMirror/modules/MMM-Facial-Recognition/node_helper.js:16 PythonShell.<anonymous>)
2019-03-15T15:08:55 <log> [MMM-Facial-Recognition] -------------------- (/home/pi/MagicMirror/modules/MMM-Facial-Recognition/node_helper.js:16 PythonShell.<anonymous>)
2019-03-15T15:08:55 <log> [MMM-Facial-Recognition] PiCam ausgewählt... (/home/pi/MagicMirror/modules/MMM-Facial-Recognition/node_helper.js:16 PythonShell.<anonymous>)
2019-03-15T15:09:07 <log> [MMM-Facial-Recognition] User Xueping with confidence 29.2076146738 logged in. (/home/pi/MagicMirror/modules/MMM-Facial-Recognition/node_helper.js:19 PythonShell.<anonymous>)
[3656:0315/150907.528143:INFO:CONSOLE(205)] "MMM-ping is resumed.", source: http://10.133.26.219:8080/js/module.js (205)
[3656:0315/150907.532130:INFO:CONSOLE(154)] "clock received a module notification: CURRENT_USER from sender: MMM-Facial-Recognition", source: http://10.133.26.219:8080/js/module.js (154)
[3656:0315/150907.533400:INFO:CONSOLE(154)] "MMM-ping received a module notification: CURRENT_USER from sender: MMM-Facial-Recognition", source: http://10.133.26.219:8080/js/module.js (154)
2019-03-15T15:09:07 <log> payload: undefined (/home/pi/MagicMirror/modules/MMM-Logging/node_helper.js:34 Class.socketNotificationReceived)
[3656:0315/150907.543631:INFO:CONSOLE(205)] "compliments is resumed.", source: http://10.133.26.219:8080/js/module.js (205)
[3656:0315/150907.544869:INFO:CONSOLE(275)] "Will not show compliments. LockStrings active: module_6_MMM-ProfileSwitcher", source: http://10.133.26.219:8080/js/main.js (275)
[3656:0315/150907.545862:INFO:CONSOLE(154)] "clock received a module notification: CURRENT_USER from sender: MMM-Facial-Recognition", source: http://10.133.26.219:8080/js/module.js (154)
[3656:0315/150907.546709:INFO:CONSOLE(154)] "MMM-ping received a module notification: CURRENT_USER from sender: MMM-Facial-Recognition", source: http://10.133.26.219:8080/js/module.js (154)
[3656:0315/150907.552615:INFO:CONSOLE(154)] "clock received a module notification: SHOW_ALERT from sender: MMM-Facial-Recognition", source: http://10.133.26.219:8080/js/module.js (154)
[3656:0315/150907.554160:INFO:CONSOLE(154)] "MMM-ping received a module notification: SHOW_ALERT from sender: MMM-Facial-Recognition", source: http://10.133.26.219:8080/js/module.js (154)
2019-03-15T15:09:07 <log> payload: undefined (/home/pi/MagicMirror/modules/MMM-Logging/node_helper.js:34 Class.socketNotificationReceived)
2019-03-15T15:09:07 <log> payload: undefined (/home/pi/MagicMirror/modules/MMM-Logging/node_helper.js:34 Class.socketNotificationReceived)
[3656:0315/150908.582237:INFO:CONSOLE(198)] "MMM-ping is suspended.", source: http://10.133.26.219:8080/js/module.js (198)
[3656:0315/150908.587425:INFO:CONSOLE(60)] "MMM-ping is hidden.", source: http://10.133.26.219:8080/modules/MMM-Facial-Recognition//MMM-Facial-Recognition.js (60)
2019-03-15T15:11:08 <log> [MMM-Facial-Recognition] User Xueping logged out. (/home/pi/MagicMirror/modules/MMM-Facial-Recognition/node_helper.js:23 PythonShell.<anonymous>)
[3656:0315/151108.702056:INFO:CONSOLE(205)] "MMM-ping is resumed.", source: http://10.133.26.219:8080/js/module.js (205)
[3656:0315/151108.712169:INFO:CONSOLE(154)] "clock received a module notification: CURRENT_USER from sender: MMM-Facial-Recognition", source: http://10.133.26.219:8080/js/module.js (154)
[3656:0315/151108.712959:INFO:CONSOLE(154)] "MMM-ping received a module notification: CURRENT_USER from sender: MMM-Facial-Recognition", source: http://10.133.26.219:8080/js/module.js (154)
2019-03-15T15:11:08 <log> payload: undefined (/home/pi/MagicMirror/modules/MMM-Logging/node_helper.js:34 Class.socketNotificationReceived)
[3656:0315/151109.703213:INFO:CONSOLE(198)] "compliments is suspended.", source: http://10.133.26.219:8080/js/module.js (198)
[3656:0315/151109.703561:INFO:CONSOLE(78)] "compliments is hidden.", source: http://10.133.26.219:8080/modules/MMM-Facial-Recognition//MMM-Facial-Recognition.js (78)
[3656:0315/151109.709930:INFO:CONSOLE(84)] "MMM-ping is shown.", source: http://10.133.26.219:8080/modules/MMM-Facial-Recognition//MMM-Facial-Recognition.js (84)
^C
pi@MagicMirror2:~/MagicMirror $
Could anyone give me some suggestions? Thanks in advance.
I got it.
The class default is shown on startup, the class everyone is shown for all profiles, the class user is shown when the modules recognize a special face.
Hi Guys,
I have installed and configured MMM-Facial-Recognition-Tools, MMM-Facial-Recognition and MMM-ProfileSwitcher. I passed the facerecognition.py test:
Now I added the configuration in config.js as followings:
When I run MagicMirror, the screen layout changed from default classes mode into user classes mode. the icons, which is in default classes mode, disappeared as I want. BUT in user classes mode, the very modes (compliments) did not appeared! the whole screen is still black.
The whole process log is as following:
Could anyone give me some suggestions? Thanks in advance.