i am interfacing dht sensor with arduino and getting serial data on raspberry pi through node red now i want to create only 1 function to differentiate between temperature and humidity
Now i need the js of function node to to deploy
please help i really need it
Can you publish what you've got so far?
Add a debug node to the serial Node so you can see what you are sending.
msg.payload gives temperature and msg.humidity gives humidity
so your screenshot shows a red triangle on the serial node which means it’s not configured correctly.
Add a debug to the serial node so you can see what it is sending when configured.
Without seeing what the message is, and what your function is it is difficult to suggest anything else
Taking another look, if you mean you don't know how to send some to output1 and something else to output 2 , the docs have an example https://nodered.org/docs/writing-functions#multiple-outputs
Isn’t the “switch” and “change” nodes enough for your application?