Data extraction modbus tcp / ip weather station

Hello, I have a weather station with Modbus TCP / IP and I want to extract your data, with a test software I was able to extract the data, as I show below:

In the previous image you can see the modbus configuration parameters of the station. The type of station records are as follows:

Now, I want to do the above with Node Red, so I installed and configured it as follows:

So I don't know what I'm wrong about or if I'm using the right blocks, I hope you can help me, regards!

I don't know about that particular node, but if the debug you showed in the first image (about the credentials secret) comes from the modbus node then there is something very odd going on, as that is from the node red log.
Tell us what operating system you are running node red under. Also restart node-red in a terminal and post the log here. It is the log containing the Welcome to node red message.

Hi, thanks for replying, I am using the hardware:
the Latte Panda 2G 32GB board and the Ubuntu 16.04 LTS operating system, it should be noted that this image was supplied by Latte Panda and does not correspond to the official distribution.

When starting Node network this shows the console.

I don't think it is a good idea to use node.js v13, that is very new and is not a supported version for node-red. In addition it seems that it has an old version of npm, which is odd as usually the two go together. What does npm -v show?

oh thanks i will check the points you say, the npm version is as follows:


That is ancient. I suggest removing nodejs and npm then installing version 12 of nodejs (which comes with npm). Then re-install node-red and in your .node-red folder run
npm install
which will re-build everything for the new version of nodejs.
For the future it is better to copy/paste logs rather than post a screenshot if possible.

You need to change from FC-4 read input registers to FC-3 Read holding registers. And change the starting address from 40001 to 1.


thanks!, I made the changes you told me and I got output, but I have doubts since the first record should be a letter, in this case the letter Q, which do you think may be wrong to show me results that are not?

attached catches


When dealing with Modbus, reading holding registers will always output an integer type of data. There should maybe a corresponding integer for each Letters, in your case.. maybe the "Q" is equal to 81.

After several tests, I have seen that the modbus responses are in integer type and then you have to format the messages received according to the type of record, I have followed this video:

where the structure works very well, however I don't know very well if the formatting function applies to my types of records:

Attachment formatting function:

//create buffer
var buf = new ArrayBuffer(4);
//create a 16-bit int view of it
var ints = new Uint16Array(buf);

//read input in format "CD AB": [6025, 16831]
var data = msg.values;
data.forEach(function (b, i) {
    ints[i] = b;

//create a 32-bit float view of it
var floats = new Float32Array(buf);
//Read the bits as a float; note that by doing
msg.result = floats[0];
return msg;

attached table of my types of records:

I attach my flow:

The results I get, do not look like the ones thrown at me by a modbus tcp software called Simply Modbus TCP, I think the formatting function is the key, someone who can help me about it please.