Hi! does anyone knows how to make tcp-client setup to listen to a specific address and port. My apology if this may be simple but I don't figured it out yet how to make it work. I got the module from this link https://flows.nodered.org/node/node-red-contrib-tcp-client. I also tried the tcp request and works fine (Server: localhost Port: 7811) I can send string and receive message, but I wanted to try tcp-client.
Do you need to create dynamic ports? If not you can use the core tcp-in node to create a listener. The tcp-request node creates an outbound connection.
I realized that the Tcp Request fits to my needs. The reason I tried to focus on the Tcp client, I thought it would be easy to modify it later, unlike the Tcp Request which included in the node red folder with the other category nodes(network,functions, storage & etc). Is it possible to have Tcp request only and cloned it then modify to my own need? I'm still new to node red(but I was able to do the lower-case example) and really appreciate any guide that will help me continue my application in mind.
If you are feeling the need to amend a node, there is a good chance that you haven't thought through the opportunities that Node-RED brings and the slightly different way you may need to think about things.
It would be better if you explained what it is that you want to achieve.
I have a device that I would to control and I simply want my customised node functions same as tcp request node but wanted also to add or change to fit my need.
Hi, thank you for creating and sharing these node modules. I'm still new in javascript so I'm still stuck in putting it together. So far here is what I did.
Create a folder to place the js, html and jason file.
Copy codes from 31-tcpin.js (function TcpGet part only).
Copy codes from 31-tcpin.html (in the part tcp request).
I created the jason file but not sure if I made it right.
When I open the terminal(on raspberry pi) I did the ff. commands
a.) cd to my folder(node-red-contrib-tcp-client)
b.) sudo npm install
c.) cd ~/.node-red
d.) sudo npm link node-red-contrib-tcp-client
Issuing the commands above did not show any errors but it also did not work. Can you help me try to identify what I'm missing? I also uploads the files I'm working on below. package.json (2.7 KB) tcp-client.html.txt (8.4 KB) tcp-client.js.txt (12.7 KB)
No showing of node in the palette and the category I created. There must be conflicting between the existing node-red-contrib-tcp-client I have installed earlier. I will try to remove it...and see the result.
Hi!, just want to ask if I need to change the name of the html and js file? "<script type="text/x-red" data-template-name="tcp-client">" ..in the html file(tcp-client), this should be change too?