Modbustcp-read Function Script

Nothing? No values? No Error?

Did you deploy? Perhaps you have the debug pane filtered?

Make sure "All Nodes" is set
image

Check the ModBus config is ticked to log failures...
image

Lastly, put something (anything) in the inject node (should not matter but you never know). I would suggest add a payload of true and topic of read

now reaction

26.11.2022, 20:46:03node: Top outputread : msg : Object
object
topic: "read"
messageId: "63826cfb1445cdc448be33d3"
payload: array[77]
queueLengthByUnitId: object
queueUnitId: 1
unitId: 1
modbusRequest: object
responseBuffer: object
msgid: "6eb367ed.aedee8"

26.11.2022, 20:46:03node: Bottom Outputread : msg : Object
object
topic: "read"
messageId: "63826cfb1445cdc448be33d3"
payload: object
queueLengthByUnitId: object
queueUnitId: 1
unitId: 1
modbusRequest: object
values: array[77]
msgid: "6eb367ed.aedee8"

You need to use the copy value button. And you need to put it in a code block

if i put this trigger and modbus getter in front of a function, the chlorine will show up on my CCU. :smiley:

{"topic":"read","messageId":"63826cfb1445cdc448be33d3","payload":[15651,26477,27695,0,0,0,0,0,0,16256,13107,16179,0,0,62915,16600,18544,0,0,0,0,0,16512,0,16656,13107,16611,0,0,16384,17499,22125,0,0,0,0,0,17352,0,17505,0,0,0,0,0,0,0,0,0,0,0,0,0,15360,17948,0,0,0,0,0,0,0,0,0,0,0,0,0,15360,17948,0,0,0,0,39322,16617,17328],"queueLengthByUnitId":{"unitId":1,"queueLength":0},"queueUnitId":1,"unitId":1,"modbusRequest":{"value":"true","unitid":"1","fc":3,"address":"100","quantity":"77","messageId":"63826cfb1445cdc448be33d3"},"responseBuffer":{"data":[15651,26477,27695,0,0,0,0,0,0,16256,13107,16179,0,0,62915,16600,18544,0,0,0,0,0,16512,0,16656,13107,16611,0,0,16384,17499,22125,0,0,0,0,0,17352,0,17505,0,0,0,0,0,0,0,0,0,0,0,0,0,15360,17948,0,0,0,0,0,0,0,0,0,0,0,0,0,15360,17948,0,0,0,0,39322,16617,17328],"buffer":[61,35,103,109,108,47,0,0,0,0,0,0,0,0,0,0,0,0,63,128,51,51,63,51,0,0,0,0,245,195,64,216,72,112,0,0,0,0,0,0,0,0,0,0,64,128,0,0,65,16,51,51,64,227,0,0,0,0,64,0,68,91,86,109,0,0,0,0,0,0,0,0,0,0,67,200,0,0,68,97,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,60,0,70,28,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,60,0,70,28,0,0,0,0,0,0,0,0,153,154,64,233,67,176]},"_msgid":"6eb367ed.aedee8"}
{"topic":"read","messageId":"63826cfb1445cdc448be33d3","payload":{"data":[15651,26477,27695,0,0,0,0,0,0,16256,13107,16179,0,0,62915,16600,18544,0,0,0,0,0,16512,0,16656,13107,16611,0,0,16384,17499,22125,0,0,0,0,0,17352,0,17505,0,0,0,0,0,0,0,0,0,0,0,0,0,15360,17948,0,0,0,0,0,0,0,0,0,0,0,0,0,15360,17948,0,0,0,0,39322,16617,17328],"buffer":[61,35,103,109,108,47,0,0,0,0,0,0,0,0,0,0,0,0,63,128,51,51,63,51,0,0,0,0,245,195,64,216,72,112,0,0,0,0,0,0,0,0,0,0,64,128,0,0,65,16,51,51,64,227,0,0,0,0,64,0,68,91,86,109,0,0,0,0,0,0,0,0,0,0,67,200,0,0,68,97,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,60,0,70,28,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,60,0,70,28,0,0,0,0,0,0,0,0,153,154,64,233,67,176]},"queueLengthByUnitId":{"unitId":1,"queueLength":0},"queueUnitId":1,"unitId":1,"modbusRequest":{"value":"true","unitid":"1","fc":3,"address":"100","quantity":"77","messageId":"63826cfb1445cdc448be33d3"},"values":[15651,26477,27695,0,0,0,0,0,0,16256,13107,16179,0,0,62915,16600,18544,0,0,0,0,0,16512,0,16656,13107,16611,0,0,16384,17499,22125,0,0,0,0,0,17352,0,17505,0,0,0,0,0,0,0,0,0,0,0,0,0,15360,17948,0,0,0,0,0,0,0,0,0,0,0,0,0,15360,17948,0,0,0,0,39322,16617,17328],"_msgid":"6eb367ed.aedee8"}

