@Steve-Mcl , thanks for the flow. I just changed the exec node to serial nodes and it works really well! I really appreciate the work on html formatting.
Update - I thought it be useful if I share my flow. I have further implemented text input and reset on the flow shared by @Steve-Mcl .
[{"id":"efdcf8c8.4e3158","type":"tab","label":"Console","disabled":false,"info":""},{"id":"e3cd3705.3ca988","type":"ui_template","z":"efdcf8c8.4e3158","group":"e03c1e2.433b56","name":"","order":7,"width":"12","height":"10","format":"\n<!--<pre><code id=\"shell\" class=\"language-bash bash\" ng-bind=\"msg.payload\"></code></pre>-->\n<pre><code id=\"shell\" class=\"language-bash bash\"></code></pre>\n\n<script>\n $(document).ready(function() {\n $('#shell').each(function(i, e) {hljs.highlightElement(e)});\n }); \n</script>\n\n\n<script>\n(function(scope) {\n scope.$watch('msg', function(msg) {\n if (msg) {\n debugger\n $(\"#shell\").text(msg.payload);\n $('#shell').each(function(i, e) {hljs.highlightElement(e)});\n //$(\"#shell\").scrollTop(function() { return this.scrollHeight; });\n $(\"#shell\").closest(\".nr-dashboard-template\").scrollTop(function() { return this.scrollHeight; });\n }\n });\n})(scope);\n</script>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","x":780,"y":580,"wires":[[]]},{"id":"f2b86b4c.37c9e","type":"ui_template","z":"efdcf8c8.4e3158","group":"dce9e7a2.d20c78","name":"highlighter","order":7,"width":0,"height":0,"format":"<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.0.0/build/styles/default.min.css\">\n<script src=\"https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.0.0/build/highlight.min.js\"></script>\n<!-- and it's easy to individually load additional languages -->\n<script src=\"https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.0.0/build/languages/shell.min.js\"></script>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"global","x":790,"y":520,"wires":[[]]},{"id":"ff960014.52bfe8","type":"function","z":"efdcf8c8.4e3158","name":"","func":"if(!msg.payload) return;\n\nconst MAXLINES = 200;\nlet data = context.get(\"data\") || [];\nif(msg.topic==\"clear\") {\n data = [];\n} else {\n const lines = msg.payload.split(\"\\n\");\n data.push(...lines);\n data = data.slice(-MAXLINES);\n}\ncontext.set(\"data\", data);\nmsg.payload = data.join(\"\\n\");\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":520,"y":580,"wires":[["e3cd3705.3ca988"]]},{"id":"d7dbd290.fb8418","type":"serial in","z":"efdcf8c8.4e3158","name":"Output","serial":"beea37d3.019258","x":130,"y":620,"wires":[["4be377aa.a14708","ff960014.52bfe8"]]},{"id":"c4d1c00c.3e05f8","type":"serial out","z":"efdcf8c8.4e3158","name":"Input","serial":"beea37d3.019258","x":750,"y":920,"wires":[]},{"id":"c3c385c9.a0cdd8","type":"ui_text_input","z":"efdcf8c8.4e3158","name":"","label":"","tooltip":"","group":"e03c1e2.433b56","order":4,"width":"10","height":"2","passthru":false,"mode":"text","delay":"0","topic":"topic","topicType":"msg","x":280,"y":860,"wires":[["c4d1c00c.3e05f8"]]},{"id":"4be377aa.a14708","type":"function","z":"efdcf8c8.4e3158","name":"clear_txt_field","func":"if(msg.payload.length!=0)\n msg.payload=\"\"\nreturn msg","outputs":1,"noerr":0,"initialize":"","finalize":"","x":140,"y":740,"wires":[["c3c385c9.a0cdd8"]]},{"id":"4635c501.7f3784","type":"ui_button","z":"efdcf8c8.4e3158","name":"Ctrl+C","group":"e03c1e2.433b56","order":3,"width":"3","height":"1","passthru":false,"label":"Ctrl+c","tooltip":"","color":"white","bgcolor":"red","icon":"","payload":"^C","payloadType":"str","topic":"","topicType":"str","x":150,"y":920,"wires":[["c4d1c00c.3e05f8"]]},{"id":"39b35ec2.5438c2","type":"ui_button","z":"efdcf8c8.4e3158","name":"","group":"e03c1e2.433b56","order":3,"width":"3","height":"1","passthru":false,"label":"clear","tooltip":"","color":"white","bgcolor":"green","icon":"","payload":"","payloadType":"str","topic":"clear","topicType":"str","x":310,"y":480,"wires":[["ff960014.52bfe8"]]},{"id":"532c5c8b.85296c","type":"comment","z":"efdcf8c8.4e3158","name":"","info":"","x":320,"y":440,"wires":[]},{"id":"18cc3e2a.47f4a2","type":"comment","z":"efdcf8c8.4e3158","name":"reset text field to empty","info":"","x":360,"y":740,"wires":[]},{"id":"94db8a04.a53068","type":"comment","z":"efdcf8c8.4e3158","name":"Send cmnds as string ","info":"","x":920,"y":920,"wires":[]},{"id":"e03c1e2.433b56","type":"ui_group","name":"Console","tab":"5ba48494.46db94","order":1,"disp":true,"width":"12","collapse":false},{"id":"dce9e7a2.d20c78","type":"ui_group","name":"Object detection","tab":"5132060d.4cde48","order":1,"disp":true,"width":"7","collapse":false},{"id":"beea37d3.019258","type":"serial-port","serialport":"/dev/ttyUSB0","serialbaud":"115200","databits":"8","parity":"none","stopbits":"1","waitfor":"","dtr":"none","rts":"none","cts":"none","dsr":"none","newline":"800","bin":"bin","out":"interbyte","addchar":"\\n","responsetimeout":"1000"},{"id":"5ba48494.46db94","type":"ui_tab","name":"Console","icon":"dashboard","order":4,"disabled":false,"hidden":false},{"id":"5132060d.4cde48","type":"ui_tab","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]