# Processing int16 values

**URL:** <https://discourse.nodered.org/t/processing-int16-values/37425>\
**Category:** General\
**Created:** [12 December 2020 22:33 UTC](https://discourse.nodered.org/t/processing-int16-values/37425 "2020-12-12T22:33:43Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ianmidd](https://avatars.discourse-cdn.com/v4/letter/i/67e7ee/32.png) [@Ianmidd](https://discourse.nodered.org/u/Ianmidd)\
**Post date:** [12 December 2020 22:33 UTC](https://discourse.nodered.org/t/processing-int16-values/37425/1 "2020-12-12T22:33:44Z")

</div>

Hi all, first post so apologies if I do this wrong.

I’m trying to process data from Modbus and the values are mostly listed as int16. I’m seeing numbers but none of them correspond to the values I’m expecting.

I was expecting something like:-

outputvalueindecimal = parseInt(msg.payload);  
or  
outputvalueindecimal = int16(msg.payload);

I see 0x???? when I click on the number in the debug screen but the value shown in debug is nothing like I was seeing via another interface.

I’ve searched all over the net and can’t find any straightforward simple answer.

Any help would be much appreciated. Thanks.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [13 December 2020 00:14 UTC](https://discourse.nodered.org/t/processing-int16-values/37425/2 "2020-12-13T00:14:16Z")

</div>

You probably want to look at Steves node-red-contrib-buffer-parser node which is great for slicing up things like this as often the bytes maybe be swapped or otherwise

---

<div class="post-metadata">

**Author:** ![Ianmidd](https://avatars.discourse-cdn.com/v4/letter/i/67e7ee/32.png) [@Ianmidd](https://discourse.nodered.org/u/Ianmidd)\
**Post date:** [14 December 2020 10:03 UTC](https://discourse.nodered.org/t/processing-int16-values/37425/3 "2020-12-14T10:03:51Z")

</div>

That is EXACTLY what I was looking for. My problem now is that I am having trouble getting the variables in the node to correctly align with the Modbus Spec. If I was to send the first few registers, would you mind helping me with the settings please?

The spec for the first register reads:-

Address: 40001, Size: 2, Name: blah, Type uint32 and is supposed to contain "SunS". I can see 0x53756e53 in the debug but I cannot get it to decode properly.

This is how far I have got:-

```auto
{"topic":"eb39b2fd.caaee8","messageId":"5fd739ab8ff3f24d5365c569","payload":[{"type":"uint32be","name":"ID","offset":0,"length":-1,"offsetbit":0,"scale":"1","mask":"","id":0,"value":1400204883}],"queueLengthByUnitId":{"unitId":1,"queueLength":0},"queueUnitId":1,"unitId":1,"modbusRequest":{"value":1607940523366,"unitid":"1","fc":3,"address":"40000","quantity":"2","messageId":"5fd739ab8ff3f24d5365c569"},"responseBuffer":{"data":[21365,28243],"buffer":[83,117,110,83]},"_msgid":"719e10b7.d779c","originalPayload":[21365,28243],"specification":{"options":{"byteSwap":[],"resultType":"array","singleResult":true,"msgProperty":"payload","setTopic":false},"items":[{"type":"uint32be","name":"ID","offset":0,"length":-1,"offsetbit":0,"scale":"1","mask":"","id":0,"value":1400204883}]},"values":[1400204883],"objectResults":{"ID":{"type":"uint32be","name":"ID","offset":0,"length":-1,"offsetbit":0,"scale":"1","mask":"","id":0,"value":1400204883}},"keyvalues":{"ID":1400204883},"arrayResults":[{"type":"uint32be","name":"ID","offset":0,"length":-1,"offsetbit":0,"scale":"1","mask":"","id":0,"value":1400204883}],"buffer":[83,117,110,83]}

```

I am sure it is a simple fix but I'm going blind now looking at it.

---

<div class="post-metadata">

**Author:** ![Ianmidd](https://avatars.discourse-cdn.com/v4/letter/i/67e7ee/32.png) [@Ianmidd](https://discourse.nodered.org/u/Ianmidd)\
**Post date:** [14 December 2020 10:19 UTC](https://discourse.nodered.org/t/processing-int16-values/37425/5 "2020-12-14T10:19:25Z")

</div>

Ok. First bit of progress... The Spec I'm following is obviously rubbish. The first field above is a String - Length 4. Got "SunS" at last.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [14 December 2020 10:56 UTC](https://discourse.nodered.org/t/processing-int16-values/37425/6 "2020-12-14T10:56:05Z")

</div>

Hi, your flow export is not valid.

If you still need help or any advice on how to grab and convert your data in the most efficient and consistent manner, give me a shout.

---

<div class="post-metadata">

**Author:** ![Ianmidd](https://avatars.discourse-cdn.com/v4/letter/i/67e7ee/32.png) [@Ianmidd](https://discourse.nodered.org/u/Ianmidd)\
**Post date:** [14 December 2020 13:36 UTC](https://discourse.nodered.org/t/processing-int16-values/37425/7 "2020-12-14T13:36:56Z")

</div>

At this point I’ve tried just about every combination of Type, Length and Offset I can think of. Can you tell me why it’s not valid please?

Certainly could use any help you can offer. Thanks.

Regards,

Ian

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [14 December 2020 14:00 UTC](https://discourse.nodered.org/t/processing-int16-values/37425/8 "2020-12-14T14:00:08Z")

</div>

> [@Ianmidd](#):
>
> Can you tell me why it’s not valid please?

Perhaps you did not use the right technique for exporting it. You should select the nodes to export and then either use Ctrl+E or Export via the menu. Then paste it here. I see you did use the right technique when pasting it in.  
Out of interest, how did you export it the first time?

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [14 December 2020 14:57 UTC](https://discourse.nodered.org/t/processing-int16-values/37425/9 "2020-12-14T14:57:47Z")

</div>

> [@Colin](#):
>
> Then paste it here. I see you did use the right technique when pasting it in.

I edited @Ianmidd post to format the JSON export - thats when i realised it was only a partial part of the flow (not even a full node)

@Ian this is how to export...  
 ![OVX2rsQAUx](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/a/ca2609c8ec146c62d22e35398a57d51668844fea.gif)

This is how to paste correctly - surround your code with three backticks ...  
`````  
`like this`  
`````  
See this post for more details - [How to share code or flow json](https://discourse.nodered.org/t/how-to-share-code-or-flow-json/506)

---

<div class="post-metadata">

**Author:** ![Ianmidd](https://avatars.discourse-cdn.com/v4/letter/i/67e7ee/32.png) [@Ianmidd](https://discourse.nodered.org/u/Ianmidd)\
**Post date:** [14 December 2020 19:23 UTC](https://discourse.nodered.org/t/processing-int16-values/37425/10 "2020-12-14T19:23:30Z")

</div>

What I posted was the debug node payloads. All the settings are in there, I thought. Anyway here are the nodes as far as I have got.

```auto
[{"id":"a6ef7a61.320aa","type":"debug","z":"3b66c770.7ea918","name":"Flex Getter","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":690,"y":1380,"wires":[]},{"id":"eb39b2fd.caaee8","type":"modbus-getter","z":"3b66c770.7ea918","name":"Load","showStatusActivities":true,"showErrors":true,"logIOActivities":false,"unitid":"1","dataType":"HoldingRegister","adr":"40000","quantity":"37","server":"fa971e4c.0eaa6","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"keepMsgProperties":false,"x":310,"y":1380,"wires":[["a6ef7a61.320aa","45cc6637.f52cc"],["a6ef7a61.320aa"]]},{"id":"781c433c.f42664","type":"inject","z":"3b66c770.7ea918","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":150,"y":1380,"wires":[["eb39b2fd.caaee8"]]},{"id":"703d6667.18c618","type":"debug","z":"3b66c770.7ea918","name":"Output","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":680,"y":1460,"wires":[]},{"id":"45cc6637.f52cc","type":"buffer-parser","z":"3b66c770.7ea918","name":"","data":"responseBuffer.data","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"string","name":"ID","offset":0,"length":4,"offsetbit":0,"scale":"1","mask":""},{"type":"uint16be","name":"DID","offset":4,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"hex","name":"Block","offset":5,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"string","name":"Manufacturer","offset":5,"length":32,"offsetbit":0,"scale":"1","mask":""},{"type":"string","name":"Model","offset":6,"length":32,"offsetbit":0,"scale":"1","mask":""}],"swap1":"","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","resultType":"array","resultTypeType":"output","multipleResult":false,"fanOutMultipleResult":true,"setTopic":false,"outputs":1,"x":330,"y":1460,"wires":[["703d6667.18c618"]]},{"id":"fa971e4c.0eaa6","type":"modbus-client","name":"","clienttype":"tcp","bufferCommands":true,"stateLogEnabled":false,"queueLogEnabled":false,"tcpHost":"192.168.10.31","tcpPort":"502","tcpType":"DEFAULT","serialPort":"/dev/ttyUSB","serialType":"RTU-BUFFERD","serialBaudrate":"9600","serialDatabits":"8","serialStopbits":"1","serialParity":"none","serialConnectionDelay":"100","unit_id":"1","commandDelay":"1","clientTimeout":"1000","reconnectOnTimeout":true,"reconnectTimeout":"2000","parallelUnitIdsAllowed":true}]

```

---

<div class="post-metadata">

**Author:** ![UnborN](https://avatars.discourse-cdn.com/v4/letter/u/4491bb/32.png) [@UnborN](https://discourse.nodered.org/u/UnborN)\
**Post date:** [14 December 2020 19:53 UTC](https://discourse.nodered.org/t/processing-int16-values/37425/11 "2020-12-14T19:53:01Z")

</div>

You should be sending your Buffer parser the **buffer**.. hence the name "Buffer parser" 😉  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/6/36f5d8a9f77e90805b9450177d8ebd8ed364fafa.png)

You were sending `msg.responseBuffer.data`

Also i believe the length should be ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/4/14873d7e7d23dfd325346dfe32fcc3ee4f6ac2c3.png) for all

---

<div class="post-metadata">

**Author:** ![Ianmidd](https://avatars.discourse-cdn.com/v4/letter/i/67e7ee/32.png) [@Ianmidd](https://discourse.nodered.org/u/Ianmidd)\
**Post date:** [14 December 2020 20:27 UTC](https://discourse.nodered.org/t/processing-int16-values/37425/12 "2020-12-14T20:27:49Z")

</div>

Changed it from .data to . buffer and there seems to be no difference. Also the Length set to 1 is not working, so "SunS" comes out as "S".

---

<div class="post-metadata">

**Author:** ![Ianmidd](https://avatars.discourse-cdn.com/v4/letter/i/67e7ee/32.png) [@Ianmidd](https://discourse.nodered.org/u/Ianmidd)\
**Post date:** [14 December 2020 20:33 UTC](https://discourse.nodered.org/t/processing-int16-values/37425/13 "2020-12-14T20:33:55Z")

</div>

Actually, I take that back. The Buffer comes out as an Array of individual fields whereas the Data comes out somehow grouped together.

---

<div class="post-metadata">

**Author:** ![UnborN](https://avatars.discourse-cdn.com/v4/letter/u/4491bb/32.png) [@UnborN](https://discourse.nodered.org/u/UnborN)\
**Post date:** [14 December 2020 20:40 UTC](https://discourse.nodered.org/t/processing-int16-values/37425/14 "2020-12-14T20:40:49Z")

</div>

Can you copy/paste another message coming from the Flex Getter Debug node ? .. double click it first and configure it to **Complete msg object**

Also is there some link to the documentation for your modbus device ?

> [@Ianmidd](#):
>
> The spec for the first register reads:-
> 
> Address: 40001, Size: 2, Name: blah, Type uint32 and is supposed to contain "SunS".

In your Mobus Getter setup you start reading from 40000 ? it can be confusing because some manufacturers start from 0 and some from 1

---

<div class="post-metadata">

**Author:** ![Ianmidd](https://avatars.discourse-cdn.com/v4/letter/i/67e7ee/32.png) [@Ianmidd](https://discourse.nodered.org/u/Ianmidd)\
**Post date:** [14 December 2020 20:47 UTC](https://discourse.nodered.org/t/processing-int16-values/37425/15 "2020-12-14T20:47:47Z")

</div>

This time I used the Buffer.buffer as you said.

```auto
{"topic":"eb39b2fd.caaee8","messageId":"5fd7cdca5c5a707be129c8d7","payload":[{"type":"string","name":"ID02","offset":0,"length":4,"offsetbit":0,"scale":"1","mask":"","id":0,"value":"SunS"},{"type":"byte","name":"DID03","offset":5,"length":1,"offsetbit":0,"scale":"1","mask":"","id":1,"value":1},{"type":"uint16be","name":"Block04","offset":6,"length":1,"offsetbit":0,"scale":"1","mask":"","id":2,"value":65},{"type":"string","name":"Manufacturer05","offset":8,"length":32,"offsetbit":0,"scale":"1","mask":"","id":3,"value":"SolarEdge \u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"},{"type":"string","name":"Model21","offset":18,"length":32,"offsetbit":0,"scale":"1","mask":"","id":4,"value":"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000SE4000\u0000\u0000\u0000\u0000"},{"type":"string","name":"Version45","offset":44,"length":8,"offsetbit":0,"scale":"1","mask":"","id":5,"value":"00\u0000\u0000\u0000\u0000\u0000\u0000"},{"type":"string","name":"SerialNumber","offset":40,"length":32,"offsetbit":0,"scale":"1","mask":"","id":6,"value":"SE4000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"}],"queueLengthByUnitId":{"unitId":1,"queueLength":0},"queueUnitId":1,"unitId":1,"modbusRequest":{"value":1607978442267,"unitid":"1","fc":3,"address":"40000","quantity":"65","messageId":"5fd7cdca5c5a707be129c8d7"},"responseBuffer":{"data":[21365,28243,1,65,21359,27745,29253,25703,25888,0,0,0,0,0,0,0,0,0,0,0,21317,13360,12336,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12336,12339,11826,12600,13824,0,0,0,14150,12597,12342,17463,0,0,0,0,0,0,0,0,0],"buffer":[83,117,110,83,0,1,0,65,83,111,108,97,114,69,100,103,101,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,83,69,52,48,48,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,48,48,51,46,50,49,56,54,0,0,0,0,0,0,0,55,70,49,53,48,54,68,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},"_msgid":"861638c3.74b758","originalPayload":[21365,28243,1,65,21359,27745,29253,25703,25888,0,0,0,0,0,0,0,0,0,0,0,21317,13360,12336,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12336,12339,11826,12600,13824,0,0,0,14150,12597,12342,17463,0,0,0,0,0,0,0,0,0],"specification":{"options":{"byteSwap":[],"resultType":"array","singleResult":true,"msgProperty":"payload","setTopic":false},"items":[{"type":"string","name":"ID02","offset":0,"length":4,"offsetbit":0,"scale":"1","mask":"","id":0,"value":"SunS"},{"type":"byte","name":"DID03","offset":5,"length":1,"offsetbit":0,"scale":"1","mask":"","id":1,"value":1},{"type":"uint16be","name":"Block04","offset":6,"length":1,"offsetbit":0,"scale":"1","mask":"","id":2,"value":65},{"type":"string","name":"Manufacturer05","offset":8,"length":32,"offsetbit":0,"scale":"1","mask":"","id":3,"value":"SolarEdge \u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"},{"type":"string","name":"Model21","offset":18,"length":32,"offsetbit":0,"scale":"1","mask":"","id":4,"value":"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000SE4000\u0000\u0000\u0000\u0000"},{"type":"string","name":"Version45","offset":44,"length":8,"offsetbit":0,"scale":"1","mask":"","id":5,"value":"00\u0000\u0000\u0000\u0000\u0000\u0000"},{"type":"string","name":"SerialNumber","offset":40,"length":32,"offsetbit":0,"scale":"1","mask":"","id":6,"value":"SE4000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"}]},"values":["SunS",1,65,"SolarEdge \u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000","\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000SE4000\u0000\u0000\u0000\u0000","00\u0000\u0000\u0000\u0000\u0000\u0000","SE4000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"],"objectResults":{"ID02":{"type":"string","name":"ID02","offset":0,"length":4,"offsetbit":0,"scale":"1","mask":"","id":0,"value":"SunS"},"DID03":{"type":"byte","name":"DID03","offset":5,"length":1,"offsetbit":0,"scale":"1","mask":"","id":1,"value":1},"Block04":{"type":"uint16be","name":"Block04","offset":6,"length":1,"offsetbit":0,"scale":"1","mask":"","id":2,"value":65},"Manufacturer05":{"type":"string","name":"Manufacturer05","offset":8,"length":32,"offsetbit":0,"scale":"1","mask":"","id":3,"value":"SolarEdge \u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"},"Model21":{"type":"string","name":"Model21","offset":18,"length":32,"offsetbit":0,"scale":"1","mask":"","id":4,"value":"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000SE4000\u0000\u0000\u0000\u0000"},"Version45":{"type":"string","name":"Version45","offset":44,"length":8,"offsetbit":0,"scale":"1","mask":"","id":5,"value":"00\u0000\u0000\u0000\u0000\u0000\u0000"},"SerialNumber":{"type":"string","name":"SerialNumber","offset":40,"length":32,"offsetbit":0,"scale":"1","mask":"","id":6,"value":"SE4000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"}},"keyvalues":{"ID02":"SunS","DID03":1,"Block04":65,"Manufacturer05":"SolarEdge \u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000","Model21":"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000SE4000\u0000\u0000\u0000\u0000","Version45":"00\u0000\u0000\u0000\u0000\u0000\u0000","SerialNumber":"SE4000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"},"arrayResults":[{"type":"string","name":"ID02","offset":0,"length":4,"offsetbit":0,"scale":"1","mask":"","id":0,"value":"SunS"},{"type":"byte","name":"DID03","offset":5,"length":1,"offsetbit":0,"scale":"1","mask":"","id":1,"value":1},{"type":"uint16be","name":"Block04","offset":6,"length":1,"offsetbit":0,"scale":"1","mask":"","id":2,"value":65},{"type":"string","name":"Manufacturer05","offset":8,"length":32,"offsetbit":0,"scale":"1","mask":"","id":3,"value":"SolarEdge \u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"},{"type":"string","name":"Model21","offset":18,"length":32,"offsetbit":0,"scale":"1","mask":"","id":4,"value":"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000SE4000\u0000\u0000\u0000\u0000"},{"type":"string","name":"Version45","offset":44,"length":8,"offsetbit":0,"scale":"1","mask":"","id":5,"value":"00\u0000\u0000\u0000\u0000\u0000\u0000"},{"type":"string","name":"SerialNumber","offset":40,"length":32,"offsetbit":0,"scale":"1","mask":"","id":6,"value":"SE4000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"}],"buffer":[83,117,110,83,0,1,0,65,83,111,108,97,114,69,100,103,101,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,83,69,52,48,48,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,48,48,51,46,50,49,56,54,0,0,0,0,0,0,0,55,70,49,53,48,54,68,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}

```

---

<div class="post-metadata">

**Author:** ![Ianmidd](https://avatars.discourse-cdn.com/v4/letter/i/67e7ee/32.png) [@Ianmidd](https://discourse.nodered.org/u/Ianmidd)\
**Post date:** [14 December 2020 20:51 UTC](https://discourse.nodered.org/t/processing-int16-values/37425/16 "2020-12-14T20:51:17Z")

</div>

The data is getting clearer but the last 4 fields should come out as:-  
Model = SE4000,  
Version = (unknown for sure, looks like 0003.218 in the input),  
SerialNumber is known to be "7F1506D7-71,  
and  
Modbus ID should be "1" I believe.

This is only the header block. I hope I catch on soon or this is gonna be a long night.

---

<div class="post-metadata">

**Author:** ![UnborN](https://avatars.discourse-cdn.com/v4/letter/u/4491bb/32.png) [@UnborN](https://discourse.nodered.org/u/UnborN)\
**Post date:** [14 December 2020 21:06 UTC](https://discourse.nodered.org/t/processing-int16-values/37425/17 "2020-12-14T21:06:11Z")

</div>

I think you should start reading from **40001** instead of 40000 so the offset doesnt get messed up

From the net i found this .. does it apply for your device ?

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/0/f070e23bd4e0912fc266ba2ea52f1733996f2a08.png)

I dont have to much exprerience with modbus but something like this ? for sure im wrong with the offset for the last couple of values so you have to experiment

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/9/0988e11baca17c8ccef71a5a736d55824b19c0e0.png)

---

<div class="post-metadata">

**Author:** ![Ianmidd](https://avatars.discourse-cdn.com/v4/letter/i/67e7ee/32.png) [@Ianmidd](https://discourse.nodered.org/u/Ianmidd)\
**Post date:** [14 December 2020 21:12 UTC](https://discourse.nodered.org/t/processing-int16-values/37425/18 "2020-12-14T21:12:12Z")

</div>

Thats the Spec they gave me Its SunSpec Modbus. Not 100% convinced its correct yet.

I will try changing the Register and Offset values right now. Thx

---

<div class="post-metadata">

**Author:** ![Ianmidd](https://avatars.discourse-cdn.com/v4/letter/i/67e7ee/32.png) [@Ianmidd](https://discourse.nodered.org/u/Ianmidd)\
**Post date:** [14 December 2020 21:17 UTC](https://discourse.nodered.org/t/processing-int16-values/37425/19 "2020-12-14T21:17:16Z")

</div>

Ok. Configuring like your example I get this:-

```auto
{"topic":"eb39b2fd.caaee8","messageId":"5fd7d6055c5a707be129c8e4","payload":[{"type":"uint32le","name":"ID","offset":0,"length":1,"offsetbit":0,"scale":"1","mask":"","id":0,"value":16798574},{"type":"int16le","name":"DID","offset":4,"length":1,"offsetbit":0,"scale":"1","mask":"","id":1,"value":16640},{"type":"int16le","name":"Block","offset":6,"length":1,"offsetbit":0,"scale":"1","mask":"","id":2,"value":28499},{"type":"string","name":"Manufacturer05","offset":10,"length":1,"offsetbit":0,"scale":"1","mask":"","id":3,"value":"r"},{"type":"string","name":"Model","offset":18,"length":1,"offsetbit":0,"scale":"1","mask":"","id":4,"value":"\u0000"},{"type":"string","name":"Version45","offset":44,"length":8,"offsetbit":0,"scale":"1","mask":"","id":5,"value":"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"},{"type":"string","name":"SerialNumber","offset":40,"length":32,"offsetbit":0,"scale":"1","mask":"","id":6,"value":"4000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"}],"queueLengthByUnitId":{"unitId":1,"queueLength":0},"queueUnitId":1,"unitId":1,"modbusRequest":{"value":1607980549489,"unitid":"1","fc":3,"address":"40001","quantity":"65","messageId":"5fd7d6055c5a707be129c8e4"},"responseBuffer":{"data":[28243,1,65,21359,27745,29253,25703,25888,0,0,0,0,0,0,0,0,0,0,0,21317,13360,12336,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12336,12339,11826,12600,13824,0,0,0,14150,12597,12342,17463,0,0,0,0,0,0,0,0,0,0],"buffer":[110,83,0,1,0,65,83,111,108,97,114,69,100,103,101,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,83,69,52,48,48,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,48,48,51,46,50,49,56,54,0,0,0,0,0,0,0,55,70,49,53,48,54,68,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},"_msgid":"caa8fe31.d4715","originalPayload":[28243,1,65,21359,27745,29253,25703,25888,0,0,0,0,0,0,0,0,0,0,0,21317,13360,12336,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12336,12339,11826,12600,13824,0,0,0,14150,12597,12342,17463,0,0,0,0,0,0,0,0,0,0],"specification":{"options":{"byteSwap":[],"resultType":"array","singleResult":true,"msgProperty":"payload","setTopic":false},"items":[{"type":"uint32le","name":"ID","offset":0,"length":1,"offsetbit":0,"scale":"1","mask":"","id":0,"value":16798574},{"type":"int16le","name":"DID","offset":4,"length":1,"offsetbit":0,"scale":"1","mask":"","id":1,"value":16640},{"type":"int16le","name":"Block","offset":6,"length":1,"offsetbit":0,"scale":"1","mask":"","id":2,"value":28499},{"type":"string","name":"Manufacturer05","offset":10,"length":1,"offsetbit":0,"scale":"1","mask":"","id":3,"value":"r"},{"type":"string","name":"Model","offset":18,"length":1,"offsetbit":0,"scale":"1","mask":"","id":4,"value":"\u0000"},{"type":"string","name":"Version45","offset":44,"length":8,"offsetbit":0,"scale":"1","mask":"","id":5,"value":"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"},{"type":"string","name":"SerialNumber","offset":40,"length":32,"offsetbit":0,"scale":"1","mask":"","id":6,"value":"4000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"}]},"values":[16798574,16640,28499,"r","\u0000","\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000","4000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"],"objectResults":{"ID":{"type":"uint32le","name":"ID","offset":0,"length":1,"offsetbit":0,"scale":"1","mask":"","id":0,"value":16798574},"DID":{"type":"int16le","name":"DID","offset":4,"length":1,"offsetbit":0,"scale":"1","mask":"","id":1,"value":16640},"Block":{"type":"int16le","name":"Block","offset":6,"length":1,"offsetbit":0,"scale":"1","mask":"","id":2,"value":28499},"Manufacturer05":{"type":"string","name":"Manufacturer05","offset":10,"length":1,"offsetbit":0,"scale":"1","mask":"","id":3,"value":"r"},"Model":{"type":"string","name":"Model","offset":18,"length":1,"offsetbit":0,"scale":"1","mask":"","id":4,"value":"\u0000"},"Version45":{"type":"string","name":"Version45","offset":44,"length":8,"offsetbit":0,"scale":"1","mask":"","id":5,"value":"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"},"SerialNumber":{"type":"string","name":"SerialNumber","offset":40,"length":32,"offsetbit":0,"scale":"1","mask":"","id":6,"value":"4000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"}},"keyvalues":{"ID":16798574,"DID":16640,"Block":28499,"Manufacturer05":"r","Model":"\u0000","Version45":"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000","SerialNumber":"4000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"},"arrayResults":[{"type":"uint32le","name":"ID","offset":0,"length":1,"offsetbit":0,"scale":"1","mask":"","id":0,"value":16798574},{"type":"int16le","name":"DID","offset":4,"length":1,"offsetbit":0,"scale":"1","mask":"","id":1,"value":16640},{"type":"int16le","name":"Block","offset":6,"length":1,"offsetbit":0,"scale":"1","mask":"","id":2,"value":28499},{"type":"string","name":"Manufacturer05","offset":10,"length":1,"offsetbit":0,"scale":"1","mask":"","id":3,"value":"r"},{"type":"string","name":"Model","offset":18,"length":1,"offsetbit":0,"scale":"1","mask":"","id":4,"value":"\u0000"},{"type":"string","name":"Version45","offset":44,"length":8,"offsetbit":0,"scale":"1","mask":"","id":5,"value":"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"},{"type":"string","name":"SerialNumber","offset":40,"length":32,"offsetbit":0,"scale":"1","mask":"","id":6,"value":"4000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"}],"buffer":[110,83,0,1,0,65,83,111,108,97,114,69,100,103,101,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,83,69,52,48,48,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,48,48,51,46,50,49,56,54,0,0,0,0,0,0,0,55,70,49,53,48,54,68,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}

```

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [14 December 2020 23:50 UTC](https://discourse.nodered.org/t/processing-int16-values/37425/20 "2020-12-14T23:50:34Z")

</div>

Do these values look correct?

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/2/e20245eb7b745374e2bcade6c6e23161b4cb6d3c.png)

I used your payload from the above post & the info in the modbus parameters screenshot

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/a/5a370a8024f8b77786ab67c2fc43498ce217ef9f.png)

demo flow...

```auto
[{"id":"8fa37f7a.7c8a7","type":"inject","z":"553814a2.1248ec","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":1040,"y":240,"wires":[["a54b9385.4e6c1"]]},{"id":"a54b9385.4e6c1","type":"function","z":"553814a2.1248ec","name":"","func":"\nreturn { \"topic\": \"eb39b2fd.caaee8\", \"messageId\": \"5fd7cdca5c5a707be129c8d7\", \n\"payload\": [{ \"type\": \"string\", \"name\": \"ID02\", \"offset\": 0, \"length\": 4, \"offsetbit\": 0, \"scale\": \"1\", \"mask\": \"\", \"id\": 0, \"value\": \"SunS\" }, \n{ \"type\": \"byte\", \"name\": \"DID03\", \"offset\": 5, \"length\": 1, \"offsetbit\": 0, \"scale\": \"1\", \"mask\": \"\", \"id\": 1, \"value\": 1 }, \n{ \"type\": \"uint16be\", \"name\": \"Block04\", \"offset\": 6, \"length\": 1, \"offsetbit\": 0, \"scale\": \"1\", \"mask\": \"\", \"id\": 2, \"value\": 65 }, \n{ \"type\": \"string\", \"name\": \"Manufacturer05\", \"offset\": 8, \"length\": 32, \"offsetbit\": 0, \"scale\": \"1\", \"mask\": \"\", \"id\": 3, \n\"value\": \"SolarEdge \\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\" }, \n{ \"type\": \"string\", \"name\": \"Model21\", \"offset\": 18, \"length\": 32, \"offsetbit\": 0, \"scale\": \"1\", \"mask\": \"\", \"id\": 4, \"value\": \n\"\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000SE4000\\u0000\\u0000\\u0000\\u0000\" }, { \"type\": \"string\", \"name\": \"Version45\", \"offset\": 44, \"length\": 8, \"offsetbit\": 0, \"scale\": \"1\", \"mask\": \"\", \"id\": 5, \"value\": \"00\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\" }, \n{ \"type\": \"string\", \"name\": \"SerialNumber\", \"offset\": 40, \"length\": 32, \"offsetbit\": 0, \"scale\": \"1\", \"mask\": \"\", \"id\": 6, \"value\": \"SE4000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\" }], \"queueLengthByUnitId\": { \"unitId\": 1, \"queueLength\": 0 }, \"queueUnitId\": 1, \"unitId\": 1, \"modbusRequest\": { \"value\": 1607978442267, \"unitid\": \"1\", \"fc\": 3, \"address\": \"40000\", \"quantity\": \"65\", \"messageId\": \"5fd7cdca5c5a707be129c8d7\" }, \n\"responseBuffer\": \n{ \"data\": [21365, 28243, 1, 65, 21359, 27745, 29253, 25703, 25888, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21317, 13360, 12336, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12336, 12339, 11826, 12600, 13824, 0, 0, 0, 14150, 12597, 12342, 17463, 0, 0, 0, 0, 0, 0, 0, 0, 0], \n\"buffer\": Buffer.from([83, 117, 110, 83, 0, 1, 0, 65, 83, 111, 108, 97, 114, 69, 100, 103, 101, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 69, 52, 48, 48, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 51, 46, 50, 49, 56, 54, 0, 0, 0, 0, 0, 0, 0, 55, 70, 49, 53, 48, 54, 68, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) }, \n\"_msgid\": \"861638c3.74b758\", \"originalPayload\": [21365, 28243, 1, 65, 21359, 27745, 29253, 25703, 25888, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21317, 13360, 12336, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12336, 12339, 11826, 12600, 13824, 0, 0, 0, 14150, 12597, 12342, 17463, 0, 0, 0, 0, 0, 0, 0, 0, 0], \"specification\": { \"options\": { \"byteSwap\": [], \"resultType\": \"array\", \"singleResult\": true, \"msgProperty\": \"payload\", \"setTopic\": false }, \"items\": [{ \"type\": \"string\", \"name\": \"ID02\", \"offset\": 0, \"length\": 4, \"offsetbit\": 0, \"scale\": \"1\", \"mask\": \"\", \"id\": 0, \"value\": \"SunS\" }, { \"type\": \"byte\", \"name\": \"DID03\", \"offset\": 5, \"length\": 1, \"offsetbit\": 0, \"scale\": \"1\", \"mask\": \"\", \"id\": 1, \"value\": 1 }, { \"type\": \"uint16be\", \"name\": \"Block04\", \"offset\": 6, \"length\": 1, \"offsetbit\": 0, \"scale\": \"1\", \"mask\": \"\", \"id\": 2, \"value\": 65 }, { \"type\": \"string\", \"name\": \"Manufacturer05\", \"offset\": 8, \"length\": 32, \"offsetbit\": 0, \"scale\": \"1\", \"mask\": \"\", \"id\": 3, \"value\": \"SolarEdge \\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\" }, { \"type\": \"string\", \"name\": \"Model21\", \"offset\": 18, \"length\": 32, \"offsetbit\": 0, \"scale\": \"1\", \"mask\": \"\", \"id\": 4, \"value\": \"\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000SE4000\\u0000\\u0000\\u0000\\u0000\" }, { \"type\": \"string\", \"name\": \"Version45\", \"offset\": 44, \"length\": 8, \"offsetbit\": 0, \"scale\": \"1\", \"mask\": \"\", \"id\": 5, \"value\": \"00\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\" }, { \"type\": \"string\", \"name\": \"SerialNumber\", \"offset\": 40, \"length\": 32, \"offsetbit\": 0, \"scale\": \"1\", \"mask\": \"\", \"id\": 6, \"value\": \"SE4000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\" }] }, \"values\": [\"SunS\", 1, 65, \"SolarEdge \\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\", \"\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000SE4000\\u0000\\u0000\\u0000\\u0000\", \"00\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\", \"SE4000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\"], \"objectResults\": { \"ID02\": { \"type\": \"string\", \"name\": \"ID02\", \"offset\": 0, \"length\": 4, \"offsetbit\": 0, \"scale\": \"1\", \"mask\": \"\", \"id\": 0, \"value\": \"SunS\" }, \"DID03\": { \"type\": \"byte\", \"name\": \"DID03\", \"offset\": 5, \"length\": 1, \"offsetbit\": 0, \"scale\": \"1\", \"mask\": \"\", \"id\": 1, \"value\": 1 }, \"Block04\": { \"type\": \"uint16be\", \"name\": \"Block04\", \"offset\": 6, \"length\": 1, \"offsetbit\": 0, \"scale\": \"1\", \"mask\": \"\", \"id\": 2, \"value\": 65 }, \"Manufacturer05\": { \"type\": \"string\", \"name\": \"Manufacturer05\", \"offset\": 8, \"length\": 32, \"offsetbit\": 0, \"scale\": \"1\", \"mask\": \"\", \"id\": 3, \"value\": \"SolarEdge \\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\" }, \"Model21\": { \"type\": \"string\", \"name\": \"Model21\", \"offset\": 18, \"length\": 32, \"offsetbit\": 0, \"scale\": \"1\", \"mask\": \"\", \"id\": 4, \"value\": \"\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000SE4000\\u0000\\u0000\\u0000\\u0000\" }, \"Version45\": { \"type\": \"string\", \"name\": \"Version45\", \"offset\": 44, \"length\": 8, \"offsetbit\": 0, \"scale\": \"1\", \"mask\": \"\", \"id\": 5, \"value\": \"00\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\" }, \"SerialNumber\": { \"type\": \"string\", \"name\": \"SerialNumber\", \"offset\": 40, \"length\": 32, \"offsetbit\": 0, \"scale\": \"1\", \"mask\": \"\", \"id\": 6, \"value\": \"SE4000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\" } }, \"keyvalues\": { \"ID02\": \"SunS\", \"DID03\": 1, \"Block04\": 65, \"Manufacturer05\": \"SolarEdge \\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\", \"Model21\": \"\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000SE4000\\u0000\\u0000\\u0000\\u0000\", \"Version45\": \"00\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\", \"SerialNumber\": \"SE4000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\" }, \n\"arrayResults\": [{ \"type\": \"string\", \"name\": \"ID02\", \"offset\": 0, \"length\": 4, \"offsetbit\": 0, \"scale\": \"1\", \"mask\": \"\", \"id\": 0, \"value\": \"SunS\" }, { \"type\": \"byte\", \"name\": \"DID03\", \"offset\": 5, \"length\": 1, \"offsetbit\": 0, \"scale\": \"1\", \"mask\": \"\", \"id\": 1, \"value\": 1 }, { \"type\": \"uint16be\", \"name\": \"Block04\", \"offset\": 6, \"length\": 1, \"offsetbit\": 0, \"scale\": \"1\", \"mask\": \"\", \"id\": 2, \"value\": 65 }, { \"type\": \"string\", \"name\": \"Manufacturer05\", \"offset\": 8, \"length\": 32, \"offsetbit\": 0, \"scale\": \"1\", \"mask\": \"\", \"id\": 3, \"value\": \"SolarEdge \\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\" }, { \"type\": \"string\", \"name\": \"Model21\", \"offset\": 18, \"length\": 32, \"offsetbit\": 0, \"scale\": \"1\", \"mask\": \"\", \"id\": 4, \"value\": \"\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000SE4000\\u0000\\u0000\\u0000\\u0000\" }, { \"type\": \"string\", \"name\": \"Version45\", \"offset\": 44, \"length\": 8, \"offsetbit\": 0, \"scale\": \"1\", \"mask\": \"\", \"id\": 5, \"value\": \"00\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\" }, { \"type\": \"string\", \"name\": \"SerialNumber\", \"offset\": 40, \"length\": 32, \"offsetbit\": 0, \"scale\": \"1\", \"mask\": \"\", \"id\": 6, \"value\": \"SE4000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\" }], \n \"buffer\": Buffer.from([83, 117, 110, 83, 0, 1, 0, 65, 83, 111, 108, 97, 114, 69, 100, 103, 101, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 69, 52, 48, 48, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 51, 46, 50, 49, 56, 54, 0, 0, 0, 0, 0, 0, 0, 55, 70, 49, 53, 48, 54, 68, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) };","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1050,"y":300,"wires":[["546944da.d37fec","45cc6637.f52cc"]]},{"id":"546944da.d37fec","type":"debug","z":"553814a2.1248ec","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1210,"y":300,"wires":[]},{"id":"45cc6637.f52cc","type":"buffer-parser","z":"553814a2.1248ec","name":"","data":"responseBuffer.buffer","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"string","name":"ID","offset":0,"length":4,"offsetbit":0,"scale":"1","mask":""},{"type":"uint16be","name":"DID","offset":4,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint16be","name":"Length","offset":5,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"string","name":"Manufacturer","offset":6,"length":32,"offsetbit":0,"scale":"1","mask":""},{"type":"string","name":"Model","offset":38,"length":32,"offsetbit":0,"scale":"1","mask":""},{"type":"string","name":"Version","offset":70,"length":16,"offsetbit":0,"scale":"1","mask":""},{"type":"string","name":"SerialNo","offset":86,"length":32,"offsetbit":0,"scale":"1","mask":""},{"type":"uint16be","name":"DeviceAddress","offset":118,"length":1,"offsetbit":0,"scale":"1","mask":""}],"swap1":"","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","resultType":"keyvalue","resultTypeType":"output","multipleResult":false,"fanOutMultipleResult":true,"setTopic":false,"outputs":1,"x":1070,"y":360,"wires":[["703d6667.18c618"]]},{"id":"703d6667.18c618","type":"debug","z":"553814a2.1248ec","name":"Output","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1210,"y":360,"wires":[]}]

```

---

<div class="post-metadata">

**Author:** ![UnborN](https://avatars.discourse-cdn.com/v4/letter/u/4491bb/32.png) [@UnborN](https://discourse.nodered.org/u/UnborN)\
**Post date:** [15 December 2020 09:01 UTC](https://discourse.nodered.org/t/processing-int16-values/37425/21 "2020-12-15T09:01:29Z")

</div>

The manual is a bit misleading.  
For SunSpec\_ID 40001 it says its type is UINT32 but then goes on to say its a string "SunS" 😉

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/0/b0289f96d803f41ae3c16c3c5f851c7b9674fe23.png)

@Ianmidd I think you need to read more than 65 registers if you want to include DeviceAddress that is at register 40069.

@Steve-Mcl In these cases (mix types) .. what does Length represent .. it depends on the type ?

[Next page](https://discourse.nodered.org/t/processing-int16-values/37425.md?page=2)
