ianperrin / MMM-NetworkScanner

A module for MagicMirror which determines the status of devices on the network based on their MAC or IP address

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeError: this.log is not a function

pyrosmiley opened this issue · comments

So for me this module is only displaying "Loading ..." instead of, you know, not that. Running the latest version of MM. I ran node serveronly on a console and it threw this error on every refresh:

    at ChildProcess.<anonymous> (/home/pi/MagicMirror/modules/MMM-NetworkScanner/node_helper.js:63:22)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:920:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:230:5)

I have tried removing and reinstalling, and I've quadruple checked my config. I even tried running serveronly under sudo (not that I expected it to change anything, but 🤷‍♂️ might as well) to no avail.

At some point I'll try to sort through the code myself, but to be honest my only java/nodejs experience is setting up the MM config, so there's not a whole lot I know how to do. Not sure how to reproduce the error outside of my setup but I'm happy to help however I can!

Same problem Buddy!!

I had the same issue. I was seeing a 'null' notification on line 145 of NetScanner.js

As a hack, I changed the defaults for this at the top of Networker.js

 occupiedCMD:  {notification: 'TEST', payload: {action: 'occupiedCMD'}},
  vacantCMD:  {notification: 'TEST', payload: {action: 'vacantCMD'}},

Seems to work now for me.

I guess, this should go in the config.js

I would also be nice to see the 'ip' of the devices found using mac address....

commented

The Type Error: this.log is not a function is potentially fixed by 8c82835

Do try updating to the latest version and testing to see if you're problem is cured.

If you have other issues (or suggestions) please do add them as separate issues.