msg.ip = "127.0.0.1";msg.port = 12345;return msg;
It also providesmsg.ipandmsg.portset to the ip address and port from which the message was received.
You may also usemsg.ipandmsg.portto set the destination values, but the statically configured values have precedence.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+unsubscribe@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/133b70fd-8d28-471f-9691-cc8907ef41fe%40googlegroups.com.
or there are also a couple of examples on the node-red website.
Take a look at them and if you still need some help, if you post the flow you have we can nudge you in the right direction
[{"id":"5b303b71.1600e4","type":"udp in","z":"67e087dc.241378","name":"UDP 5121","iface":"","port":"5121","ipv":"udp4","multicast":"false","group":"","datatype":"utf8","x":228,"y":149,"wires":[["8189896a.022ae8"]]},{"id":"8189896a.022ae8","type":"function","z":"67e087dc.241378","name":"","func":"msg.payload = \"received\";\nreturn msg;","outputs":1,"noerr":0,"x":406.5,"y":135,"wires":[["3be119c8.9e77b6"]]},{"id":"3be119c8.9e77b6","type":"udp out","z":"67e087dc.241378","name":"","addr":"","iface":"","port":"","ipv":"udp4","outport":"","base64":false,"multicast":"false","x":569.5,"y":186,"wires":[]}]
Nick
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+unsubscribe@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/efc4d2cd-130b-44b3-8a54-cb9eaa6e1a76%40googlegroups.com.
[{"id":"a0dafd75.1d004","type":"udp in","z":"be6de9f.1769a18","name":"UDP 5121","iface":"","port":"5121","ipv":"udp4","multicast":"false","group":"","datatype":"buffer","x":547,"y":236,"wires":[["b99157.c9dc9ea8"]]},{"id":"bde1ad32.94adb","type":"udp out","z":"be6de9f.1769a18","name":"","addr":"","iface":"","port":"","ipv":"udp4","outport":"","base64":true,"multicast":"false","x":943.5,"y":240,"wires":[]},{"id":"b99157.c9dc9ea8","type":"function","z":"be6de9f.1769a18","name":"","func":"msg.payload = \"received\";\nreturn msg;","outputs":1,"noerr":0,"x":741.5,"y":238,"wires":[["bde1ad32.94adb"]]},{"id":"f414e02d.1b9e4","type":"tcp in","z":"be6de9f.1769a18","name":"","server":"server","host":"","port":"1025","datamode":"stream","datatype":"utf8","newline":"","topic":"","base64":false,"x":421,"y":436,"wires":[["79698e53.310a8"]]},{"id":"dcc26f36.fa1ac","type":"ui_text","z":"be6de9f.1769a18","group":"1ea6e66e.e380ba","order":0,"width":"20","height":"7","name":"","label":"TCP Raw Data","format":"{{msg.payload}}","layout":"col-center","x":932,"y":426,"wires":[]},{"id":"79698e53.310a8","type":"delay","z":"be6de9f.1769a18","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"5","nbRateUnits":"1","rateUnits":"minute","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":649,"y":439,"wires":[["dcc26f36.fa1ac","cdf18bca.67c328"]]},{"id":"27d4d8db.547278","type":"tcp out","z":"be6de9f.1769a18","host":"","port":"","beserver":"reply","base64":false,"end":false,"name":"","x":995,"y":511,"wires":[]},{"id":"cdf18bca.67c328","type":"function","z":"be6de9f.1769a18","name":"","func":"msg.payload=\"Awesome! got it\";\nreturn msg;","outputs":1,"noerr":0,"x":840.5,"y":509,"wires":[["27d4d8db.547278"]]},{"id":"1ea6e66e.e380ba","type":"ui_group","z":"","name":"TCP RAW Data","tab":"115d9936.2b4ef7","disp":true,"width":"20"},{"id":"115d9936.2b4ef7","type":"ui_tab","z":"","name":"Sensor Data","icon":"dashboard","order":3}]
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+unsubscribe@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/7150fe56-907a-4b27-964b-6cb72094cdb0%40googlegroups.com.