Your network IP address is the default address that other systems on your network will see as the "server" running Node-RED.
In many environments though, this address is remarkably hard to get hold of reliably. Particularly when you have multiple NIC's. Worse, many of the methods are totally different on different operating systems.
There is one fairly reliable method however, though it does require a connection to the Internet.
To make use of this, you first need to add a global function in settings.js
functionGlobalContext: {
// Get your local network IP address
getNetworkIP: (callback) => {
// Change the address for a server on your local
// LAN if you have one (e.g. your router) OR
// change to something on the Internet like www.google.com
var socket = net.createConnection(80, '192.168.1.1')
socket.on('connect', () => {
callback(socket.address().address)
socket.end()
});
socket.on('error', (e) => {
callback('No Internet')
})
}
},
Then you need to call that with a function node:
const getNetworkIP = global.get('myGlobals').getNetworkIP
// Take care here. Because this is a callback
// fn, any errors may crash Node-RED. Add extra
// error handling if doing additional processing
getNetworkIP(function (ip) {
node.send({topic: 'Network IP', payload: ip})
})
NB: I'm assuming you are using Node.JS v6+ here, you will need to adjust for older versions.