Question 1:
Are there multiple robots sending data to the SAME IP:PORT (to one Node-RED)?
Question 2 :
Are you using the TCP request to "Start" a "subscription" of some kind?
I.e. Are you sending some kind of "start sending your data" command to the robot(s)
Question 3:
Assuming there is no gateway, how do you "Start" multiple robots "talking"?
I think you might be using the wrong nodes.
The TCP Request node is typically for sending a REQUEST and expecting a single RESPONSE.
It is likely you need to use the TCP OUT (for sending your REQUEST command) and the TCP-in for listening. This is designed for (and will permit) multiple connections.
Note how the TCP-in tells you which port and IP the message originated from?
As I only have 1 computer available to me right now, I had to simulate this using different port numbers but the theory is the same. You will be able to use the msg IP and PORT to keep your streams of data isolated.
e.g:
[{"id":"e770d1a87a75d75a","type":"tcp in","z":"e9971c95786fd2be","name":"Robot 1 (:11451)","server":"server","host":"","port":"11451","datamode":"stream","datatype":"buffer","newline":"","topic":"","trim":false,"base64":false,"tls":"","x":1200,"y":80,"wires":[["bd729694ead6ac74"]]},{"id":"5de0adffb377b635","type":"function","z":"e9971c95786fd2be","name":"Testing function","func":"msg.payload = []\n ; (() => {\n let i = 0\n while (i < 100000000) i++\n })()\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[{"var":"fs","module":"fs"}],"x":1680,"y":520,"wires":[["7d782d8388e38375"]]},{"id":"4a3383e84f2ac2f1","type":"function","z":"e9971c95786fd2be","name":"Construction data","func":"let jsonBody = {\n \"message_type\": msg.payload,\n \"client_type\": 3,\n \"mac_address\": '00:e0:67:2f:cd:02',\n}\n\nmsg.payload = jsonBody\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1430,"y":300,"wires":[["068626661e01ea38"]]},{"id":"7d782d8388e38375","type":"debug","z":"e9971c95786fd2be","name":"debug 365","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1910,"y":520,"wires":[]},{"id":"068626661e01ea38","type":"function","z":"e9971c95786fd2be","name":"Add length buffer header","func":"let jsonBody = msg.payload\nlet headBuffer = Buffer.alloc(4)\nheadBuffer.writeUint32LE(JSON.stringify(jsonBody).length)\nmsg.payload = Buffer.from([...headBuffer, ...Buffer.from(JSON.stringify(jsonBody), 'utf-8')])\nreturn msg","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1650,"y":300,"wires":[["b4e1590c27127a22"]]},{"id":"0ae87cea6bd17e46","type":"function","z":"e9971c95786fd2be","name":"fake data","func":"\nif (Buffer.isBuffer(msg.payload) && msg.payload.length > 4) {\n /** @type {Buffer} */\n const buf = msg.payload\n const sanitised = buf.slice(4) // remove header\n const payload = JSON.parse(sanitised)\n\n if (payload.message_type === 'register_client') {\n context.set('subscribed', true)\n } else if (payload.message_type === 'deregister_client') {\n context.set('subscribed', false)\n }\n}\n\nconst subscribed = context.get('subscribed') === true\n\nif (!subscribed) {\n return null // halt flow\n}\n\nmsg.payload = {\n \"occupied_color_thresh\": 50,\n \"create_time\": \"2023/03/07 16:55:02\",\n \"resolution\": 0.05000000074505806,\n \"name\": \"4F\",\n \"width\": 1188,\n \"no_information_color\": 127,\n \"md5\": \"a04d4590e0004f239c3d58b42b33a271\",\n \"free_color_thresh\": 220,\n \"update_time\": \"2023/03/07 16:56:12\",\n \"uuid\": \"2023_02_07_16_36_19-ab4d2605-2135-4140-a6e0-879d3a0333f5\",\n \"height\": 628,\n \"version\": \"1.0.0\"\n}\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1400,"y":200,"wires":[["3d6b2d4dd2cb4687","acbe1ae00b772871"]]},{"id":"acbe1ae00b772871","type":"delay","z":"e9971c95786fd2be","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":1600,"y":200,"wires":[["0ae87cea6bd17e46"]]},{"id":"b4e1590c27127a22","type":"tcp out","z":"e9971c95786fd2be","name":"","host":"127.0.0.1","port":"11451","beserver":"client","base64":false,"end":false,"tls":"","x":1870,"y":300,"wires":[]},{"id":"3d6b2d4dd2cb4687","type":"tcp out","z":"e9971c95786fd2be","name":"","host":"127.0.0.1","port":"11400","beserver":"client","base64":false,"end":true,"tls":"","x":1630,"y":140,"wires":[]},{"id":"6df17ef935d04e70","type":"tcp out","z":"e9971c95786fd2be","name":"","host":"127.0.0.1","port":"11452","beserver":"client","base64":false,"end":false,"tls":"","x":1870,"y":400,"wires":[]},{"id":"7151a0663278bd6f","type":"tcp in","z":"e9971c95786fd2be","name":"Robot 2 (:11452)","server":"server","host":"","port":"11452","datamode":"stream","datatype":"buffer","newline":"","topic":"","trim":false,"base64":false,"tls":"","x":1200,"y":200,"wires":[["0ae87cea6bd17e46"]]},{"id":"93a4c1057939636a","type":"tcp in","z":"e9971c95786fd2be","name":"Listener (:11400)","server":"server","host":"","port":"11400","datamode":"stream","datatype":"buffer","newline":"","topic":"","trim":false,"base64":false,"tls":"","x":1420,"y":520,"wires":[["115951d3fe1d2e15"]]},{"id":"bd5b3255b0968ce0","type":"function","z":"e9971c95786fd2be","name":"Construction data","func":"let jsonBody = {\n \"message_type\": msg.payload,\n \"client_type\": 3,\n \"mac_address\": '00:e0:67:2f:cd:02',\n}\n\nmsg.payload = jsonBody\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1430,"y":400,"wires":[["f408e93a924c5042"]]},{"id":"f408e93a924c5042","type":"function","z":"e9971c95786fd2be","name":"Add length buffer header","func":"let jsonBody = msg.payload\nlet headBuffer = Buffer.alloc(4)\nheadBuffer.writeUint32LE(JSON.stringify(jsonBody).length)\nmsg.payload = Buffer.from([...headBuffer, ...Buffer.from(JSON.stringify(jsonBody), 'utf-8')])\nreturn msg","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1650,"y":400,"wires":[["6df17ef935d04e70"]]},{"id":"115951d3fe1d2e15","type":"debug","z":"e9971c95786fd2be","name":"FULL MSG","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1560,"y":580,"wires":[]},{"id":"bd729694ead6ac74","type":"function","z":"e9971c95786fd2be","name":"fake data","func":"\nif (Buffer.isBuffer(msg.payload) && msg.payload.length > 4) {\n /** @type {Buffer} */ \n const buf = msg.payload\n const sanitised = buf.slice(4) // remove header\n const payload = JSON.parse(sanitised)\n\n if (payload.message_type === 'register_client') {\n context.set('subscribed', true)\n } else if (payload.message_type === 'deregister_client') {\n context.set('subscribed', false)\n }\n}\n\nconst subscribed = context.get('subscribed') === true\n\nif (!subscribed) {\n return null // halt flow\n}\n\nmsg.payload = {\n \"occupied_color_thresh\": 40,\n \"create_time\": \"2023/03/07 16:55:02\",\n \"resolution\": 0.04000000074505806,\n \"name\": \"44\",\n \"width\": 1144,\n \"no_information_color\": 104,\n \"md5\": \"a04d4590e0004f239c3d58b42b33a271\",\n \"free_color_thresh\": 220,\n \"update_time\": \"2023/03/07 16:56:12\",\n \"uuid\": \"2023_02_07_16_36_19-ab4d2605-2135-4140-a6e0-879d3a0333f5\",\n \"height\": 644,\n \"version\": \"1.0.4\"\n}\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1400,"y":80,"wires":[["0728efffc32ad281","e506212cafdc89d0"]]},{"id":"e506212cafdc89d0","type":"delay","z":"e9971c95786fd2be","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":1600,"y":80,"wires":[["bd729694ead6ac74"]]},{"id":"0728efffc32ad281","type":"tcp out","z":"e9971c95786fd2be","name":"","host":"127.0.0.1","port":"11400","beserver":"client","base64":false,"end":true,"tls":"","x":1630,"y":20,"wires":[]},{"id":"4d895830606f27da","type":"comment","z":"e9971c95786fd2be","name":"Fake robot 1","info":"","x":1190,"y":40,"wires":[]},{"id":"cce629cb4f534de3","type":"comment","z":"e9971c95786fd2be","name":"Fake robot 2","info":"","x":1190,"y":160,"wires":[]},{"id":"680cf1306e91dda0","type":"inject","z":"e9971c95786fd2be","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"register_client","payloadType":"str","x":1210,"y":400,"wires":[["bd5b3255b0968ce0"]]},{"id":"4f0d6dc29c7050fd","type":"inject","z":"e9971c95786fd2be","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"deregister_client","payloadType":"str","x":1220,"y":440,"wires":[["bd5b3255b0968ce0"]]},{"id":"e55b993e7c0952cb","type":"inject","z":"e9971c95786fd2be","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"register_client","payloadType":"str","x":1210,"y":300,"wires":[["4a3383e84f2ac2f1"]]},{"id":"9b4be3671275a06d","type":"inject","z":"e9971c95786fd2be","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"deregister_client","payloadType":"str","x":1220,"y":340,"wires":[["4a3383e84f2ac2f1"]]}]