Hello, I'm fighting for weeks and I did find no solution since my Java script knowledge is less than basic.
I collect 2 temperature values via the serial port. I'm able to get the first on-demand via telegram. Could someone suggest how to modify the function node so I can collect 2 values with the proper topic?
I tried some different msg types without results.
My flow
[{"id":"6ecd5ed5.624c9","type":"debug","z":"d93d62e5.76b86","name":"","active":true,"tosidebar":true,"console":true,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":832,"y":336,"wires":[]},{"id":"369ae647.d181ca","type":"telegram command","z":"d93d62e5.76b86","d":true,"name":"","command":"Temp","bot":"5896bb49.2b8254","strict":false,"hasresponse":true,"useregex":false,"removeregexcommand":false,"outputs":2,"x":122,"y":304,"wires":[["38109f52.30921"],[]]},{"id":"a398b1de.00022","type":"function","z":"d93d62e5.76b86","name":"","func":"//var msg5 = msg.payload.col7;\n//var msg2 = msg.payload;\n//var msg3 = \"°C\";\n//var date = new Date(msg.payload4)\n//var msg4 = \"Temp Pannelli TK\";\n\n//var msg6 = \"°C\";\n\n//return [{payload:msg3+msg2+msg5}]\n//return msg;\nvar msg1 = \"TK - TEMP. PANNELLI, \";\nvar msg2 = msg.payload;\nvar msg3 = \" C°\";\n\nreturn [{payload:msg1+msg2+msg3}]\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":492,"y":192,"wires":[["ee505d58.56427"]]},{"id":"e1ea84e9.ef4928","type":"telegram sender","z":"d93d62e5.76b86","d":true,"name":"","bot":"5896bb49.2b8254","haserroroutput":true,"outputs":2,"x":962,"y":204,"wires":[[],[]]},{"id":"ee505d58.56427","type":"function","z":"d93d62e5.76b86","name":"","func":"var msg1 = msg.payload;\nmsg.payload = {}\n\nmsg.payload.chatId = \"my chat ID\"\nmsg.payload.type = \"message\"\nmsg.payload.content = msg1\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":684,"y":256,"wires":[["6ecd5ed5.624c9","e1ea84e9.ef4928"]]},{"id":"47b01090.cded7","type":"link in","z":"d93d62e5.76b86","d":true,"name":"","links":["fd34e4cb.408068"],"x":79,"y":208,"wires":[["d71496fe.120b08"]]},{"id":"d71496fe.120b08","type":"trigger","z":"d93d62e5.76b86","name":"","op1":"","op2":"","op1type":"pay","op2type":"pay","duration":"0","extend":false,"overrideDelay":false,"units":"hr","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":272,"y":208,"wires":[["a398b1de.00022"]]},{"id":"38109f52.30921","type":"change","z":"d93d62e5.76b86","name":"","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":292,"y":304,"wires":[["d71496fe.120b08"]]},{"id":"5aa9bb6c.00e0d4","type":"ui_button","z":"d93d62e5.76b86","name":"","group":"2e0e750e.824afa","order":28,"width":2,"height":2,"passthru":false,"label":"Temp","tooltip":"","color":"","bgcolor":"","icon":"","payload":"true","payloadType":"bool","topic":"","x":130,"y":384,"wires":[["38109f52.30921"]]},{"id":"5896bb49.2b8254","type":"telegram bot","botname":"Chris100_bot","usernames":"","chatids":"mychatID","baseapiurl":"","updatemode":"polling","pollinterval":"300","usesocks":false,"sockshost":"","socksport":"6667","socksusername":"anonymous","sockspassword":"","bothost":"","botpath":"","localbotport":"8443","publicbotport":"8443","privatekey":"","certificate":"","useselfsignedcertificate":false,"sslterminated":false,"verboselogging":false},{"id":"2e0e750e.824afa","type":"ui_group","name":"Rotex ","tab":"ebb1ed1c.5ebe2","order":1,"disp":true,"width":"28","collapse":true},{"id":"ebb1ed1c.5ebe2","type":"ui_tab","name":"CBU Power Plant","icon":"Comandi ","order":1,"disabled":false,"hidden":false}]
Thanks in advance