Replicate tcp request

Hi everyone! I'm new to node red and want to create customise node to to control my remote device. I would like to start with the functionalities of tcp request node. And later gradually add functions to it. Is there any link where I can check the code(tcp request)? Or any link where I can make a start with my project in mind?

Thank you,
Joe

A good place to start wold be here (creating nodes)...

and here (node-red source code)...

1 Like

@Steve-Mcl thank you for quick reply. :smiley:

1 Like

I started to create a model node for my reference, a simple node that will display string to lower case and works fine. I change the function in the js file with code below

    RED.nodes.createNode(this,config);
      	var node = this;
        var net = require('net');
	var client = net.connect('7877,'192.168.1.12', function() {
	node.send('Connected!!');
	});

when I hit deploy there is no error but there is also no message if it successfully connected to ip address and port.

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