Steve-Mcl / node-red-contrib-buffer-parser

A node-red node to convert values in a buffer, integer array or hex string into many different data type(s). Supports Big/Little Endian, BCD, byte swapping and much more.
MIT License
24 stars 8 forks source link

Dynamic spec returns 0 payload/value #12

Open Eze-DP opened 2 years ago

Eze-DP commented 2 years ago

When using dynamic specs, it only seems to work when the option type is set to string. All other types return 0, which is incorrect. This behavior can be seen in the buffer-parser examples provided by the package.

brokenbuffer

albfan commented 1 year ago

I suggest to create a buffer node with same spec and debug whole msg (there's a msg.specification where you can check spec defined on that node) usually you are missing, offset, or any other non obvious parameter for that kind of parsing

woytekbode commented 1 year ago

I have noticed this same behaviour and managed to get a working output when using 'mask': '' under the items properties.

FranPanadero commented 1 year ago

It works using 'mask': '' under the items properties. Thanks @woytekbode