How to get the MAC-address of Raspi in Javascript?
Another device-related unique identifier would also do...
Getting MAC-address or alike in JS
Re: Getting MAC-address or alike in JS
Code: Select all
host = system("hostname -I");
see hostname --help for other options
Re: Getting MAC-address or alike in JS
Thanks, you pointed me to the right direction!
I ended up using this:
As soon as `cat` was not registered in `.syscommands`, I put it in and it worked like charm
I ended up using this:
Code: Select all
var mac = system( 'cat /sys/class/net/eth0/address' )[ 1 ].trim();