MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. jthirasilpa
    3. Posts
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    J
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 29
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: MMM-NetworkScanner-loading...indefinitely

      Thanks - I did change the config to add one device “JoJo” with an IpAddress and I changed “Millie” from IpAddress to MacAddress (I am guessing that is why it is not showing in the ping result - but am not sure). I did not make any other changes to the config (apart from adding the debug line). There is no other bottom_center module and it clearly displays Devices Online “Loading…”, so I don’t think it’s the case that entries are being pushed off the page.

       {
      139                         module:                 "MMM-NetworkScanner",
      140                         position:               "bottom_center",
      141                         header:                 "Devices Online",
      142                         config: {
      143                                 devices: [
      144                                 { ipAddress: "192.168.1.11", name: "Champagne", icon: "server"},
      145                                 { macAddress: "xxxx", name: "Millie", icon: "server"},
      146                                 { ipAddress: "192.168.1.17", name:  "Marmite", icon:  "server"},
      147                                 { ipAddress: "192.168.1.70", name: "JoJo", icon: "male"}
      148                                 ],
      149                                 showUnknown: false,
      150                                 showOffline:  true,
      151                                 keepAlive:  600,
      152                                 showLastSeen:  true,
      153                                 updateInterval:  30,
      154                                 debug: true,
      155                                 Password:  'xxxx'
      156                                 }
      157                 },
      
      posted in Troubleshooting
      J
      jthirasilpa
    • RE: MMM-NetworkScanner-loading...indefinitely

      Thanks. Scan seems to find some devices, but does not display them on Mirror.

      Here is output log:

      [20:41:24.611] [LOG]    MMM-NetworkScanner is performing arp-scan
      [20:41:24.650] [LOG]    MMM-NetworkScanner is performing ip address scan
      [20:41:24.651] [LOG]    MMM-NetworkScanner is checking device:  Champagne
      [20:41:24.651] [LOG]    MMM-NetworkScanner is pinging  192.168.1.11
      [20:41:24.666] [LOG]    MMM-NetworkScanner is checking device:  Millie
      [20:41:24.667] [LOG]    MMM-NetworkScanner is checking device:  Marmite
      [20:41:24.667] [LOG]    MMM-NetworkScanner is pinging  192.168.1.17
      [20:41:24.690] [LOG]    MMM-NetworkScanner is checking device:  JoJo
      [20:41:24.691] [LOG]    MMM-NetworkScanner is pinging  192.168.1.70
      [20:41:24.705] [LOG]    MMM-NetworkScanner completed SCAN_NETWORK
      [20:41:24.707] [LOG]    MMM-NetworkScanner ping result:  [ 'Champagne', true ]
      [20:41:26.741] [LOG]    MMM-NetworkScanner ping result:  [ 'Marmite', false ]
      [20:41:26.743] [LOG]    MMM-NetworkScanner ping result:  [ 'JoJo', false ]
      [20:41:54.605] [LOG]    MMM-NetworkScanner received SCAN_NETWORK
      [20:41:54.605] [LOG]    MMM-NetworkScanner is performing arp-scan
      [20:41:54.630] [LOG]    MMM-NetworkScanner is performing ip address scan
      [20:41:54.631] [LOG]    MMM-NetworkScanner is checking device:  Champagne
      [20:41:54.631] [LOG]    MMM-NetworkScanner is pinging  192.168.1.11
      [20:41:54.644] [LOG]    MMM-NetworkScanner is checking device:  Millie
      [20:41:54.645] [LOG]    MMM-NetworkScanner is checking device:  Marmite
      [20:41:54.645] [LOG]    MMM-NetworkScanner is pinging  192.168.1.17
      [20:41:54.658] [LOG]    MMM-NetworkScanner is checking device:  JoJo
      [20:41:54.659] [LOG]    MMM-NetworkScanner is pinging  192.168.1.70
      [20:41:54.672] [LOG]    MMM-NetworkScanner completed SCAN_NETWORK
      [20:41:54.675] [LOG]    MMM-NetworkScanner ping result:  [ 'Champagne', true ]
      [20:41:56.706] [LOG]    MMM-NetworkScanner ping result:  [ 'Marmite', false ]
      [20:41:56.707] [LOG]    MMM-NetworkScanner ping result:  [ 'JoJo', false ]
      

      Error log:

      [20:35:38.953] [ERROR]  (node:20348) MaxListenersExceededWarning: Possible Event                                                                                                                                                             Emitter memory leak detected. 11 error listeners added. Use emitter.setMaxListen                                                                                                                                                             ers() to increase limit
      [20:35:38.953] [ERROR]  (node:20348) MaxListenersExceededWarning: Possible Event                                                                                                                                                             Emitter memory leak detected. 11 end listeners added. Use emitter.setMaxListener                                                                                                                                                             s() to increase limit
      [20:35:38.954] [ERROR]  (node:20348) MaxListenersExceededWarning: Possible Event                                                                                                                                                             Emitter memory leak detected. 11 drain listeners added. Use emitter.setMaxListen                                                                                                                                                             ers() to increase limit
      [20:35:38.954] [ERROR]  (node:20348) MaxListenersExceededWarning: Possible Event                                                                                                                                                             Emitter memory leak detected. 11 close listeners added. Use emitter.setMaxListen                                                                                                                                                             ers() to increase limit
      [20:35:38.955] [ERROR]  (node:20348) MaxListenersExceededWarning: Possible Event                                                                                                                                                             Emitter memory leak detected. 11 data listeners added. Use emitter.setMaxListene                                                                                                                                                             rs() to increase limit
      
      posted in Troubleshooting
      J
      jthirasilpa
    • RE: MMM-NetworkScanner-loading...indefinitely

      @sdetweil
      Thanks Sam

      Tried update. Error log below:

      [11:45:29.130] [ERROR]  TypeError: Cannot read property 'network' of undefined
          at Class.scanNetworkMAC (/home/jojo/MagicMirror/modules/MMM-NetworkScanner/node_helper.js:46:36)
          at Class.socketNotificationReceived (/home/jojo/MagicMirror/modules/MMM-NetworkScanner/node_helper.js:33:18)
          at Socket.<anonymous> (/home/jojo/MagicMirror/js/node_helper.js:113:11)
          at Socket.emit (events.js:198:13)
          at /home/jojo/MagicMirror/node_modules/socket.io/lib/socket.js:528:12
          at process._tickCallback (internal/process/next_tick.js:61:11)
      

      Node_helper code:

              // Target hosts/network supplied in config or entire localnet
       46         var arpHosts = self.config.network || '-l';
       47                                 var options = {
       48                                                 cachePassword: true,
       49                                                 prompt: 'Password,' + self.config.Password     // put your password where ???? are (notice the quotes around)
       50                                 }
       51         var arp = sudo(['arp-scan', '-q', arpHosts]) //, options);
      

      Module entry in config.js:

                      {
      139                         module:                 "MMM-NetworkScanner",
      140                         position:               "bottom_center",
      141                         header:                 "Devices Online",
      142                         config: {
      143                                 devices: [
      144                                 { ipAddress: "192.168.1.11", name: "Champagne", icon: "server"},
      145                                 { ipAddress: "192.168.1.15", name: "Millie", icon: "server"},
      146                                 { ipAddress: "192.168.1.17", name:  "Marmite", icon:  "server"}
      147                                 ],
      148                                 showUnknown: false,
      149                                 showOffline:  true,
      150                                 keepAlive:  600,
      151                                 showLastSeen:  true,
      152                                 updateInterval:  30,
      153                                 Password:  'xxxx'
      154                                 }
      155                 },
      
      posted in Troubleshooting
      J
      jthirasilpa
    • RE: MMM-NetworkScanner-loading...indefinitely

      @sdetweil
      Hi Sam - thanks I tried the update. Still getting the same error - from the log:

      [19:00:49.868] [ERROR]  TypeError: Cannot read property 'network' of undefined
          at Class.scanNetworkMAC (/home/jojo/MagicMirror/modules/MMM-NetworkScanner/node_helper.js:42:36)
          at Class.socketNotificationReceived (/home/jojo/MagicMirror/modules/MMM-NetworkScanner/node_helper.js:30:18)
          at Socket.<anonymous> (/home/jojo/MagicMirror/js/node_helper.js:113:11)
          at Socket.emit (events.js:198:13)
          at /home/jojo/MagicMirror/node_modules/socket.io/lib/socket.js:528:12
          at process._tickCallback (internal/process/next_tick.js:61:11)
      
      posted in Troubleshooting
      J
      jthirasilpa
    • RE: MMM-NetworkScanner-loading...indefinitely

      That is how the config looks.

      Still getting the node_helper line 42 error. Will park this for now. Thank you for spending so much time on this Sam - much appreciated. Will come back to this later in the week.

      posted in Troubleshooting
      J
      jthirasilpa
    • RE: MMM-NetworkScanner-loading...indefinitely

      Hmm

      So with the password entered only in the config file, the error output still references line 42

       var arpHosts = this.config.network || '-l';
      

      Error output:

      0|mm       | [19:37:36.956] [ERROR]  TypeError: Cannot read property 'network' of undefined
      0|mm       |     at Class.scanNetworkMAC (/home/jojo/MagicMirror/modules/MMM-NetworkScanner/node_helper.js:42:36)
      0|mm       |     at Class.socketNotificationReceived (/home/jojo/MagicMirror/modules/MMM-NetworkScanner/node_helper.js:30:18)
      0|mm       |     at Socket.<anonymous> (/home/jojo/MagicMirror/js/node_helper.js:113:11)
      0|mm       |     at Socket.emit (events.js:198:13)
      0|mm       |     at /home/jojo/MagicMirror/node_modules/socket.io/lib/socket.js:528:12
      0|mm       |     at process._tickCallback (internal/process/next_tick.js:61:11)
      
      0|mm  | [19:37:50.982] [LOG]    MMM-NetworkScanner received SCAN_NETWORK
      0|mm  | [19:37:50.983] [LOG]    MMM-NetworkScanner is performing arp-scan
      0|mm  | [19:37:50.984] [LOG]    Whoops! There was an uncaught exception...
      0|mm  | [19:37:50.984] [ERROR]
      0|mm  | TypeError: Cannot read property 'network' of undefined
      0|mm  |     at Class.scanNetworkMAC (/home/jojo/MagicMirror/modules/MMM-NetworkScanner/node_helper.js:42:36)
      0|mm  |     at Class.socketNotificationReceived (/home/jojo/MagicMirror/modules/MMM-NetworkScanner/node_helper.js:30:18)
      0|mm  |     at Socket.<anonymous> (/home/jojo/MagicMirror/js/node_helper.js:113:11)
      0|mm  |     at Socket.emit (events.js:198:13)
      0|mm  |     at /home/jojo/MagicMirror/node_modules/socket.io/lib/socket.js:528:12
      0|mm  |     at process._tickCallback (internal/process/next_tick.js:61:11)
      0|mm  | [19:37:50.985] [LOG]
      0|mm  | MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
      0|mm  | [19:37:50.986] [LOG]    If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
      0|mm  | [19:38:21.046] [LOG]
      0|mm  | MMM-NetworkScanner received SCAN_NETWORK
      0|mm  | [19:38:21.047] [LOG]
      0|mm  | MMM-NetworkScanner is performing arp-scan
      0|mm  | [19:38:21.048] [LOG]    Whoops! There was an uncaught exception...
      0|mm  | [19:38:21.048] [ERROR]
      0|mm  | TypeError: Cannot read property 'network' of undefined
      0|mm  |     at Class.scanNetworkMAC (/home/jojo/MagicMirror/modules/MMM-NetworkScanner/node_helper.js:42:36)
      0|mm  |     at Class.socketNotificationReceived (/home/jojo/MagicMirror/modules/MMM-NetworkScanner/node_helper.js:30:18)
      0|mm  |     at Socket.<anonymous> (/home/jojo/MagicMirror/js/node_helper.js:113:11)
      0|mm  |     at Socket.emit (events.js:198:13)
      0|mm  |     at /home/jojo/MagicMirror/node_modules/socket.io/lib/socket.js:528:12
      0|mm  |     at process._tickCallback (internal/process/next_tick.js:61:11)
      
      posted in Troubleshooting
      J
      jthirasilpa
    • RE: MMM-NetworkScanner-loading...indefinitely

      Sorry I’m not being clear. I know that I need to modify the config.js (and have done so), but in line 45 of node_helper.js (as shown below) there is:

       prompt: 'Password,' + this.config.Password     // put your password where ???? are (notice the quotes around)
      

      Should I leave this as is or fill in the password? That is where I have tried it both ways.

      Code you asked for from node_helper.js:

          scanNetworkMAC: function() {
       38         this.log(this.name + " is performing arp-scan");
       39
       40         var self = this;
       41         // Target hosts/network supplied in config or entire localnet
       42         var arpHosts = this.config.network || '-l';
       43                                 var options = {
       44                                                 cachePassword: true,
       45                                                 prompt: 'Password,' + this.config.Password     // put your password where ???? are (notice the quotes around)
       46                                 }
       47         var arp = sudo(['arp-scan', '-q', arpHosts], options);
      
      posted in Troubleshooting
      J
      jthirasilpa
    • RE: MMM-NetworkScanner-loading...indefinitely

      @sdetweil
      I tried it both ways - but should the ‘password’ field in the helper file be filled in?

      posted in Troubleshooting
      J
      jthirasilpa
    • RE: MMM-NetworkScanner-loading...indefinitely

      @karsten13
      Hi - it seems to function correctly - it returns the IP and MAC addresses of the various clients on the network.

      posted in Troubleshooting
      J
      jthirasilpa
    • RE: MMM-NetworkScanner-loading...indefinitely

      @sdetweil
      Thanks Sam - tried your version of the module and modified the config.js accordingly. Still not quite working. Error logs as follows:

      0|mm       |     at process._tickCallback (internal/process/next_tick.js:61:11)
      0|mm       | [09:41:25.508] [ERROR]  ReferenceError: options is not defined
      0|mm       |     at Class.scanNetworkMAC (/home/jojo/MagicMirror/modules/MMM-NetworkScanner/node_helper.js:42:54)
      0|mm       |     at Class.socketNotificationReceived (/home/jojo/MagicMirror/modules/MMM-NetworkScanner/node_helper.js:29:18)
      0|mm       |     at Socket.<anonymous> (/home/jojo/MagicMirror/js/node_helper.js:113:11)
      0|mm       |     at Socket.emit (events.js:198:13)
      0|mm       |     at /home/jojo/MagicMirror/node_modules/socket.io/lib/socket.js:528:12
      0|mm       |     at process._tickCallback (internal/process/next_tick.js:61:11)
      0|mm       | [09:41:55.508] [ERROR]  ReferenceError: options is not defined
      0|mm       |     at Class.scanNetworkMAC (/home/jojo/MagicMirror/modules/MMM-NetworkScanner/node_helper.js:42:54)
      0|mm       |     at Class.socketNotificationReceived (/home/jojo/MagicMirror/modules/MMM-NetworkScanner/node_helper.js:29:18)
      0|mm       |     at Socket.<anonymous> (/home/jojo/MagicMirror/js/node_helper.js:113:11)
      0|mm       |     at Socket.emit (events.js:198:13)
      0|mm       |     at /home/jojo/MagicMirror/node_modules/socket.io/lib/socket.js:528:12
      0|mm       |     at process._tickCallback (internal/process/next_tick.js:61:11)
      
      posted in Troubleshooting
      J
      jthirasilpa
    • 1 / 1