UDP 3 Signals but i can displayed only 1 signal

i just have sensor and they send 3 signals output but i cant displayed all signal.I only display only 1 signal.

Can you show what comes out of the UDP node ?
You’ll need to parse the data to do what you want.

Hi, nlecaude
thank for reply me
it have 3 data but i cant separeble them
{"payload":[51,56,54,48,59,52,53,54,52,59,51,57,54,48,53,52,59],"fromip":"169.254.191.182:8000","ip":"169.254.191.182","port":8000,"_msgid":"9c012306.3059e"}


it have 3 number in 1 gauge

PNWw

Have 3 data but i can't separate them.
Screenshot (5)

Configure the UDP node to output a string, then you can split the message up in a function node using the split() function to turn it into an array.

ok Colin,thank you very much for reply
when i do that number have separable.And now i want to take 3 number into each gauges.


You need to set the split node to split on ; and tell it to output an array. Then you can use angular filters to select what to show. So you should be able to set the gauges to show {{payload[0]}} or {{payload[1]}} to show the first or second elements in the array.

[Edit] At the start you showed the numbers were separated by ; but from the second screenshot it appears that has changed. That is the character you must split on in the Split node.

thank you for reply, Colin
but i don't know how to set "You need the split node to split on ;and tell it to output an array."
Sorry for my not knowing,I'm so new.
and my english is not well.

Open the Split node and see what the available settings are.

Apologies, I thought you could do it with a split node, but you can't. Instead you can do it the way I first suggested. Use a function node and the javascript split() function. Your first post seemed to show the numbers are separated by the character ; but the most recent shows they are separated by the horizontal tab character (9) so I think you need to put in the function node

msg.payload = msg.payload.split("\t")
return msg;

Feed that into a debug node and make sure you see the numbers in an array.

thank you very much,Colin
i can do it.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.