@roramirez Yup, MMM-Facial-Recognition is the module I trained and used. It works and I can’t wait to tinker with it!
Read the statement by Michael Teeuw here.
Posts
-
RE: RPi2, 3 picture frames, an old laptop LCD, and more to come...
-
RPi2, 3 picture frames, an old laptop LCD, and more to come...
http://stanleychan.me/post/155933950396/mira-magicmirror-i-finally-got-around-to’
I’m working on facial recognition as well as opening up a web facing API to connect Mira (I gave it a name) to my Amazon Echo Dot.
Thoughts?
-
Check to see if file (ex. custom.css) exists before trying to load it.
I, like (I assume) many of RPi tinkerers and hackers, make code changes on my desktop or laptop and then use git to push new code to the RPi. Since MagicMirror doesn’t track css/custom.css, the mirror fails to load up if the file is missing.
I tried to come up with a PR to have the loader.js file check if the file exists before appending it to index.html. However, since this is client side JavaScript, it does not have access to the file system and can’t use the
fs
JavaScript module.I then tried to use code like:
var fileDoesNotExist= function(url) { var http = new XMLHttpRequest(); http.open("HEAD", url, false); http.send(); return http.status==404; }
to do an http request to the server for the file, but realized that it’s just as bad as the actual http request that tries to load the file and will result in the same errors.
So, I’m posting this here in case anyone has ideas and can help me with creating a PR to solve this problem. It’s not really a bug and not really a feature. Just an error check that’s missing.
Thanks.
-
RE: MMM-Facial-Recognition cannot sendSocketNotification()
UPDATE: This, like some other issues I was running into was actually caused by the application freezing when it could not load ‘css/custom.css’.
This is because the .gitignore does not track custom.css and I, like many others, edit my code on my desktop and then push the changes via git to my RPi.
-
MMM-Facial-Recognition cannot sendSocketNotification()
Hi,
I’m trying to get the troubleshoot the MMM-Facial-Recognition module, and I have narrowed it down to the node_helper not being able to sendSocketNotification().
I added a line to socketNotifcationRecieved() within the node_helper.js file to test this.
// Subclass socketNotificationReceived received. socketNotificationReceived: function(notification, payload) { if(notification === 'CONFIG') { this.config = payload if(!pythonStarted) { pythonStarted = true; // I ADDED THE FOLLOWING LINE: this.sendSocketNotification("Test", "sendSocketNotification to module"); this.python_start(); }; }; },
and then I also added a console.log to the MMM-Facial-Recognition.js to print out any received socket Notifications.
socketNotificationReceived: function(notification, payload) { //For testing purposes console.log(notification)
However, nothing prints out in the console.
I am troubleshooting this, because even though the module recognizes my face and logs me in, no alert comes up on the mirror and none of the modules update.
Note: The module itself is able to sendSocketNotification to the node_helper because the python_shell does start and the recognition python script runs with the correct configuration.
Thank you in advance for your help.