1

I want to send UDP from Node Red to Pure Data. In NR, I have a UDP output node set to 127.0.0.1:3001 and a Pd netreceive object set to 3001 1 (the 1 sets the object to UDP rather than TCP). No message is received in the Pd patch.

To thicken the plot, a Node Red UDP output node set to 127.0.0.1:1881 does successfully send to Node Red UDP input node set to 1881. Also, a TCP object set to 127.0.0.1:3000 does connect with d netreceive object set to 3000, reported by the Pd console as "EOF on socket 12".

As the Node Red UDP output node is sending within the flow and Pd can report a TCP connection, I suspect there's something I have to do to format the message for PD. Any ideas?

Max N
  • 1,134
  • 11
  • 23

2 Answers2

4

netreceive expects messages to be FUDI-formatted. Basically, this means messages are terminated with a semicolon. Until a ';' is received, [netreceive] won't output anything.

Read more here: https://en.wikipedia.org/wiki/FUDI

rdz
  • 74
  • 2
  • 1
    +1, I've done the same kind of thing from Ruby and this was a major gotcha. You may also find it needs a newline character (\n) – AJFaraday Aug 27 '15 at 13:46
0

Please check out my git repo for a solution. https://github.com/sylatupa/Digital-Culture-Sound-Client/issues/1

Node Red was used to receive MQTT on particular topics. I route the topics to the appropriate shell command that runs the locally installed pdsend executable. image

I take the MQTT payload and pipe '|' two strings to the pdsend executable. Left 3 is relieved by the execution of pdsend image

The puredata patch receives and routes the 'Left 3' message image

Node-Red is running on a raspberry pi, along side the mqtt broker. I am testing with a MQTT client written in python. See the github for the code and pure data patch, and maybe the node-red flow if that can be exported.

What is lacking is more complex messages, json encoded strings, and larger hierarchy topics, /pi/sensor1.

sylatupa
  • 53
  • 1
  • 8