TCP output node - dynamically change HOST Address

We have the Host/IP address hardcoded in as "192.168.1.74" and that works ok.
However, we are looking to dynamically change the HOST/IP address via user Input.
For example, we will allow User to enter tenter in the IP address and that will "SET" the HOST IP Address of the TCP Output node. For example, user may want to talk to "192.168.x.x"...

I did not see any way to 'inject" the HOST/IP address into the TCP OUTPUT node using msg.payload or msg.url.
ANy ideas?

tcp%20out%20node

HI all,
I'm brad new in this blog, but pretty excited and hope to contribute more when I'll learn or develop something... keep patient!
Thanks if any else can help in this thread, I'm interested to; maybe I missed something on the blog where this thread is replied. Whom he can address me at the solution will help me a lot!
Again thanks to let me join this forum
Ciao

I believe that the TCP listener is started when Node-RED starts and therefore it isn't possible to change it dynamically.

It may be able to be set to an environment variable but this will still only be read when Node-RED starts up.

What do you mean with TCP listener is started when Node-RED starts? You mean when I deploy the flow or when node-red service starts?

on deploy

2 Likes