OMRONFINS-OMRON CS1G-TypeError: self.socket.connect is not a function


I'm using omronfins node to connect to my omron plc(CS1G) via CJ1W-EIP21. I am trying to read some data from the plc. I am using the 'read' example provided.

When I inject, the node shows not connected. The debug mesage shows "TypeError: self.socket.connect is not a function".

Not sure where the issue is. Any advice on how to proceed?

Hmmmm. Not seen that one before for this node. What versions of nodejs, node-red & node-red-contrib-omron-fins do you have installed?


nodejs v10.23.1

Hi, so node v10 is EOL by some time now.

And this error is due to lack of the connect function on UDP socket in the dgram package in node 10.

You have 2 choices here...

  1. Upgrade to NODE v14 LTS (or 16 LTS) - recommended
  2. Switch to TCP connection instead


You say you have V0.5.0 but yet there is no protocol selector on the fins config

V0.5.0 should look like this...


Have you just updated the omron node? If so, have you restarted node-red and refreshed your browser?

the protocol selection is available but not visible in the earlier screeenshot

I tried to change the protocol to tcp. Initially connected.

But once inject, Im getting the following error messages

TypeError: buf.readUint32BE is not a function. and then it shows timout in on the node

Most odd. Without investigating, I think an upgrade of node js might be necessary.

Is there a reason you are sticking with an "end of life" version of node?


We are using a Siemens IOT2050 (gateway-(OS-linux debian)). Here the node red + nodejs are all preinstalled via an image file. Im using their latest image file version from support site.

I actually tried to upgrade the nodejs based on your suggestion but then the entire node red system does not work. I then had to reload the original image file to make it work again.

Im not sure what went wrong in the background of the device when I updated the nodejs version.

Ah, good old obsolescence in a box.

Must you use this device when ÂŁ35 raspberry pi can do this job?

After upgrading nodejs did you go into your .node-red directory (or whatever is the equivalent on that device) and run npm rebuild


No I did not try this. Can this work?

These were the following lines I ran to update nodejs:

npm cache clean -f
npm install -g n
sudo n stable

Why are you installing n?

There is a post on the Siemens forum here...


I hope it helps, but I had problems myself at the beginning and I was told that with the IOT2050 the existing Node-Red version is not overwritten. So then there are two Node-Red versions.

Then I found ascriptto update Node-Red. (Actually for the Raspberry Pi, but it works on my IOT2050 too)

The script deletes the pre-installed Node-Red version and updates Node.js and Node-Red Npm. (The build-essential package is a reference for all the packages needed to compile a Debian package. It generally includes the GCC/g++ compilers and libraries and some other utilities.)

I have add complete command with once
apt install build-essential git

bash <(curl -sL

I install new nodes with "npm install" in the directory /home/root/.node-red

I hope your Node-Red runs more stable.

Best regards


It seems to suggest that the official node-red pi update script works on the iot2050

If you are willing to give it a go, I suggest trying to get it updated using the script plus --node14


bash <(curl -sL --node14

this line of coding is very unfamiliar but let me try it.


Recently, Siemens has released the latest image file that contains NodeJs v12.22.5.

After upgrading, I'm able to read the data from the READ node.

Thank you


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