Receive Modbus values, then convert

Hello all,

I would like to tap the outside temperature from my heater. This works so far also. An array with the value is delivered.

Now I want to parse this value. I get the error message: Error: data is not an array or a buffer.

I don't know what to do. The connection is a Modbus TCP.
The value is requested in the register FC04 Input Register. Signed 16.

Receive Modbus values, then convert.

Translated with DeepL Translate: The world's most accurate translator (free version)

Welcome to the forum @MaaAR

Feed the value you get from modbus into a Debug node and show us what you see.

Are you trying to use node-red-contrib-buffer-parser to convert it?


first screenshot shows the values.
second screenshot, the nodes

Can you attach a debug node to the bottom output & show us what comes out?



As you can see from your debug image, the output payload is an object with a property named buffer.

Hover your mouse over the buffer property in the debug panel and some buttons will appear one of them being "copy path". Click the "copy path" button, then go to the buffer parser node and paste the path into the property field

Hey MaaAR! Like what Steve said, the MODBUS module has two outputs that output the same data in two different ways. The top node is meant to give a msg.payload that can be passed on to other nodes to be interacted with using the payload property. The bottom node is meant to feed out the raw data as a buffer for processing in case you need to do something like little Endian to float conversions. The way MODBUS processes data doesn't always produce a straight forward result in payload, which is why the second node exists.

Hence why you have to do as Steve points out and access the msg.buffer property with your parser instead of the msg.payload property, which as you can see in your screenshot doesn't exist on that node. Hopefully that helps and if so, give Steve's comment a mark as your answer so everyone knows you found it!

Hello all,
thank you very much. As a newbie, Node-Red is just too extensive.
Could I have read somewhere what which output point provides?

Thanks a lot for your help.

Now how can I offset the value by one decimal place? It is a temperature value.

Many thanks in advance.

Read the built in help for that node - I think it is documented. If not, use the debug node to discover what it outputs.

I suppose you mean divide by 10?

Read the built in help for the Buffer Parser node...


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