This is the routine (kind of) in question:
(Foreign node, but not needed, in there. Just by pass it)
[{"id":"a2f5ce51.4a3ac","type":"mqtt in","z":"9b7e7466.a4b698","g":"eff2cce4.08f878","name":"IFF","topic":"IFF","qos":"2","datatype":"auto","broker":"1bbfcdd.2d24532","nl":false,"rap":false,"inputs":0,"x":4100,"y":2240,"wires":[["19092b5a.4d260d","fbdd582e.8e13b"]]},{"id":"fbdd582e.8e13b","type":"gate","z":"9b7e7466.a4b698","g":"eff2cce4.08f878","name":"","controlTopic":"CONTROL","defaultState":"open","openCmd":"GO","closeCmd":"STOP","toggleCmd":"toggle","defaultCmd":"default","persist":false,"x":4240,"y":2240,"wires":[["52487feb.6471b"]]},{"id":"52487feb.6471b","type":"switch","z":"9b7e7466.a4b698","g":"eff2cce4.08f878","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"X","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":4370,"y":2240,"wires":[["a6f3614b.c96338","d8365ae1.9c3818"]]},{"id":"a6f3614b.c96338","type":"function","z":"9b7e7466.a4b698","g":"eff2cce4.08f878","name":"","func":"var IP = global.get(\"MY_IP\");\nvar name = global.get(\"myDeviceName\");\n\nvar a = '\"WIFI_DEVICE\":\"' + name;\nvar b = '\"IP_Address\":\"' + IP;\n\nmsg = {\"topic\":\"STATUS/WIFIDEVICEID\",\"payload\":\"{\" + a + '\",' + b + '\"}'};\n\nmsg.topic = \"STATUS/WIFIDEVICEID\";\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":4500,"y":2240,"wires":[["cf7b95ba.9dc48","d5e03328.bb55d"]]},{"id":"d5e03328.bb55d","type":"mqtt out","z":"9b7e7466.a4b698","g":"eff2cce4.08f878","name":"Device ID","topic":"STATUS/WIFIDEVICEID","qos":"","retain":"false","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"1bbfcdd.2d24532","x":4850,"y":2240,"wires":[]},{"id":"1bbfcdd.2d24532","type":"mqtt-broker","name":"TIMEPI MQTT","broker":"192.168.0.99","port":"1883","clientid":"","autoConnect":true,"usetls":false,"compatmode":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"birthTopic":"SOM","birthQos":"2","birthRetain":"false","birthPayload":"TelePi Comms UP","birthMsg":{},"closeTopic":"EOM","closeQos":"0","closeRetain":"false","closePayload":"TelePi shutting DOWN","closeMsg":{},"willTopic":"EOM","willQos":"0","willRetain":"false","willPayload":"TelePi Comms FAILURE","willMsg":{},"sessionExpiry":""}]
Basically it is this: