Concatenate 2 hex buffer and convert

Hi to all,

i need to concatenate 2 buffer (first 2, knx.rawValue[0] and knx.rawValue[a]) in hex like 0x08 + 0xcd, take 08+cd -> 08cd and convert to decimal

08cd = 2253 then add a , after the first 3 digit to receive a 225,3 Volt

If necessary i have alredy the two buffer knx.rawValue[0] and knx.rawValue[1] separated.

Tnx for the help

You only have one Buffer, it is in msg.knx.rawValue and it is 12 bytes long.
Have a look at node-red-contrib-buffer-parser, it is designed for exactly these problems.

Tnx, i'm alredy trying it, but how to select the buffer string 1+2 or 5+6?

Tnx Steve for all your clarification, now i can try to decode all the message.

If i put the /10 as your example it works one time and one not, if i leave 1 it works always.

Can you set debug node to show complete message. Also and another debug set to show complete message before the buffer parser node. Have a look at the data in the msg when it fails. Is there anything different or odd?

After the parser WORKING


Before the parser

After the parser NOT WORKING
image
Before the parser when NOT WORKING

Ok, find the problem

With scale /10 it works 1 time 1 time no, with scale 0.1 it works always

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