how can I connect a simulation application of a machine to node red?
This applicatin send an http request that contain a JSON file.
The Client http open and close connection for every information sended to server.
Every event have a specific JSON that it will be send.
What part do you want Node-RED to play?
Node Red should receive the data (in json format) and produce a response in json format. Application calls post and get which must be intercepted by node red to produce a response depending on the call
See the section HTTP Endpoints in the node red cookbook https://cookbook.nodered.org/
Please don't post screenshots, copy/paste the text. Use the </>
button when pasting it in.
Did you try the example flow from the cookbook so you could understand how it works? Once you understand that then what aspect don't you know how to do?
Is the client using an html POST? If so then you need to configure the http node as POST. One of the example is for json post.
What is the Join node in the flow for?
In the template node you can insert data from a message into the result. Look at the help text for the node.
you are right, the join node is an error.
And yes, i found that. Thanks.
Last question, is it possible to know what is the time that node red takes to connect to the program, the time it takes to receive and send data? To put this data into the response json
What do mean by the time it takes to connect to the program? How can you put the time it takes to send the data into the response, as by the time you know how long it took you have already sent it? For how long it takes in node red I think there is a node that will time how long messages take in a flow, but I can't immediately find that. Search in the node red flows site and if you can't find it then I suggest asking again in a new thread.
Sorry, bad traslate. I mean the time to wait when connecting before declare timeout; the waiting time when sending before declaring timeout; but now I know these are variables defined before connecting.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.