
Originally Posted by
Misj'
The short answer is: you can't. Sharing MAC addresses is generally considered a security risk; and is (therefore (and for other reasons)) not available from within Javascript.
The longer answer is: you could write a NodeJS service that might be able to call a native executable like ifconfig (if calling native executables from the App's jail is allowed on the WebOS TV's...which I doubt), then read its output and interpret it accordingly. There are a lot of if's for this solution; and I doubt it's viable. But it's basically the only semi-realistic thing you could try in my opinion.
To be honest, I would stick to the short answer...if only because I don't trust API's that require MAC addresses.
If you really do need the MAC address I think users should enter it manually; if only to make sure they opt-in in sharing this information with a third-party.
Ps. I'm not addressing PHP solutions where you make a call to a server, because that can only (theoretically) work if said server is on the same local network as the TV...so that would not be a viable solution either is just about every case.
Pps. I am curious which API you're using that requires a MAC address.
I tend to disagree here 
It seems that webos-connman-adapter can give you the MAC address. At least in LuneOS/webOS OSE it does 
Code:
luna-send -n 1 luna://com.palm.connectionmanager/getinfo '{}'
gives
Code:
{"wiredInfo":{"macAddress":"08:00:27:D0:55:22"},"returnValue":true}
At least that's on LuneOS VirtualBox emulator. On webOS OSE/webOS TV you might need to do:
Code:
luna://com.webos.connectionmanager/getinfo '{}'
as per https://github.com/webosose/webos-co...ervice.c#L1831