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}]