Quering the PFOD protocol (or any other TCP protocol)


The ArduMower project uses the so called PFOD protocol to communicate via bluetooth and wifi. The ESP8266 provides a TCP Server and I am already able to connect to the TCP Server.

However, I am not able to query the device. I guess, the best would be to describe, how I connect via telnet:

telnet 8080
Connected to
Escape character is '^]'.
{m1}                            <------- this is what I have to send
{=Log sensors}

It outputs these lines as long as I send a new command. For some information I have to send say {po} and get a single line.

I created already a TCP client node, but how can I send the commands and receive the lines? I created dummy data with inject and was able to split the lines and forward them to the gui. Only the TCP part is missing. Do you have some hints for me?

Edit: Since I have to query multiple sources for one widget, I guess a solution with a function node may be the right one. Is that right?



Which TCP node are you using ? The tcp-request node ought to be the one



I used tcp-in for this before. Because of your hint I tried an inject node (creates the input) and tcp-request and it works. Thanks for that.
Therefore I created multiple chains (inject, tcp-request, function, template) and got connection issues, since I can connect once only at the same moment. It is a limitation of the ESP8266 firmware.

Is it possible to create a function node acting like a tcp-request, in order to ensure that the requests are done serial, not parallel? I know that the sense of node red is not to create flows with overdosed functions, but I see no other way.



The request node should be able to close its connection after each request so chains should be possible. You may need to add a small delay between each to let the esp recover.