How to process multiple data

Hi,
Via TCP communication I'm receiving buffer of HEX data about real temperature of 16 devices.
To show value I must recalculate via function. Is it necessary have a special function for each one or is possible have one function for all ?
First I'm using buffer parser :


and then I'm processing each hex value separately:

Is it necessary do it in this way or is any more simple solution ?
Thanks
Alex

What is the calculation in the function?

Yes - share your flow and I will show you how.
Also, include sample data (add a debug node to TCP node, capture the data using the "copy value" button that appears under your mouse pointer when you hover over the payload)




CANNED TEXT...

How to get data from a message

There’s a great page in the docs that will explain how to use the debug panel to find the right path to any data item.

Pay particular attention to the part about the buttons that appear under your mouse pointer when you over hover a debug message property in the sidebar.

BX00Cy7yHi

user-guide/messages

How to post code or exported flow

In order to make code readable and usable it is necessary to surround your code with three backticks (also known as a left quote or backquote ```)

``` 
   code goes here 
```

See this post for more details - How to share code or flow json

Here is a flow

[{"id":"74d8a1b8.dd1b4","type":"inject","z":"70b5d986.cef568","name":"Trigger on start and then every 5 minutes","props":[{"p":"payload","v":"","vt":"date"},{"p":"topic","v":"","vt":"string"}],"repeat":"300","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":180,"y":640,"wires":[["e2e45ffc.09cf5","a2bfb44b.8a9ff8"]]},{"id":"e2e45ffc.09cf5","type":"delay","z":"70b5d986.cef568","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":420,"y":620,"wires":[["65cd07e8.7d97f8"]]},{"id":"65cd07e8.7d97f8","type":"change","z":"70b5d986.cef568","name":"Real values","rules":[{"t":"set","p":"payload","pt":"msg","to":"[\"0x10\",\"0x01\",\"0xFF\",\"0xFF\",\"0x00\",\"0x60\",\"0x78\",\"0x02\",\"0x43\",\"0xA1\",\"0xFF\"]","tot":"bin"}],"action":"","property":"","from":"","to":"","reg":false,"x":470,"y":480,"wires":[["904d34ae.ef7be8"]]},{"id":"a2bfb44b.8a9ff8","type":"change","z":"70b5d986.cef568","name":"Requested vakues and status","rules":[{"t":"set","p":"payload","pt":"msg","to":"[\"0x10\",\"0x01\",\"0xFF\",\"0xFF\",\"0x00\",\"0x70\",\"0x78\",\"0x02\",\"0x53\",\"0xB1\",\"0xFF\"]","tot":"bin"}],"action":"","property":"","from":"","to":"","reg":false,"x":450,"y":740,"wires":[["1661a68.27a195a"]]},{"id":"904d34ae.ef7be8","type":"tcp request","z":"70b5d986.cef568","server":"192.168.0.178","port":"45000","out":"time","splitc":"1000","name":"","x":690,"y":360,"wires":[["7b6c56a5.d52e58","70e7228c.0ecb9c"]]},{"id":"1661a68.27a195a","type":"tcp request","z":"70b5d986.cef568","server":"192.168.0.178","port":"45000","out":"time","splitc":"1000","name":"","x":710,"y":880,"wires":[["28a21573.ea443a","17fc20e3.8c87ef"]]},{"id":"28a21573.ea443a","type":"buffer-parser","z":"70b5d986.cef568","name":"","data":"payload","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"hex","name":"item1","offset":6,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"hex","name":"item2","offset":7,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"hex","name":"item3","offset":8,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"hex","name":"item4","offset":9,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"hex","name":"item5","offset":10,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"hex","name":"item6","offset":11,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"hex","name":"item7","offset":12,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"hex","name":"item8","offset":13,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"hex","name":"item9","offset":14,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"hex","name":"item10","offset":15,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"hex","name":"item11","offset":16,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"hex","name":"item12","offset":17,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"hex","name":"item13","offset":18,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"hex","name":"item14","offset":19,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"hex","name":"item15","offset":20,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"hex","name":"item16","offset":21,"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":false,"outputs":16,"x":930,"y":880,"wires":[[],[],[],[],[],[],[],[],[],[],[],[],[],["df92706e.23e07","94906d51.5bed2"],["e37a3db8.1ae43","5ea667dc.617b68"],["336c8e15.21e832","b961a5db.3c1868"]]},{"id":"7b6c56a5.d52e58","type":"buffer-parser","z":"70b5d986.cef568","name":"Real values","data":"payload","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"uint8","name":"item1","offset":6,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint8","name":"item2","offset":7,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint8","name":"item3","offset":8,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint8","name":"item4","offset":9,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint8","name":"item5","offset":10,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint8","name":"item6","offset":11,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint8","name":"item7","offset":12,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint8","name":"item8","offset":13,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint8","name":"item9","offset":14,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint8","name":"item10","offset":15,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint8","name":"item11","offset":16,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint8","name":"item12","offset":17,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint8","name":"item13","offset":18,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint8","name":"item14","offset":19,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint8","name":"item15","offset":20,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint8","name":"item16","offset":21,"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":16,"x":930,"y":360,"wires":[[],[],[],[],[],[],[],[],[],[],[],[],[],["471537e8.fb1be8"],["5386a391.5d545c"],["e0b2d567.18cbb8"]]},{"id":"e0b2d567.18cbb8","type":"change","z":"70b5d986.cef568","name":"","rules":[{"t":"set","p":"room3RT","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1170,"y":520,"wires":[["b740d6e0.9e5678"]]},{"id":"5386a391.5d545c","type":"change","z":"70b5d986.cef568","name":"","rules":[{"t":"set","p":"room2RT","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1170,"y":500,"wires":[["2840fb01.d5f974"]]},{"id":"471537e8.fb1be8","type":"change","z":"70b5d986.cef568","name":"","rules":[{"t":"set","p":"room1RT","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1170,"y":480,"wires":[["ef2a85f7.830d18"]]},{"id":"ef2a85f7.830d18","type":"function","z":"70b5d986.cef568","name":"Cmp.RT/POT","func":"var RT = flow.get(\"room1RT\");\nvar POT = flow.get(\"room1POT\");\nif ( RT == POT ) {\n  msg.color = \"white\"\n} else if ( RT > POT ) {\n  msg.color = \"red\"\n} else if ( RT < POT ) {\n  msg.color = \"blue\"\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1360,"y":480,"wires":[["a0d6625.f4f5ba"]]},{"id":"2840fb01.d5f974","type":"function","z":"70b5d986.cef568","name":"Cmp.RT/POT","func":"var RT = flow.get(\"room2RT\");\nvar POT = flow.get(\"room2POT\");\nif ( RT == POT ) {\n  msg.color = \"white\"\n} else if ( RT > POT ) {\n  msg.color = \"red\"\n} else if ( RT < POT ) {\n  msg.color = \"blue\"\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1360,"y":500,"wires":[["8371c1df.f24cb"]]},{"id":"b740d6e0.9e5678","type":"function","z":"70b5d986.cef568","name":"Cmp.RT/POT","func":"var RT = flow.get(\"room3RT\");\nvar POT = flow.get(\"room3POT\");\nif ( RT == POT ) {\n  msg.color = \"white\"\n} else if ( RT > POT ) {\n  msg.color = \"red\"\n} else if ( RT < POT ) {\n  msg.color = \"blue\"\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1360,"y":520,"wires":[["9b032a76.de9248"]]},{"id":"336c8e15.21e832","type":"function","z":"70b5d986.cef568","name":"room3POT","func":"msg.payload = (parseInt(msg.payload,16).toString(2)).padStart(8, '0');\nmsg.payload =msg.payload.substr(3, 5);\nmsg.payload = parseInt(msg.payload, 2);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1210,"y":1200,"wires":[["6576634b.c4fe1c"]]},{"id":"e37a3db8.1ae43","type":"function","z":"70b5d986.cef568","name":"room2POT","func":"msg.payload = (parseInt(msg.payload,16).toString(2)).padStart(8, '0');\nmsg.payload =msg.payload.substr(3, 5);\nmsg.payload = parseInt(msg.payload, 2);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1210,"y":1160,"wires":[["d36041bc.28f56"]]},{"id":"df92706e.23e07","type":"function","z":"70b5d986.cef568","name":"room1status","func":"var mod = msg.payload\nlet answer;\nmod = (parseInt(mod,16).toString(2)).padStart(8, '0');\nmod = mod.substr(0, 3);\nif ( mod == \"000\" ) {\n  answer = \"1\"\n} else if ( mod == \"001\" ) {\n  answer = \"2\"\n} else if ( mod == \"010\" ) {\n  answer = \"3\"\n} else if ( mod == \"011\" ) {\n  answer = \"4\"\n} else if ( mod == \"100\" ) {\n  answer = \"PRG\"\n} else if ( mod == \"111\" ) {\n  answer = \"xxx\"\n} \nmsg.payload = answer;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1210,"y":1140,"wires":[["71500ed9.1d2ae"]]},{"id":"94906d51.5bed2","type":"function","z":"70b5d986.cef568","name":"room1POT","func":"msg.payload = (parseInt(msg.payload,16).toString(2)).padStart(8, '0');\nmsg.payload =msg.payload.substr(3, 5);\nmsg.payload = parseInt(msg.payload, 2);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1210,"y":1120,"wires":[["9f30bc40.8ff2a"]]},{"id":"5473543f.8e65ec","type":"ui_text","z":"70b5d986.cef568","group":"fbfdff6d.980db","order":3,"width":3,"height":1,"name":"","label":"","format":"{{msg.payload}}","layout":"col-center","className":"","x":1350,"y":1220,"wires":[]},{"id":"6576634b.c4fe1c","type":"change","z":"70b5d986.cef568","name":"","rules":[{"t":"set","p":"room3POT","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1470,"y":1200,"wires":[["403e0ee3.3604"]]},{"id":"403e0ee3.3604","type":"ui_text","z":"70b5d986.cef568","group":"fbfdff6d.980db","order":2,"width":3,"height":1,"name":"","label":"","format":"{{msg.payload + 5}}","layout":"col-center","className":"","x":1630,"y":1200,"wires":[]},{"id":"4ea062d8.819b2c","type":"ui_text","z":"70b5d986.cef568","group":"add5247.d4d75d8","order":3,"width":3,"height":1,"name":"","label":"","format":"{{msg.payload}}","layout":"col-center","className":"","x":1350,"y":1180,"wires":[]},{"id":"d36041bc.28f56","type":"change","z":"70b5d986.cef568","name":"","rules":[{"t":"set","p":"room2POT","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1470,"y":1160,"wires":[["ce777ca7.9faab"]]},{"id":"ce777ca7.9faab","type":"ui_text","z":"70b5d986.cef568","group":"add5247.d4d75d8","order":2,"width":3,"height":1,"name":"","label":"","format":"{{msg.payload + 5}}","layout":"col-center","className":"","x":1630,"y":1160,"wires":[]},{"id":"71500ed9.1d2ae","type":"ui_text","z":"70b5d986.cef568","group":"3da36874.a9b2c8","order":3,"width":3,"height":1,"name":"","label":"","format":"{{msg.payload}}","layout":"col-center","className":"","x":1350,"y":1140,"wires":[]},{"id":"9f30bc40.8ff2a","type":"change","z":"70b5d986.cef568","name":"","rules":[{"t":"set","p":"room1POT","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1470,"y":1120,"wires":[["6a191d09.8997e4"]]},{"id":"6a191d09.8997e4","type":"ui_text","z":"70b5d986.cef568","group":"3da36874.a9b2c8","order":2,"width":3,"height":1,"name":"","label":"","format":"{{msg.payload + 5}}","layout":"col-center","className":"","x":1630,"y":1120,"wires":[]},{"id":"70e7228c.0ecb9c","type":"debug","z":"70b5d986.cef568","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":960,"y":180,"wires":[]},{"id":"17fc20e3.8c87ef","type":"debug","z":"70b5d986.cef568","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":960,"y":700,"wires":[]},{"id":"9b032a76.de9248","type":"ui_text","z":"70b5d986.cef568","group":"fbfdff6d.980db","order":1,"width":3,"height":1,"name":"","label":"","format":"<font color= {{msg.color}} > {{msg.payload + 5}} </font>","layout":"col-center","className":"","x":1530,"y":520,"wires":[],"inputLabels":["Ložnice reálná teplota"]},{"id":"8371c1df.f24cb","type":"ui_text","z":"70b5d986.cef568","group":"add5247.d4d75d8","order":1,"width":3,"height":1,"name":"","label":"","format":"<font color= {{msg.color}} > {{msg.payload + 5}} </font>","layout":"col-center","className":"","x":1530,"y":500,"wires":[],"inputLabels":["Pracovna ulice reálná teplota"]},{"id":"a0d6625.f4f5ba","type":"ui_text","z":"70b5d986.cef568","group":"3da36874.a9b2c8","order":1,"width":3,"height":1,"name":"","label":"","format":"<font color= {{msg.color}} > {{msg.payload + 5}} </font>","layout":"col-center","className":"","x":1530,"y":480,"wires":[],"inputLabels":["Pracovna broskev reálná teplota"]},{"id":"5ea667dc.617b68","type":"function","z":"70b5d986.cef568","name":"room2status","func":"var mod = msg.payload\nlet answer;\nmod = (parseInt(mod,16).toString(2)).padStart(8, '0');\nmod = mod.substr(0, 3);\nif ( mod == \"000\" ) {\n  answer = \"1\"\n} else if ( mod == \"001\" ) {\n  answer = \"2\"\n} else if ( mod == \"010\" ) {\n  answer = \"3\"\n} else if ( mod == \"011\" ) {\n  answer = \"4\"\n} else if ( mod == \"100\" ) {\n  answer = \"PRG\"\n} else if ( mod == \"111\" ) {\n  answer = \"xxx\"\n} \nmsg.payload = answer;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1210,"y":1180,"wires":[["4ea062d8.819b2c"]]},{"id":"b961a5db.3c1868","type":"function","z":"70b5d986.cef568","name":"room3status","func":"var mod = msg.payload\nlet answer;\nmod = (parseInt(mod,16).toString(2)).padStart(8, '0');\nmod = mod.substr(0, 3);\nif ( mod == \"000\" ) {\n  answer = \"1\"\n} else if ( mod == \"001\" ) {\n  answer = \"2\"\n} else if ( mod == \"010\" ) {\n  answer = \"3\"\n} else if ( mod == \"011\" ) {\n  answer = \"4\"\n} else if ( mod == \"100\" ) {\n  answer = \"PRG\"\n} else if ( mod == \"111\" ) {\n  answer = \"xxx\"\n} \nmsg.payload = answer;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1210,"y":1220,"wires":[["5473543f.8e65ec"]]},{"id":"fbfdff6d.980db","type":"ui_group","name":"Group 3","tab":"befeb13c.bfa17","order":3,"disp":true,"width":6},{"id":"add5247.d4d75d8","type":"ui_group","name":"Group 2","tab":"befeb13c.bfa17","order":2,"disp":true,"width":6},{"id":"3da36874.a9b2c8","type":"ui_group","name":"Group 1","tab":"befeb13c.bfa17","order":1,"disp":true,"width":6},{"id":"befeb13c.bfa17","type":"ui_tab","name":"Tab 1","icon":"dashboard","order":1}]

and values
first answer
[255,255,16,23,255,255,141,255,129,141,141,255,255,129,143,143,143,143,143,141,141,141,0,0,151,221]
second answer after 5sec
[255,255,16,23,255,255,13,31,12,14,14,31,31,18,16,15,15,15,15,13,13,15,0,0,148,190]

is it all what you need ?
Thanks
Alex

Been busy with bugs etc. Will respond soon.

no problem. Thanks a lot for help

Hi, while I cannot quite see how your logic works (i suspect there are existing issues) I can offer you a more manageable way to work by using single (re-usable) functions (via LINK CALL) and show you how to name the values for better debugging and understanding.

Your flow...

This is the my modifications

[{"id":"28a21573.ea443a","type":"buffer-parser","z":"a44db49552121df2","name":"","data":"payload","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"hex","name":"item1","offset":6,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"hex","name":"item2","offset":7,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"hex","name":"item3","offset":8,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"hex","name":"item4","offset":9,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"hex","name":"item5","offset":10,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"hex","name":"item6","offset":11,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"hex","name":"item7","offset":12,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"hex","name":"item8","offset":13,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"hex","name":"item9","offset":14,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"hex","name":"item10","offset":15,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"hex","name":"item11","offset":16,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"hex","name":"item12","offset":17,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"hex","name":"item13","offset":18,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint8","name":"room1POT","offset":19,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint8","name":"room2POT","offset":20,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint8","name":"room3POT","offset":21,"length":1,"offsetbit":0,"scale":"1","mask":""}],"swap1":"","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","resultType":"keyvalue","resultTypeType":"return","multipleResult":false,"fanOutMultipleResult":true,"setTopic":false,"outputs":1,"x":410,"y":480,"wires":[["e2d9f453c503b642","f4df18a91ef96436"]]},{"id":"7b6c56a5.d52e58","type":"buffer-parser","z":"a44db49552121df2","name":"Real values","data":"payload","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"uint8","name":"item1","offset":6,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint8","name":"item2","offset":7,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint8","name":"item3","offset":8,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint8","name":"item4","offset":9,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint8","name":"item5","offset":10,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint8","name":"item6","offset":11,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint8","name":"item7","offset":12,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint8","name":"item8","offset":13,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint8","name":"item9","offset":14,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint8","name":"item10","offset":15,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint8","name":"item11","offset":16,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint8","name":"item12","offset":17,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint8","name":"item13","offset":18,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint8","name":"room1RT","offset":19,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint8","name":"room2RT","offset":20,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint8","name":"room3RT","offset":21,"length":1,"offsetbit":0,"scale":"1","mask":""}],"swap1":"","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","resultType":"keyvalue","resultTypeType":"return","multipleResult":false,"fanOutMultipleResult":false,"setTopic":true,"outputs":1,"x":490,"y":200,"wires":[["2a08c251412a6eeb","ee8ff341ba0cae8d","9719ade126ac2f0f","837b1c1187a33b87"]]},{"id":"71500ed9.1d2ae","type":"ui_text","z":"a44db49552121df2","group":"3da36874.a9b2c8","order":3,"width":3,"height":1,"name":"","label":"","format":"{{msg.status}}","layout":"col-center","className":"","x":1150,"y":480,"wires":[]},{"id":"6a191d09.8997e4","type":"ui_text","z":"a44db49552121df2","group":"3da36874.a9b2c8","order":2,"width":3,"height":1,"name":"","label":"","format":"{{msg.payload + 5}}","layout":"col-center","className":"","x":1150,"y":440,"wires":[]},{"id":"a0d6625.f4f5ba","type":"ui_text","z":"a44db49552121df2","group":"3da36874.a9b2c8","order":1,"width":3,"height":1,"name":"","label":"","format":"<font color= {{msg.color}} > {{msg.payload + 5}} </font>","layout":"col-center","className":"","x":1150,"y":200,"wires":[],"inputLabels":["Pracovna broskev reálná teplota"]},{"id":"62f8f1cdee8e5719","type":"inject","z":"a44db49552121df2","name":"Fake TCP","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[255,255,16,23,255,255,141,255,129,141,141,255,255,129,143,143,143,143,143,141,141,141,0,0,151,221]","payloadType":"bin","x":320,"y":200,"wires":[["7b6c56a5.d52e58"]]},{"id":"e751ee119f9eacae","type":"inject","z":"a44db49552121df2","name":"Fake TCP","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[255,255,16,23,255,255,13,31,12,14,14,31,31,18,16,15,15,15,15,13,13,15,0,0,148,190]","payloadType":"bin","x":320,"y":440,"wires":[["28a21573.ea443a"]]},{"id":"f4421b557843b5db","type":"function","z":"a44db49552121df2","name":"Cmp.RT/POT","func":"var RT = msg.payload;\nvar POT = msg.POT;\nif ( RT == POT ) {\n  msg.color = \"white\"\n} else if ( RT > POT ) {\n  msg.color = \"red\"\n} else if ( RT < POT ) {\n  msg.color = \"blue\"\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":940,"y":140,"wires":[["fd95d7121b1792fd"]]},{"id":"87dfab8668cf4244","type":"link in","z":"a44db49552121df2","name":"PT/POT - calculate color","links":[],"x":825,"y":140,"wires":[["f4421b557843b5db"]]},{"id":"fd95d7121b1792fd","type":"link out","z":"a44db49552121df2","name":"","mode":"return","links":[],"x":1065,"y":140,"wires":[]},{"id":"a88d9ea58b1cedb1","type":"link call","z":"a44db49552121df2","name":"","links":["87dfab8668cf4244"],"timeout":"30","x":930,"y":200,"wires":[["a0d6625.f4f5ba","7cfcec1617b9cfe6"]]},{"id":"2a08c251412a6eeb","type":"change","z":"a44db49552121df2","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.room1RT","tot":"msg"},{"t":"set","p":"POT","pt":"msg","to":"POTs.room1POT","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":200,"wires":[["a88d9ea58b1cedb1"]]},{"id":"6f35133d27328bfa","type":"ui_text","z":"a44db49552121df2","group":"3da36874.a9b2c8","order":1,"width":3,"height":1,"name":"","label":"","format":"<font color= {{msg.color}} > {{msg.payload + 5}} </font>","layout":"col-center","className":"","x":1150,"y":240,"wires":[],"inputLabels":["Pracovna broskev reálná teplota"]},{"id":"93d587c136a803fa","type":"link call","z":"a44db49552121df2","name":"","links":["87dfab8668cf4244"],"timeout":"30","x":930,"y":240,"wires":[["6f35133d27328bfa","f2a32a7aae305d2b"]]},{"id":"ee8ff341ba0cae8d","type":"change","z":"a44db49552121df2","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.room2RT","tot":"msg"},{"t":"set","p":"POT","pt":"msg","to":"POTs.room2POT","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":240,"wires":[["93d587c136a803fa"]]},{"id":"6f1c62cdafebc0cf","type":"ui_text","z":"a44db49552121df2","group":"3da36874.a9b2c8","order":1,"width":3,"height":1,"name":"","label":"","format":"<font color= {{msg.color}} > {{msg.payload + 5}} </font>","layout":"col-center","className":"","x":1150,"y":280,"wires":[],"inputLabels":["Pracovna broskev reálná teplota"]},{"id":"118f23128c4f5703","type":"link call","z":"a44db49552121df2","name":"","links":["87dfab8668cf4244"],"timeout":"30","x":930,"y":280,"wires":[["6f1c62cdafebc0cf","ea96d518d5fd5fec"]]},{"id":"9719ade126ac2f0f","type":"change","z":"a44db49552121df2","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.room3RT","tot":"msg"},{"t":"set","p":"POT","pt":"msg","to":"POTs.room3POT","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":280,"wires":[["118f23128c4f5703"]]},{"id":"7cfcec1617b9cfe6","type":"debug","z":"a44db49552121df2","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload & \":\" & color","statusType":"jsonata","x":1250,"y":180,"wires":[]},{"id":"f2a32a7aae305d2b","type":"debug","z":"a44db49552121df2","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload & \":\" & color","statusType":"jsonata","x":1250,"y":220,"wires":[]},{"id":"ea96d518d5fd5fec","type":"debug","z":"a44db49552121df2","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload & \":\" & color","statusType":"jsonata","x":1250,"y":260,"wires":[]},{"id":"e2d9f453c503b642","type":"change","z":"a44db49552121df2","name":"","rules":[{"t":"set","p":"POTs","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":580,"y":480,"wires":[["bf8702d7bdeea79f","3e73057efc68436b","da51ac710239f960"]]},{"id":"9aae56b9c1a2041a","type":"function","z":"a44db49552121df2","name":"Calculate msg.status","func":"var mod = msg.payload\nlet answer = \"xxx\";\n\nif (mod == 0) {\n  answer = \"1\"\n} else if (mod == 1) {\n  answer = \"2\"\n} else if (mod == 2) {\n  answer = \"3\"\n} else if (mod == 3) {\n  answer = \"4\"\n} else if (mod == 4) {\n  answer = \"PRG\"\n}\n\nmsg.status = answer;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":900,"y":400,"wires":[["d0fb08412537bb69"]]},{"id":"cf63291864b6d1b0","type":"link in","z":"a44db49552121df2","name":"get msg.status","links":[],"x":765,"y":400,"wires":[["9aae56b9c1a2041a"]]},{"id":"d0fb08412537bb69","type":"link out","z":"a44db49552121df2","name":"","mode":"return","links":[],"x":1045,"y":400,"wires":[]},{"id":"6fa6ce0e90cb2d57","type":"link call","z":"a44db49552121df2","name":"","links":["cf63291864b6d1b0"],"timeout":"30","x":980,"y":480,"wires":[["71500ed9.1d2ae","d0486c83c8662bc6","6a191d09.8997e4"]]},{"id":"bf8702d7bdeea79f","type":"change","z":"a44db49552121df2","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.room1POT","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":800,"y":480,"wires":[["6fa6ce0e90cb2d57"]]},{"id":"5d477a576c7f0fbf","type":"ui_text","z":"a44db49552121df2","group":"3da36874.a9b2c8","order":3,"width":3,"height":1,"name":"","label":"","format":"{{msg.status}}","layout":"col-center","className":"","x":1150,"y":620,"wires":[]},{"id":"733e0ca322fcd1f4","type":"ui_text","z":"a44db49552121df2","group":"3da36874.a9b2c8","order":2,"width":3,"height":1,"name":"","label":"","format":"{{msg.payload + 5}}","layout":"col-center","className":"","x":1150,"y":580,"wires":[]},{"id":"935bded8eff062ab","type":"link call","z":"a44db49552121df2","name":"","links":["cf63291864b6d1b0"],"timeout":"30","x":980,"y":620,"wires":[["5d477a576c7f0fbf","bcd26933404767f3","733e0ca322fcd1f4"]]},{"id":"3e73057efc68436b","type":"change","z":"a44db49552121df2","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.room2POT","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":800,"y":620,"wires":[["935bded8eff062ab"]]},{"id":"1986075a465b07d8","type":"ui_text","z":"a44db49552121df2","group":"3da36874.a9b2c8","order":3,"width":3,"height":1,"name":"","label":"","format":"{{msg.status}}","layout":"col-center","className":"","x":1150,"y":760,"wires":[]},{"id":"7762be3aef18c64a","type":"ui_text","z":"a44db49552121df2","group":"3da36874.a9b2c8","order":2,"width":3,"height":1,"name":"","label":"","format":"{{msg.payload + 5}}","layout":"col-center","className":"","x":1150,"y":720,"wires":[]},{"id":"e49e94da3a3e9215","type":"link call","z":"a44db49552121df2","name":"","links":["cf63291864b6d1b0"],"timeout":"30","x":980,"y":760,"wires":[["1986075a465b07d8","6ebb8677a2db8543","7762be3aef18c64a"]]},{"id":"da51ac710239f960","type":"change","z":"a44db49552121df2","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.room3POT","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":800,"y":760,"wires":[["e49e94da3a3e9215"]]},{"id":"d0486c83c8662bc6","type":"debug","z":"a44db49552121df2","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload & \":\" & status","statusType":"jsonata","x":1150,"y":520,"wires":[]},{"id":"bcd26933404767f3","type":"debug","z":"a44db49552121df2","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload & \":\" & status","statusType":"jsonata","x":1150,"y":660,"wires":[]},{"id":"6ebb8677a2db8543","type":"debug","z":"a44db49552121df2","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload & \":\" & status","statusType":"jsonata","x":1150,"y":800,"wires":[]},{"id":"827f8af4b6b52b1d","type":"inject","z":"a44db49552121df2","name":"Fake TCP 2","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[255,255,16,23,255,255,13,31,12,14,14,31,31,18,16,15,15,15,15,2,3,4,0,0,148,190]","payloadType":"bin","x":330,"y":520,"wires":[["28a21573.ea443a"]]},{"id":"f4df18a91ef96436","type":"debug","z":"a44db49552121df2","name":"SEE ME IN DEBUG","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":500,"y":600,"wires":[]},{"id":"837b1c1187a33b87","type":"debug","z":"a44db49552121df2","name":"SEE ME IN DEBUG","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":440,"y":280,"wires":[]},{"id":"3da36874.a9b2c8","type":"ui_group","name":"Group 1","tab":"befeb13c.bfa17","order":1,"disp":true,"width":6},{"id":"befeb13c.bfa17","type":"ui_tab","name":"Tab 1","icon":"dashboard","order":1}]

NOTES

Your function code was doing unnecessary hula hoops to convert a number into a number. Simply chose the number type in buffer parser and it will give you that number...

And this is the output...
image

Note the values are actual numbers (no need to do conversions in functions) Note also the "copy path" button under the mouse? - use that to get the path to any value e.g. msg.payload.room3POT

Thank you. There is missing "link call". I think must be installed additionaly.

no, you must be using OLD version of node-red.

  1. What version of node-red are you using? (check the hamburger menu or see info in start up log)
  2. What version of node are you using? (enter node -v in console / terminal or see info in start up log)
  3. What OS / Hardware is node-red running on?
  4. Can you upgrade?

image


I'm using Weidmuller uc20-wl2000-iot:
1334990000 UC20-WL2000-IOT | Weidmüller Product Catalogue (weidmueller.com)

upgrade ? not sure if it's possible

updated to other hw and new version of node red. now link call is working, but there is comlepte wrong calculation in first answer - status is calculated but not POT. Mising this functions :
image
pot calculation :


and status calculation :

understand what's missing ? I'm using first five bits for POT (requested temperature) calculation and next3 bits are status. It's completly missing in your code. My posted code was fully working. RT flow reads realtime value. POT flow reads requested value and status. Status is showed, requested value is showed and realtime values is showed with color calculated by comparison.

Like i said, I was uncertain of how / waht you were attempting to calculate - I re-aranged your flow to RE-USE functions.

If you are still struggling, post your flow (as it is now) with a description of what values are supposed to be calculated (and how).

Also, provide REAL sample data in via an inject node (like I did in my demo flow) since I don't have your device to generate my own real TCP data

Sending flow again

[{"id":"74d8a1b8.dd1b4","type":"inject","z":"70b5d986.cef568","name":"Trigger on start and then every 5 minutes","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"300","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":180,"y":640,"wires":[["e2e45ffc.09cf5","a2bfb44b.8a9ff8"]]},{"id":"e2e45ffc.09cf5","type":"delay","z":"70b5d986.cef568","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"outputs":1,"x":420,"y":620,"wires":[["65cd07e8.7d97f8"]]},{"id":"65cd07e8.7d97f8","type":"change","z":"70b5d986.cef568","name":"Real values","rules":[{"t":"set","p":"payload","pt":"msg","to":"[\"0x10\",\"0x01\",\"0xFF\",\"0xFF\",\"0x00\",\"0x60\",\"0x78\",\"0x02\",\"0x43\",\"0xA1\",\"0xFF\"]","tot":"bin"}],"action":"","property":"","from":"","to":"","reg":false,"x":470,"y":480,"wires":[["904d34ae.ef7be8"]]},{"id":"a2bfb44b.8a9ff8","type":"change","z":"70b5d986.cef568","name":"Requested values and status","rules":[{"t":"set","p":"payload","pt":"msg","to":"[\"0x10\",\"0x01\",\"0xFF\",\"0xFF\",\"0x00\",\"0x70\",\"0x78\",\"0x02\",\"0x53\",\"0xB1\",\"0xFF\"]","tot":"bin"}],"action":"","property":"","from":"","to":"","reg":false,"x":440,"y":740,"wires":[["1661a68.27a195a"]]},{"id":"904d34ae.ef7be8","type":"tcp request","z":"70b5d986.cef568","server":"192.168.0.178","port":"45000","out":"time","splitc":"1000","name":"","x":690,"y":360,"wires":[["70e7228c.0ecb9c","7b6c56a5.d52e58"]]},{"id":"1661a68.27a195a","type":"tcp request","z":"70b5d986.cef568","server":"192.168.0.178","port":"45000","out":"time","splitc":"1000","name":"","x":710,"y":880,"wires":[["17fc20e3.8c87ef","28a21573.ea443a"]]},{"id":"e0b2d567.18cbb8","type":"change","z":"70b5d986.cef568","name":"","rules":[{"t":"set","p":"room3RT","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1170,"y":520,"wires":[["b740d6e0.9e5678"]]},{"id":"5386a391.5d545c","type":"change","z":"70b5d986.cef568","name":"","rules":[{"t":"set","p":"room2RT","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1170,"y":500,"wires":[["2840fb01.d5f974"]]},{"id":"471537e8.fb1be8","type":"change","z":"70b5d986.cef568","name":"","rules":[{"t":"set","p":"room1RT","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1170,"y":480,"wires":[["ef2a85f7.830d18"]]},{"id":"ef2a85f7.830d18","type":"function","z":"70b5d986.cef568","name":"Cmp.RT/POT","func":"var RT = flow.get(\"room1RT\");\nvar POT = flow.get(\"room1POT\");\nif ( RT == POT ) {\n  msg.color = \"white\"\n} else if ( RT > POT ) {\n  msg.color = \"red\"\n} else if ( RT < POT ) {\n  msg.color = \"blue\"\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1360,"y":480,"wires":[["21ea8edb2421c741","31f64d74543250ce"]]},{"id":"2840fb01.d5f974","type":"function","z":"70b5d986.cef568","name":"Cmp.RT/POT","func":"var RT = flow.get(\"room2RT\");\nvar POT = flow.get(\"room2POT\");\nif ( RT == POT ) {\n  msg.color = \"white\"\n} else if ( RT > POT ) {\n  msg.color = \"red\"\n} else if ( RT < POT ) {\n  msg.color = \"blue\"\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1360,"y":500,"wires":[["bf2f02bcb0b0b692","9b14a8e1cc073732"]]},{"id":"b740d6e0.9e5678","type":"function","z":"70b5d986.cef568","name":"Cmp.RT/POT","func":"var RT = flow.get(\"room3RT\");\nvar POT = flow.get(\"room3POT\");\nif ( RT == POT ) {\n  msg.color = \"white\"\n} else if ( RT > POT ) {\n  msg.color = \"red\"\n} else if ( RT < POT ) {\n  msg.color = \"blue\"\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1360,"y":520,"wires":[["20708b6e50e2f7ad","21440b54b96a838a"]]},{"id":"336c8e15.21e832","type":"function","z":"70b5d986.cef568","name":"room3POT","func":"msg.payload = (parseInt(msg.payload,16).toString(2)).padStart(8, '0');\nmsg.payload =msg.payload.substr(3, 5);\nmsg.payload = parseInt(msg.payload, 2);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1210,"y":1140,"wires":[["6576634b.c4fe1c"]]},{"id":"e37a3db8.1ae43","type":"function","z":"70b5d986.cef568","name":"room2POT","func":"msg.payload = (parseInt(msg.payload,16).toString(2)).padStart(8, '0');\nmsg.payload =msg.payload.substr(3, 5);\nmsg.payload = parseInt(msg.payload, 2);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1210,"y":1020,"wires":[["d36041bc.28f56"]]},{"id":"df92706e.23e07","type":"function","z":"70b5d986.cef568","name":"room1status","func":"var mod = msg.payload\nlet answer;\nmod = (parseInt(mod,16).toString(2)).padStart(8, '0');\nmod = mod.substr(0, 3);\nif ( mod == \"000\" ) {\n  answer = \"1\"\n} else if ( mod == \"001\" ) {\n  answer = \"2\"\n} else if ( mod == \"010\" ) {\n  answer = \"3\"\n} else if ( mod == \"011\" ) {\n  answer = \"4\"\n} else if ( mod == \"100\" ) {\n  answer = \"PRG\"\n} else if ( mod == \"111\" ) {\n  answer = \"xxx\"\n} \nmsg.payload = answer;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1210,"y":940,"wires":[["aedc8f771993049e","93717a3cda1e1f81"]]},{"id":"94906d51.5bed2","type":"function","z":"70b5d986.cef568","name":"room1POT","func":"msg.payload = (parseInt(msg.payload,16).toString(2)).padStart(8, '0');\nmsg.payload =msg.payload.substr(3, 5);\nmsg.payload = parseInt(msg.payload, 2);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1210,"y":900,"wires":[["9f30bc40.8ff2a"]]},{"id":"6576634b.c4fe1c","type":"change","z":"70b5d986.cef568","name":"","rules":[{"t":"set","p":"room3POT","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1430,"y":1140,"wires":[["f8daad704dccaee6","613019aedbc8971d"]]},{"id":"d36041bc.28f56","type":"change","z":"70b5d986.cef568","name":"","rules":[{"t":"set","p":"room2POT","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1430,"y":1020,"wires":[["41bc3c666393b7ad","382a129d5ac688aa"]]},{"id":"9f30bc40.8ff2a","type":"change","z":"70b5d986.cef568","name":"","rules":[{"t":"set","p":"room1POT","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1430,"y":900,"wires":[["6b6b037ccc05c327","2e73f123696cdecd"]]},{"id":"70e7228c.0ecb9c","type":"debug","z":"70b5d986.cef568","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":960,"y":180,"wires":[]},{"id":"17fc20e3.8c87ef","type":"debug","z":"70b5d986.cef568","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":960,"y":700,"wires":[]},{"id":"5ea667dc.617b68","type":"function","z":"70b5d986.cef568","name":"room2status","func":"var mod = msg.payload\nlet answer;\nmod = (parseInt(mod,16).toString(2)).padStart(8, '0');\nmod = mod.substr(0, 3);\nif ( mod == \"000\" ) {\n  answer = \"1\"\n} else if ( mod == \"001\" ) {\n  answer = \"2\"\n} else if ( mod == \"010\" ) {\n  answer = \"3\"\n} else if ( mod == \"011\" ) {\n  answer = \"4\"\n} else if ( mod == \"100\" ) {\n  answer = \"PRG\"\n} else if ( mod == \"111\" ) {\n  answer = \"xxx\"\n} \nmsg.payload = answer;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1210,"y":1060,"wires":[["980a64df0ba054f8","90a2179a68101b27"]]},{"id":"b961a5db.3c1868","type":"function","z":"70b5d986.cef568","name":"room3status","func":"var mod = msg.payload\nlet answer;\nmod = (parseInt(mod,16).toString(2)).padStart(8, '0');\nmod = mod.substr(0, 3);\nif ( mod == \"000\" ) {\n  answer = \"1\"\n} else if ( mod == \"001\" ) {\n  answer = \"2\"\n} else if ( mod == \"010\" ) {\n  answer = \"3\"\n} else if ( mod == \"011\" ) {\n  answer = \"4\"\n} else if ( mod == \"100\" ) {\n  answer = \"PRG\"\n} else if ( mod == \"111\" ) {\n  answer = \"xxx\"\n} \nmsg.payload = answer;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1210,"y":1180,"wires":[["f0525fd23ec54146","091ceaf46a49dc74"]]},{"id":"28a21573.ea443a","type":"buffer-parser","z":"70b5d986.cef568","name":"","data":"payload","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"hex","name":"item1","offset":6,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"hex","name":"item2","offset":7,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"hex","name":"item3","offset":8,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"hex","name":"item4","offset":9,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"hex","name":"item5","offset":10,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"hex","name":"item6","offset":11,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"hex","name":"item7","offset":12,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"hex","name":"item8","offset":13,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"hex","name":"item9","offset":14,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"hex","name":"item10","offset":15,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"hex","name":"item11","offset":16,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"hex","name":"item12","offset":17,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"hex","name":"item13","offset":18,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"hex","name":"item14","offset":19,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"hex","name":"item15","offset":20,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"hex","name":"item16","offset":21,"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":false,"outputs":16,"x":930,"y":880,"wires":[[],[],[],[],[],[],[],[],[],[],[],[],[],["df92706e.23e07","94906d51.5bed2"],["e37a3db8.1ae43","5ea667dc.617b68"],["336c8e15.21e832","b961a5db.3c1868"]]},{"id":"7b6c56a5.d52e58","type":"buffer-parser","z":"70b5d986.cef568","name":"Real values","data":"payload","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"uint8","name":"item1","offset":6,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint8","name":"item2","offset":7,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint8","name":"item3","offset":8,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint8","name":"item4","offset":9,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint8","name":"item5","offset":10,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint8","name":"item6","offset":11,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint8","name":"item7","offset":12,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint8","name":"item8","offset":13,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint8","name":"item9","offset":14,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint8","name":"item10","offset":15,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint8","name":"item11","offset":16,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint8","name":"item12","offset":17,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint8","name":"item13","offset":18,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint8","name":"item14","offset":19,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint8","name":"item15","offset":20,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint8","name":"item16","offset":21,"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":16,"x":930,"y":360,"wires":[[],[],[],[],[],[],[],[],[],[],[],[],[],["471537e8.fb1be8"],["5386a391.5d545c"],["e0b2d567.18cbb8"]]},{"id":"aedc8f771993049e","type":"debug","z":"70b5d986.cef568","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1410,"y":940,"wires":[]},{"id":"980a64df0ba054f8","type":"debug","z":"70b5d986.cef568","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1410,"y":1060,"wires":[]},{"id":"f0525fd23ec54146","type":"debug","z":"70b5d986.cef568","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1410,"y":1180,"wires":[]},{"id":"6b6b037ccc05c327","type":"debug","z":"70b5d986.cef568","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1630,"y":900,"wires":[]},{"id":"21ea8edb2421c741","type":"debug","z":"70b5d986.cef568","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1590,"y":440,"wires":[]},{"id":"bf2f02bcb0b0b692","type":"debug","z":"70b5d986.cef568","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1690,"y":520,"wires":[]},{"id":"20708b6e50e2f7ad","type":"debug","z":"70b5d986.cef568","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1590,"y":560,"wires":[]},{"id":"41bc3c666393b7ad","type":"debug","z":"70b5d986.cef568","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1630,"y":1020,"wires":[]},{"id":"f8daad704dccaee6","type":"debug","z":"70b5d986.cef568","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1630,"y":1140,"wires":[]},{"id":"31f64d74543250ce","type":"ui_text","z":"70b5d986.cef568","group":"3da36874.a9b2c8","order":0,"width":0,"height":0,"name":"","label":"text","format":"<font color= {{msg.color}} > {{msg.payload + 5}} </font>","layout":"row-spread","className":"","x":1570,"y":400,"wires":[]},{"id":"21440b54b96a838a","type":"ui_text","z":"70b5d986.cef568","group":"fbfdff6d.980db","order":0,"width":0,"height":0,"name":"","label":"text","format":"<font color= {{msg.color}} > {{msg.payload + 5}} </font>","layout":"row-spread","className":"","x":1570,"y":600,"wires":[]},{"id":"9b14a8e1cc073732","type":"ui_text","z":"70b5d986.cef568","group":"add5247.d4d75d8","order":0,"width":0,"height":0,"name":"","label":"text","format":"<font color= {{msg.color}} > {{msg.payload + 5}} </font>","layout":"row-spread","className":"","x":1610,"y":480,"wires":[]},{"id":"2e73f123696cdecd","type":"ui_text","z":"70b5d986.cef568","group":"3da36874.a9b2c8","order":1,"width":0,"height":0,"name":"","label":"text","format":"{{msg.payload + 5}}","layout":"row-spread","className":"","x":1660,"y":860,"wires":[]},{"id":"382a129d5ac688aa","type":"ui_text","z":"70b5d986.cef568","group":"add5247.d4d75d8","order":1,"width":0,"height":0,"name":"","label":"text","format":"{{msg.payload + 5}}","layout":"row-spread","className":"","x":1610,"y":980,"wires":[]},{"id":"613019aedbc8971d","type":"ui_text","z":"70b5d986.cef568","group":"fbfdff6d.980db","order":1,"width":0,"height":0,"name":"","label":"text","format":"{{msg.payload + 5}}","layout":"row-spread","className":"","x":1610,"y":1100,"wires":[]},{"id":"93717a3cda1e1f81","type":"ui_text","z":"70b5d986.cef568","group":"3da36874.a9b2c8","order":2,"width":0,"height":0,"name":"","label":"text","format":"{{msg.payload}}","layout":"row-spread","className":"","x":1390,"y":980,"wires":[]},{"id":"90a2179a68101b27","type":"ui_text","z":"70b5d986.cef568","group":"add5247.d4d75d8","order":2,"width":0,"height":0,"name":"","label":"text","format":"{{msg.payload}}","layout":"row-spread","className":"","x":1390,"y":1100,"wires":[]},{"id":"091ceaf46a49dc74","type":"ui_text","z":"70b5d986.cef568","group":"fbfdff6d.980db","order":2,"width":0,"height":0,"name":"","label":"text","format":"{{msg.payload}}","layout":"row-spread","className":"","x":1390,"y":1220,"wires":[]},{"id":"3da36874.a9b2c8","type":"ui_group","name":"Group 1","tab":"befeb13c.bfa17","order":1,"disp":true,"width":6},{"id":"fbfdff6d.980db","type":"ui_group","name":"Group 3","tab":"befeb13c.bfa17","order":3,"disp":true,"width":6},{"id":"add5247.d4d75d8","type":"ui_group","name":"Group 2","tab":"befeb13c.bfa17","order":2,"disp":true,"width":6},{"id":"befeb13c.bfa17","type":"ui_tab","name":"Tab 1","icon":"dashboard","order":1}]

That looks like the original flow you posted first time and contains NONE of the extensive tidy up from my earlier reply above (How to process multiple data - #7 by Steve-Mcl)

Your old (bad) conversion code is back, the buffer parsers are still outputting hex to individual outputs, none of the Link Call stuff is there

Nor does your flow contain any injects with real data.

Upper line Real values :
receiving :
[255,255,16,23,255,255,13,31,5,15,15,31,31,18,17,17,16,17,17,15,15,14,0,0,238,182]
and parse 16 values of real temperature values (in shared flow only 3 to make it more simple).
lower line requested values and status:
receiving :
[255,255,16,23,255,255,141,255,129,143,143,255,255,159,145,145,145,145,145,143,143,141,0,0,199,221]
and parse also 16 values, but first 5bits of each value is requested temperature - I calculate with function "room1POT" and last 3bits is status which I calculate with function "room1status"

Temperature from function "room1POT" I'm comparing with RT temperature by function "Cmp.RT/POT" which sets a colort for text message

I wasn't able improve my code, because I fully don't understand your improvement, because your code is I think complete wrong. Missing bits operations to calculate status and requested temperature.
Also not understand what is calling what.

also not clear for me what's doing this:

Here is an updated version of your code using LINK CALLs to reduce code copying.

You might not understand it right away but you CAN figure it out & when you do you will realise the concepts I used can be easily built upon.

The flow...

The dashboard...

image

Important parts to grasp...

No conversion of hex value to bit string, no padding with zeros, no string slicing etc - just simple built in bit manipulation

How link call works...

The flow for import...

[{"id":"cff2400de21abd5d","type":"buffer-parser","z":"150d20998fc7fe72","name":"","data":"payload","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"uint8","name":"room1Status","offset":19,"length":1,"offsetbit":0,"scale":">> 5","mask":"0xE0"},{"type":"uint8","name":"room2Status","offset":20,"length":1,"offsetbit":0,"scale":">> 5","mask":"0xE0"},{"type":"uint8","name":"room3Status","offset":21,"length":1,"offsetbit":0,"scale":">> 5","mask":"0xE0"},{"type":"uint8","name":"room1POT","offset":19,"length":1,"offsetbit":0,"scale":"1","mask":"0x1F"},{"type":"uint8","name":"room2POT","offset":20,"length":1,"offsetbit":0,"scale":"1","mask":"0x1F"},{"type":"uint8","name":"room3POT","offset":21,"length":1,"offsetbit":0,"scale":"1","mask":"0x1F"}],"swap1":"","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","resultType":"keyvalue","resultTypeType":"return","multipleResult":false,"fanOutMultipleResult":true,"setTopic":false,"outputs":1,"x":570,"y":1260,"wires":[["feeace8729d62e2f","3672053cc09db011"]]},{"id":"c1935b23092ed8e3","type":"buffer-parser","z":"150d20998fc7fe72","name":"Real values","data":"payload","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"uint8","name":"room1RT","offset":19,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint8","name":"room2RT","offset":20,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint8","name":"room3RT","offset":21,"length":1,"offsetbit":0,"scale":"1","mask":""}],"swap1":"","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","resultType":"keyvalue","resultTypeType":"return","multipleResult":false,"fanOutMultipleResult":false,"setTopic":true,"outputs":1,"x":650,"y":960,"wires":[["9da905ea03a1b01c","ec6fad837ac9a32f","5c457540bb570cc7","93e2bc3e59bd60a2"]]},{"id":"9f1cb827f3ac2015","type":"ui_text","z":"150d20998fc7fe72","group":"3da36874.a9b2c8","order":2,"width":"0","height":"0","name":"","label":"R1 STAT","format":"{{msg.status}}","layout":"row-spread","className":"","x":1320,"y":1280,"wires":[]},{"id":"13c575a802a21236","type":"ui_text","z":"150d20998fc7fe72","group":"3da36874.a9b2c8","order":1,"width":"0","height":"0","name":"","label":"R1 POT","format":"{{msg.payload + 5}}","layout":"row-spread","className":"","x":1320,"y":1240,"wires":[]},{"id":"8121267e331b8c49","type":"ui_text","z":"150d20998fc7fe72","group":"3da36874.a9b2c8","order":3,"width":"0","height":"0","name":"","label":"R1 PT","format":"<font color= {{msg.color}} > {{msg.payload + 5}} </font>","layout":"row-spread","className":"","x":1310,"y":960,"wires":[],"inputLabels":["Pracovna broskev reálná teplota"]},{"id":"2e1865af3693c00c","type":"inject","z":"150d20998fc7fe72","name":"Fake TCP","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[255,255,16,23,255,255,13,31,5,15,15,31,31,18,17,17,16,17,17,15,15,14,0,0,238,182]","payloadType":"bin","x":480,"y":960,"wires":[["c1935b23092ed8e3"]]},{"id":"e9d3e47522c37b85","type":"inject","z":"150d20998fc7fe72","name":"Fake TCP","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[255,255,16,23,255,255,141,255,129,143,143,255,255,159,145,145,145,145,145,143,143,141,0,0,199,221]","payloadType":"bin","x":480,"y":1200,"wires":[["cff2400de21abd5d"]]},{"id":"8ccb6e0e7dae3fc1","type":"function","z":"150d20998fc7fe72","name":"Cmp.RT/POT","func":"var RT = msg.payload;\nvar POT = msg.POT;\nif ( RT == POT ) {\n  msg.color = \"white\"\n} else if ( RT > POT ) {\n  msg.color = \"red\"\n} else if ( RT < POT ) {\n  msg.color = \"blue\"\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1100,"y":900,"wires":[["7c720554acb6b9c3"]]},{"id":"6f36e39e73d0b39f","type":"link in","z":"150d20998fc7fe72","name":"PT/POT - calculate color","links":[],"x":985,"y":900,"wires":[["8ccb6e0e7dae3fc1"]]},{"id":"7c720554acb6b9c3","type":"link out","z":"150d20998fc7fe72","name":"","mode":"return","links":[],"x":1225,"y":900,"wires":[]},{"id":"95154f0d547ac01e","type":"link call","z":"150d20998fc7fe72","name":"","links":["6f36e39e73d0b39f"],"timeout":"30","x":1090,"y":960,"wires":[["8121267e331b8c49","9ead100c5a4fe85b"]]},{"id":"9da905ea03a1b01c","type":"change","z":"150d20998fc7fe72","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.room1RT","tot":"msg"},{"t":"set","p":"POT","pt":"msg","to":"data.room1POT","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":860,"y":960,"wires":[["95154f0d547ac01e"]]},{"id":"ef128301678ffc99","type":"ui_text","z":"150d20998fc7fe72","group":"30af182266b13f17","order":3,"width":"0","height":"0","name":"","label":"R2 PT","format":"<font color= {{msg.color}} > {{msg.payload + 5}} </font>","layout":"row-spread","className":"","x":1310,"y":1000,"wires":[],"inputLabels":["Pracovna broskev reálná teplota"]},{"id":"c5cd8e5c95f1e208","type":"link call","z":"150d20998fc7fe72","name":"","links":["6f36e39e73d0b39f"],"timeout":"30","x":1090,"y":1000,"wires":[["ef128301678ffc99","336420626658635c"]]},{"id":"ec6fad837ac9a32f","type":"change","z":"150d20998fc7fe72","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.room2RT","tot":"msg"},{"t":"set","p":"POT","pt":"msg","to":"data.room2POT","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":860,"y":1000,"wires":[["c5cd8e5c95f1e208"]]},{"id":"62e7a8dbbc572b58","type":"ui_text","z":"150d20998fc7fe72","group":"06268055169fce4b","order":3,"width":"0","height":"0","name":"","label":"R3 PT","format":"<font color= {{msg.color}} > {{msg.payload + 5}} </font>","layout":"row-spread","className":"","x":1310,"y":1040,"wires":[],"inputLabels":["Pracovna broskev reálná teplota"]},{"id":"856e1d6e88940f77","type":"link call","z":"150d20998fc7fe72","name":"","links":["6f36e39e73d0b39f"],"timeout":"30","x":1090,"y":1040,"wires":[["62e7a8dbbc572b58","8e186d02cdad99a7"]]},{"id":"5c457540bb570cc7","type":"change","z":"150d20998fc7fe72","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.room3RT","tot":"msg"},{"t":"set","p":"POT","pt":"msg","to":"data.room3POT","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":860,"y":1040,"wires":[["856e1d6e88940f77"]]},{"id":"9ead100c5a4fe85b","type":"debug","z":"150d20998fc7fe72","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload & \":\" & color","statusType":"jsonata","x":1430,"y":940,"wires":[]},{"id":"336420626658635c","type":"debug","z":"150d20998fc7fe72","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload & \":\" & color","statusType":"jsonata","x":1430,"y":1000,"wires":[]},{"id":"8e186d02cdad99a7","type":"debug","z":"150d20998fc7fe72","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload & \":\" & color","statusType":"jsonata","x":1430,"y":1060,"wires":[]},{"id":"feeace8729d62e2f","type":"change","z":"150d20998fc7fe72","name":"","rules":[{"t":"set","p":"data","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":750,"y":1260,"wires":[["88b5a1f1c200dff2","634bde5d137896d7","8114697e722ae9b0"]]},{"id":"58904d974974535d","type":"function","z":"150d20998fc7fe72","name":"Calculate msg.status","func":"var mod = msg.roomStatus\nlet answer = \"xxx\";\nif (mod == 0) {\n  answer = \"1\"\n} else if (mod == 1) {\n  answer = \"2\"\n} else if (mod == 2) {\n  answer = \"3\"\n} else if (mod == 3) {\n  answer = \"4\"\n} else if (mod == 4) {\n  answer = \"PRG\"\n} \nmsg.status = answer;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1060,"y":1200,"wires":[["74fd43ca12eca1ae"]]},{"id":"f60f887d6a59694a","type":"link in","z":"150d20998fc7fe72","name":"get msg.status","links":[],"x":925,"y":1200,"wires":[["58904d974974535d"]]},{"id":"74fd43ca12eca1ae","type":"link out","z":"150d20998fc7fe72","name":"","mode":"return","links":[],"x":1205,"y":1200,"wires":[]},{"id":"85d4cd7e7730d891","type":"link call","z":"150d20998fc7fe72","name":"","links":["f60f887d6a59694a"],"timeout":"30","x":1140,"y":1260,"wires":[["9f1cb827f3ac2015","5046ad0dd78baabf","13c575a802a21236"]]},{"id":"88b5a1f1c200dff2","type":"change","z":"150d20998fc7fe72","name":"","rules":[{"t":"set","p":"roomStatus","pt":"msg","to":"payload.room1Status","tot":"msg"},{"t":"set","p":"payload","pt":"msg","to":"payload.room1POT","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":960,"y":1260,"wires":[["85d4cd7e7730d891"]]},{"id":"fea299ab496d25c3","type":"ui_text","z":"150d20998fc7fe72","group":"30af182266b13f17","order":2,"width":"0","height":"0","name":"","label":"R2 STAT","format":"{{msg.status}}","layout":"row-spread","className":"","x":1320,"y":1380,"wires":[]},{"id":"33a83076d5c117d0","type":"ui_text","z":"150d20998fc7fe72","group":"30af182266b13f17","order":1,"width":"0","height":"0","name":"","label":"R2 POT","format":"{{msg.payload + 5}}","layout":"row-spread","className":"","x":1320,"y":1340,"wires":[]},{"id":"691be60d28d9bf19","type":"link call","z":"150d20998fc7fe72","name":"","links":["f60f887d6a59694a"],"timeout":"30","x":1140,"y":1360,"wires":[["fea299ab496d25c3","5ea9e9e1a2ef0a22","33a83076d5c117d0"]]},{"id":"634bde5d137896d7","type":"change","z":"150d20998fc7fe72","name":"","rules":[{"t":"set","p":"roomStatus","pt":"msg","to":"payload.room2Status","tot":"msg"},{"t":"set","p":"payload","pt":"msg","to":"payload.room2POT","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":960,"y":1360,"wires":[["691be60d28d9bf19"]]},{"id":"f8f1de7ab0f70864","type":"ui_text","z":"150d20998fc7fe72","group":"06268055169fce4b","order":2,"width":"0","height":"0","name":"","label":"R3 STAT","format":"{{msg.status}}","layout":"row-spread","className":"","x":1320,"y":1480,"wires":[]},{"id":"5af3aa322b0ce24a","type":"ui_text","z":"150d20998fc7fe72","group":"06268055169fce4b","order":1,"width":"0","height":"0","name":"","label":"R3 POT","format":"{{msg.payload + 5}}","layout":"row-spread","className":"","x":1320,"y":1440,"wires":[]},{"id":"9d58e78f5a658ef8","type":"link call","z":"150d20998fc7fe72","name":"","links":["f60f887d6a59694a"],"timeout":"30","x":1140,"y":1460,"wires":[["f8f1de7ab0f70864","e1b304dd2e38ce08","5af3aa322b0ce24a"]]},{"id":"8114697e722ae9b0","type":"change","z":"150d20998fc7fe72","name":"","rules":[{"t":"set","p":"roomStatus","pt":"msg","to":"payload.room3Status","tot":"msg"},{"t":"set","p":"payload","pt":"msg","to":"payload.room3POT","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":960,"y":1460,"wires":[["9d58e78f5a658ef8"]]},{"id":"5046ad0dd78baabf","type":"debug","z":"150d20998fc7fe72","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload & \":\" & status","statusType":"jsonata","x":1430,"y":1260,"wires":[]},{"id":"5ea9e9e1a2ef0a22","type":"debug","z":"150d20998fc7fe72","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload & \":\" & status","statusType":"jsonata","x":1430,"y":1360,"wires":[]},{"id":"e1b304dd2e38ce08","type":"debug","z":"150d20998fc7fe72","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload & \":\" & status","statusType":"jsonata","x":1430,"y":1460,"wires":[]},{"id":"3672053cc09db011","type":"debug","z":"150d20998fc7fe72","name":"SEE ME IN DEBUG","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":660,"y":1380,"wires":[]},{"id":"93e2bc3e59bd60a2","type":"debug","z":"150d20998fc7fe72","name":"SEE ME IN DEBUG","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":600,"y":1040,"wires":[]},{"id":"3da36874.a9b2c8","type":"ui_group","name":"Group 1","tab":"befeb13c.bfa17","order":1,"disp":true,"width":"4","collapse":false,"className":""},{"id":"30af182266b13f17","type":"ui_group","name":"Group 2","tab":"befeb13c.bfa17","order":2,"disp":true,"width":"4","collapse":false,"className":""},{"id":"06268055169fce4b","type":"ui_group","name":"Group 3","tab":"befeb13c.bfa17","order":3,"disp":true,"width":"4","collapse":false,"className":""},{"id":"befeb13c.bfa17","type":"ui_tab","name":"Tab 1","icon":"dashboard","order":1}]

Thank you for your patience. I spent complete afternoon (and will continue) with your code :slight_smile:


after buffer parser I can see in debug this :
image
I'm confused - there is a lot of informations and I have a problem understand what all of this informations means.

because then I have problem understand next operation
image

before and after this set I see :