# "I am facing an issue regarding handling multiple devices in Node-RED. How can I manage separate connections for each device, given that only the terminal number is provided in the login packet and not in the data

**URL:** https://discourse.nodered.org/t/i-am-facing-an-issue-regarding-handling-multiple-devices-in-node-red-how-can-i-manage-separate-connections-for-each-device-given-that-only-the-terminal-number-is-provided-in-the-login-packet-and-not-in-the-data/93069
**Category:** General
**Created:** [11 November 2024 12:48 UTC](https://discourse.nodered.org/t/i-am-facing-an-issue-regarding-handling-multiple-devices-in-node-red-how-can-i-manage-separate-connections-for-each-device-given-that-only-the-terminal-number-is-provided-in-the-login-packet-and-not-in-the-data/93069 "2024-11-11T12:48:16Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![nilam](https://avatars.discourse-cdn.com/v4/letter/n/65b543/32.png) [@nilam](https://discourse.nodered.org/u/nilam)
#### Post date: [11 November 2024 12:48 UTC](https://discourse.nodered.org/t/i-am-facing-an-issue-regarding-handling-multiple-devices-in-node-red-how-can-i-manage-separate-connections-for-each-device-given-that-only-the-terminal-number-is-provided-in-the-login-packet-and-not-in-the-data/93069/1 "2024-11-11T12:48:16Z")

</div>

I am use TCP in node to make connections for devices

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [11 November 2024 13:52 UTC](https://discourse.nodered.org/t/i-am-facing-an-issue-regarding-handling-multiple-devices-in-node-red-how-can-i-manage-separate-connections-for-each-device-given-that-only-the-terminal-number-is-provided-in-the-login-packet-and-not-in-the-data/93069/2 "2024-11-11T13:52:28Z")

</div>

Hi and welcome to the forum.

Are you actually creating a custom node? Or is this a more general question? (If so, could you please change the category to "General" for us? Thanks).

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [11 November 2024 15:06 UTC](https://discourse.nodered.org/t/i-am-facing-an-issue-regarding-handling-multiple-devices-in-node-red-how-can-i-manage-separate-connections-for-each-device-given-that-only-the-terminal-number-is-provided-in-the-login-packet-and-not-in-the-data/93069/3 "2024-11-11T15:06:59Z")

</div>

If you look at the complete msg (not just the msg.payload) - you should be able to see both a msg.ip and msg.\_sessionid properties that you should be able to use to tell them apart.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [10 January 2025 15:07 UTC](https://discourse.nodered.org/t/i-am-facing-an-issue-regarding-handling-multiple-devices-in-node-red-how-can-i-manage-separate-connections-for-each-device-given-that-only-the-terminal-number-is-provided-in-the-login-packet-and-not-in-the-data/93069/4 "2025-01-10T15:07:29Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
