Navigation

    MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord
    MagicMirror² v2.15.0 is available! For more information about this release, check out this topic.

    SOLVED MMM-Facial-Recognition cannot sendSocketNotification()

    Troubleshooting
    mmm-facial-recognition paviro
    1
    2
    1341
    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
      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
        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
        • 1 / 1
        • First post
          Last post
        Enjoying MagicMirror? Please consider a donation!
        MagicMirror created by Michael Teeuw.
        Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
        This forum is using NodeBB as its core | Contributors
        Contact | Privacy Policy