ok. so as I was trying to explain yesterday...

Now that you have data arriving, I can demonstrate what I meant...

[{"id":"9b982f6b6b8d11e1","type":"inject","z":"e4f0ea06.4e5b38","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":1280,"y":440,"wires":[["3b6ecb12fbe3cde8"]]},{"id":"3b6ecb12fbe3cde8","type":"function","z":"e4f0ea06.4e5b38","name":"Fake ModBus","func":"const top = {\n    \"topic\": \"read\",\n    \"messageId\": \"63826cfb1445cdc448be33d3\",\n    \"payload\": {\n        \"data\": [\n            15651,\n            26477,\n            27695,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            16256,\n            13107,\n            16179,\n            0,\n            0,\n            62915,\n            16600,\n            18544,\n            0,\n            0,\n            0,\n            0,\n            0,\n            16512,\n            0,\n            16656,\n            13107,\n            16611,\n            0,\n            0,\n            16384,\n            17499,\n            22125,\n            0,\n            0,\n            0,\n            0,\n            0,\n            17352,\n            0,\n            17505,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            15360,\n            17948,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            15360,\n            17948,\n            0,\n            0,\n            0,\n            0,\n            39322,\n            16617,\n            17328\n        ],\n        \"buffer\": [\n            61,\n            35,\n            103,\n            109,\n            108,\n            47,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            63,\n            128,\n            51,\n            51,\n            63,\n            51,\n            0,\n            0,\n            0,\n            0,\n            245,\n            195,\n            64,\n            216,\n            72,\n            112,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            64,\n            128,\n            0,\n            0,\n            65,\n            16,\n            51,\n            51,\n            64,\n            227,\n            0,\n            0,\n            0,\n            0,\n            64,\n            0,\n            68,\n            91,\n            86,\n            109,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            67,\n            200,\n            0,\n            0,\n            68,\n            97,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            60,\n            0,\n            70,\n            28,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            60,\n            0,\n            70,\n            28,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            153,\n            154,\n            64,\n            233,\n            67,\n            176\n        ]\n    },\n    \"queueLengthByUnitId\": {\n        \"unitId\": 1,\n        \"queueLength\": 0\n    },\n    \"queueUnitId\": 1,\n    \"unitId\": 1,\n    \"modbusRequest\": {\n        \"value\": \"true\",\n        \"unitid\": \"1\",\n        \"fc\": 3,\n        \"address\": \"100\",\n        \"quantity\": \"77\",\n        \"messageId\": \"63826cfb1445cdc448be33d3\"\n    },\n    \"values\": [\n        15651,\n        26477,\n        27695,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        16256,\n        13107,\n        16179,\n        0,\n        0,\n        62915,\n        16600,\n        18544,\n        0,\n        0,\n        0,\n        0,\n        0,\n        16512,\n        0,\n        16656,\n        13107,\n        16611,\n        0,\n        0,\n        16384,\n        17499,\n        22125,\n        0,\n        0,\n        0,\n        0,\n        0,\n        17352,\n        0,\n        17505,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        15360,\n        17948,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        15360,\n        17948,\n        0,\n        0,\n        0,\n        0,\n        39322,\n        16617,\n        17328\n    ],\n    \"_msgid\": \"6eb367ed.aedee8\"\n}\n\nconst bottom = {\n    \"topic\": \"read\",\n    \"messageId\": \"63826cfb1445cdc448be33d3\",\n    \"payload\": [\n        15651,\n        26477,\n        27695,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        16256,\n        13107,\n        16179,\n        0,\n        0,\n        62915,\n        16600,\n        18544,\n        0,\n        0,\n        0,\n        0,\n        0,\n        16512,\n        0,\n        16656,\n        13107,\n        16611,\n        0,\n        0,\n        16384,\n        17499,\n        22125,\n        0,\n        0,\n        0,\n        0,\n        0,\n        17352,\n        0,\n        17505,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        15360,\n        17948,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        15360,\n        17948,\n        0,\n        0,\n        0,\n        0,\n        39322,\n        16617,\n        17328\n    ],\n    \"queueLengthByUnitId\": {\n        \"unitId\": 1,\n        \"queueLength\": 0\n    },\n    \"queueUnitId\": 1,\n    \"unitId\": 1,\n    \"modbusRequest\": {\n        \"value\": \"true\",\n        \"unitid\": \"1\",\n        \"fc\": 3,\n        \"address\": \"100\",\n        \"quantity\": \"77\",\n        \"messageId\": \"63826cfb1445cdc448be33d3\"\n    },\n    \"responseBuffer\": {\n        \"data\": [\n            15651,\n            26477,\n            27695,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            16256,\n            13107,\n            16179,\n            0,\n            0,\n            62915,\n            16600,\n            18544,\n            0,\n            0,\n            0,\n            0,\n            0,\n            16512,\n            0,\n            16656,\n            13107,\n            16611,\n            0,\n            0,\n            16384,\n            17499,\n            22125,\n            0,\n            0,\n            0,\n            0,\n            0,\n            17352,\n            0,\n            17505,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            15360,\n            17948,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            15360,\n            17948,\n            0,\n            0,\n            0,\n            0,\n            39322,\n            16617,\n            17328\n        ],\n        \"buffer\": [\n            61,\n            35,\n            103,\n            109,\n            108,\n            47,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            63,\n            128,\n            51,\n            51,\n            63,\n            51,\n            0,\n            0,\n            0,\n            0,\n            245,\n            195,\n            64,\n            216,\n            72,\n            112,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            64,\n            128,\n            0,\n            0,\n            65,\n            16,\n            51,\n            51,\n            64,\n            227,\n            0,\n            0,\n            0,\n            0,\n            64,\n            0,\n            68,\n            91,\n            86,\n            109,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            67,\n            200,\n            0,\n            0,\n            68,\n            97,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            60,\n            0,\n            70,\n            28,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            60,\n            0,\n            70,\n            28,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            153,\n            154,\n            64,\n            233,\n            67,\n            176\n        ]\n    },\n    \"_msgid\": \"6eb367ed.aedee8\"\n}\n\n\nreturn [top, bottom]","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1460,"y":440,"wires":[["6baca02393f91069"],["7a7155e33e5a7852","576c4564f2231d89"]]},{"id":"7a7155e33e5a7852","type":"buffer-parser","z":"e4f0ea06.4e5b38","name":"","data":"payload","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"floatbe","name":"chlor_wert","offset":0,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"floatbe","name":"ph_wert","offset":15,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"floatbe","name":"redox_wert","offset":30,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint16be","name":"temp","offset":75,"length":1,"offsetbit":0,"scale":"/1000","mask":""},{"type":"floatbe","name":"cl_soll","offset":11,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"floatbe","name":"ph_soll","offset":26,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"floatbe","name":"item7","offset":13,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"floatbe","name":"item8","offset":28,"length":1,"offsetbit":0,"scale":"1","mask":""}],"swap1":"","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","resultType":"value","resultTypeType":"return","multipleResult":true,"fanOutMultipleResult":true,"setTopic":true,"outputs":8,"x":1670,"y":520,"wires":[["d9f3de12.3a2ee"],["c045f3ba.6deb1"],["3d44e72ce57e05ce"],["fac4119b3456ef55"],[],[],[],[]]},{"id":"d9f3de12.3a2ee","type":"debug","z":"e4f0ea06.4e5b38","name":"chlor_wert","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1990,"y":380,"wires":[]},{"id":"c045f3ba.6deb1","type":"debug","z":"e4f0ea06.4e5b38","name":"ph_wert","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1980,"y":440,"wires":[]},{"id":"3d44e72ce57e05ce","type":"debug","z":"e4f0ea06.4e5b38","name":"redox_wert","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1990,"y":500,"wires":[]},{"id":"6baca02393f91069","type":"debug","z":"e4f0ea06.4e5b38","name":"data top","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1660,"y":380,"wires":[]},{"id":"576c4564f2231d89","type":"debug","z":"e4f0ea06.4e5b38","name":"data bottom","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1670,"y":440,"wires":[]},{"id":"fac4119b3456ef55","type":"debug","z":"e4f0ea06.4e5b38","name":"temp","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1970,"y":560,"wires":[]}]

NOTES...

  1. You will need to install node-red-buffer-parser
  2. I have no idea what the specification of your data is (so I guessed in the buffer-parser)

Chlor_wert debug ok
PH_wert debug false
Redox_wert false (ph_wert)
temp false (51grad Celsius)

data top

{"topic":"read","messageId":"63826cfb1445cdc448be33d3","payload":{"data":[15651,26477,27695,0,0,0,0,0,0,16256,13107,16179,0,0,62915,16600,18544,0,0,0,0,0,16512,0,16656,13107,16611,0,0,16384,17499,22125,0,0,0,0,0,17352,0,17505,0,0,0,0,0,0,0,0,0,0,0,0,0,15360,17948,0,0,0,0,0,0,0,0,0,0,0,0,0,15360,17948,0,0,0,0,39322,16617,17328],"buffer":[61,35,103,109,108,47,0,0,0,0,0,0,0,0,0,0,0,0,63,128,51,51,63,51,0,0,0,0,245,195,64,216,72,112,0,0,0,0,0,0,0,0,0,0,64,128,0,0,65,16,51,51,64,227,0,0,0,0,64,0,68,91,86,109,0,0,0,0,0,0,0,0,0,0,67,200,0,0,68,97,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,60,0,70,28,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,60,0,70,28,0,0,0,0,0,0,0,0,153,154,64,233,67,176]},"queueLengthByUnitId":{"unitId":1,"queueLength":0},"queueUnitId":1,"unitId":1,"modbusRequest":{"value":"true","unitid":"1","fc":3,"address":"100","quantity":"77","messageId":"63826cfb1445cdc448be33d3"},"values":[15651,26477,27695,0,0,0,0,0,0,16256,13107,16179,0,0,62915,16600,18544,0,0,0,0,0,16512,0,16656,13107,16611,0,0,16384,17499,22125,0,0,0,0,0,17352,0,17505,0,0,0,0,0,0,0,0,0,0,0,0,0,15360,17948,0,0,0,0,0,0,0,0,0,0,0,0,0,15360,17948,0,0,0,0,39322,16617,17328],"_msgid":"32af9396.fb658c"}

data bottom

{"topic":"read","messageId":"63826cfb1445cdc448be33d3","payload":[15651,26477,27695,0,0,0,0,0,0,16256,13107,16179,0,0,62915,16600,18544,0,0,0,0,0,16512,0,16656,13107,16611,0,0,16384,17499,22125,0,0,0,0,0,17352,0,17505,0,0,0,0,0,0,0,0,0,0,0,0,0,15360,17948,0,0,0,0,0,0,0,0,0,0,0,0,0,15360,17948,0,0,0,0,39322,16617,17328],"queueLengthByUnitId":{"unitId":1,"queueLength":0},"queueUnitId":1,"unitId":1,"modbusRequest":{"value":"true","unitid":"1","fc":3,"address":"100","quantity":"77","messageId":"63826cfb1445cdc448be33d3"},"responseBuffer":{"data":[15651,26477,27695,0,0,0,0,0,0,16256,13107,16179,0,0,62915,16600,18544,0,0,0,0,0,16512,0,16656,13107,16611,0,0,16384,17499,22125,0,0,0,0,0,17352,0,17505,0,0,0,0,0,0,0,0,0,0,0,0,0,15360,17948,0,0,0,0,0,0,0,0,0,0,0,0,0,15360,17948,0,0,0,0,39322,16617,17328],"buffer":[61,35,103,109,108,47,0,0,0,0,0,0,0,0,0,0,0,0,63,128,51,51,63,51,0,0,0,0,245,195,64,216,72,112,0,0,0,0,0,0,0,0,0,0,64,128,0,0,65,16,51,51,64,227,0,0,0,0,64,0,68,91,86,109,0,0,0,0,0,0,0,0,0,0,67,200,0,0,68,97,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,60,0,70,28,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,60,0,70,28,0,0,0,0,0,0,0,0,153,154,64,233,67,176]},"_msgid":"32af9396.fb658c"}

As I said, I have no idea what the data is supposed to look like (do you have a manual?)

Site 46

Ok, so you now have all the info you need right?

yes, I had that before. All registers I need and data types. Nevertheless, at offset 15, for example, the wrong PH value comes out.

Can't I make a flex getter for each value?

Sometimes the modbus implementation is off by 1. For example it may be you need offset 16 or offset 14. Sometimes they don't tell you a value is byte swapped etc.

What I'm saying is try stuff.

I can also assist but you would need to provide another "copy value" & a list of values you expect. Without knowing what numbers you are expecting I can not assist further.

What value do you expect from offset 15?

register 115 target value 6.7 (is 8.8)
I'll try it out

PS:offset 14/16 does not work

Data top output

{"topic":"read","messageId":"63826cfb1445cdc448be33d3","payload":{"data":[15651,26477,27695,0,0,0,0,0,0,16256,13107,16179,0,0,62915,16600,18544,0,0,0,0,0,16512,0,16656,13107,16611,0,0,16384,17499,22125,0,0,0,0,0,17352,0,17505,0,0,0,0,0,0,0,0,0,0,0,0,0,15360,17948,0,0,0,0,0,0,0,0,0,0,0,0,0,15360,17948,0,0,0,0,39322,16617,17328],"buffer":[61,35,103,109,108,47,0,0,0,0,0,0,0,0,0,0,0,0,63,128,51,51,63,51,0,0,0,0,245,195,64,216,72,112,0,0,0,0,0,0,0,0,0,0,64,128,0,0,65,16,51,51,64,227,0,0,0,0,64,0,68,91,86,109,0,0,0,0,0,0,0,0,0,0,67,200,0,0,68,97,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,60,0,70,28,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,60,0,70,28,0,0,0,0,0,0,0,0,153,154,64,233,67,176]},"queueLengthByUnitId":{"unitId":1,"queueLength":0},"queueUnitId":1,"unitId":1,"modbusRequest":{"value":"true","unitid":"1","fc":3,"address":"100","quantity":"77","messageId":"63826cfb1445cdc448be33d3"},"values":[15651,26477,27695,0,0,0,0,0,0,16256,13107,16179,0,0,62915,16600,18544,0,0,0,0,0,16512,0,16656,13107,16611,0,0,16384,17499,22125,0,0,0,0,0,17352,0,17505,0,0,0,0,0,0,0,0,0,0,0,0,0,15360,17948,0,0,0,0,0,0,0,0,0,0,0,0,0,15360,17948,0,0,0,0,39322,16617,17328],"_msgid":"11489ad9.274d35"}

Data bottom output

{"topic":"read","messageId":"63826cfb1445cdc448be33d3","payload":[15651,26477,27695,0,0,0,0,0,0,16256,13107,16179,0,0,62915,16600,18544,0,0,0,0,0,16512,0,16656,13107,16611,0,0,16384,17499,22125,0,0,0,0,0,17352,0,17505,0,0,0,0,0,0,0,0,0,0,0,0,0,15360,17948,0,0,0,0,0,0,0,0,0,0,0,0,0,15360,17948,0,0,0,0,39322,16617,17328],"queueLengthByUnitId":{"unitId":1,"queueLength":0},"queueUnitId":1,"unitId":1,"modbusRequest":{"value":"true","unitid":"1","fc":3,"address":"100","quantity":"77","messageId":"63826cfb1445cdc448be33d3"},"responseBuffer":{"data":[15651,26477,27695,0,0,0,0,0,0,16256,13107,16179,0,0,62915,16600,18544,0,0,0,0,0,16512,0,16656,13107,16611,0,0,16384,17499,22125,0,0,0,0,0,17352,0,17505,0,0,0,0,0,0,0,0,0,0,0,0,0,15360,17948,0,0,0,0,0,0,0,0,0,0,0,0,0,15360,17948,0,0,0,0,39322,16617,17328],"buffer":[61,35,103,109,108,47,0,0,0,0,0,0,0,0,0,0,0,0,63,128,51,51,63,51,0,0,0,0,245,195,64,216,72,112,0,0,0,0,0,0,0,0,0,0,64,128,0,0,65,16,51,51,64,227,0,0,0,0,64,0,68,91,86,109,0,0,0,0,0,0,0,0,0,0,67,200,0,0,68,97,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,60,0,70,28,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,60,0,70,28,0,0,0,0,0,0,0,0,153,154,64,233,67,176]},"_msgid":"11489ad9.274d35"}

the first value at data top output is: data and only then values

In addition, not all 77 registers have the same data format and bit size.

I am not certain why you point that out? I am well aware of how devices pack data into 16bit ModBus registers - that is why I proposed you use the buffer-parser since it parses the buffer into whatever shape you need. It extracts either a bit, a byte, a WORD, a Double, a BigInt from whatever position in the input data you specify by the offset.

The manual states, for address 115 that it is a "FLOAT 4" value. It goes on to state "The Float or Real values are transferred in accordance with the IEEE754 Standard Format for 32-bit values". This is exactly what the Buffer Parser does (JavaScript/NodeJS adheres to IEEE754 format

HOWEVER, many times, what the manual says and what the firmware does are not the same. For example, often, a value is a UINT32/1000 or it is an INT16/10, sometimes the value is 16 or 32 bit swapped etc etc etc etc.

You have the data, you have the tools, all I can suggest is try different ways of parsing the data. Also, have you tried adding other items to the buffer parser (e.g. offset 26

I've already tried, but everything came to the wrong result.

Is it correct that data top output outputs the first value data and then values?

Read the built in help - it explains what each output does.

I can help you but I need very precise info. For example, I need a snapshot of the data (from "Copy Value") AND the EXACT values they should be at the exact time the "Copy Value" was taken.


You need to provide something like ...


Snapshot of data taken at 15:22:37

*1  [ the captured data "Copy Value" output of top + bottom ]

Actual values on the device when above snapshot was taken at 15:22:37

Item Register Value on the pool meter when the snapshot was taken
Chlor Measure Value 100 0.512     **2
Chlor Setpoint 111 0.500     **2
pH Measure Value 115 6.8     **2
pH Setpoint 126 7.2     **2
Total chlorine Measure Value 145 0.999     **2
Total chlorine Setpoint 156 0.789     **2
Temperature Measure Value 175 21.2     **2
Temperature Lower range 182 19.5     **2
Temperature Upper range 184 24.5     **2

*1   Provide "Copy Value" data from modbus
**2 Provide REAL values from the Pool Meter - written down at the exact moment that *1 was done


Without this I cannot help further.

{"topic":"read","messageId":"63826cfb1445cdc448be33d3","payload":{"data":[15651,26477,27695,0,0,0,0,0,0,16256,13107,16179,0,0,62915,16600,18544,0,0,0,0,0,16512,0,16656,13107,16611,0,0,16384,17499,22125,0,0,0,0,0,17352,0,17505,0,0,0,0,0,0,0,0,0,0,0,0,0,15360,17948,0,0,0,0,0,0,0,0,0,0,0,0,0,15360,17948,0,0,0,0,39322,16617,17328],"buffer":[61,35,103,109,108,47,0,0,0,0,0,0,0,0,0,0,0,0,63,128,51,51,63,51,0,0,0,0,245,195,64,216,72,112,0,0,0,0,0,0,0,0,0,0,64,128,0,0,65,16,51,51,64,227,0,0,0,0,64,0,68,91,86,109,0,0,0,0,0,0,0,0,0,0,67,200,0,0,68,97,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,60,0,70,28,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,60,0,70,28,0,0,0,0,0,0,0,0,153,154,64,233,67,176]},"queueLengthByUnitId":{"unitId":1,"queueLength":0},"queueUnitId":1,"unitId":1,"modbusRequest":{"value":"true","unitid":"1","fc":3,"address":"100","quantity":"77","messageId":"63826cfb1445cdc448be33d3"},"values":[15651,26477,27695,0,0,0,0,0,0,16256,13107,16179,0,0,62915,16600,18544,0,0,0,0,0,16512,0,16656,13107,16611,0,0,16384,17499,22125,0,0,0,0,0,17352,0,17505,0,0,0,0,0,0,0,0,0,0,0,0,0,15360,17948,0,0,0,0,0,0,0,0,0,0,0,0,0,15360,17948,0,0,0,0,39322,16617,17328],"_msgid":"f8fc404e.664e4"}
{"topic":"read","messageId":"63826cfb1445cdc448be33d3","payload":[15651,26477,27695,0,0,0,0,0,0,16256,13107,16179,0,0,62915,16600,18544,0,0,0,0,0,16512,0,16656,13107,16611,0,0,16384,17499,22125,0,0,0,0,0,17352,0,17505,0,0,0,0,0,0,0,0,0,0,0,0,0,15360,17948,0,0,0,0,0,0,0,0,0,0,0,0,0,15360,17948,0,0,0,0,39322,16617,17328],"queueLengthByUnitId":{"unitId":1,"queueLength":0},"queueUnitId":1,"unitId":1,"modbusRequest":{"value":"true","unitid":"1","fc":3,"address":"100","quantity":"77","messageId":"63826cfb1445cdc448be33d3"},"responseBuffer":{"data":[15651,26477,27695,0,0,0,0,0,0,16256,13107,16179,0,0,62915,16600,18544,0,0,0,0,0,16512,0,16656,13107,16611,0,0,16384,17499,22125,0,0,0,0,0,17352,0,17505,0,0,0,0,0,0,0,0,0,0,0,0,0,15360,17948,0,0,0,0,0,0,0,0,0,0,0,0,0,15360,17948,0,0,0,0,39322,16617,17328],"buffer":[61,35,103,109,108,47,0,0,0,0,0,0,0,0,0,0,0,0,63,128,51,51,63,51,0,0,0,0,245,195,64,216,72,112,0,0,0,0,0,0,0,0,0,0,64,128,0,0,65,16,51,51,64,227,0,0,0,0,64,0,68,91,86,109,0,0,0,0,0,0,0,0,0,0,67,200,0,0,68,97,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,60,0,70,28,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,60,0,70,28,0,0,0,0,0,0,0,0,153,154,64,233,67,176]},"_msgid":"f8fc404e.664e4"}

No, not good enough I'm afraid. If you want further help, please do respond exactly as I requested.

you have all the information