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.

    MMM-Facial-Recognition cannot sendSocketNotification()

    Scheduled Pinned Locked Moved Solved Troubleshooting
    mmm-facial-recognitionpaviro
    2 Posts 1 Posters 2.0k Views 1 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.
    • S Offline
      stanchan
      last edited by

      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.

      S 1 Reply Last reply Reply Quote 0
      • S Offline
        stanchan @stanchan
        last edited by

        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.

        1 Reply Last reply Reply Quote 1

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • 1 / 1
        • First post
          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