DAEMON msg delay

At first I would like to thank you for the work you are doing on node-red. I simply love it. It is not very often when I got stuck with something, becouse of outstanding documentation, forum and intuitiveness of node-red itself.

I would like to ask for explaining the behavior of node-red-node-daemon. See the situation: I have an CMD.exe application, which has its own set of commands. Daemon starts normally - shows running. Than I inject for CMD.exe specific commands:

INJECT RECEIVED
Command A nothing
Command B Response for Command A
Command C Responce for Command B
ect.

This is only working when "Add [enter] to every message sent ?" is checked. But it seems to me, that daemon adds [enter] in the begining of the message, thus it delays the output. Maybe it is caused by the CMD.exe, but when I check the behavior of it using command line, it works as it should - returns response for sent command.

Is there a way, how to look under the hood of daemon node and see, what is exactly fullfilling and returning? Debug node shows only the result, not the process.
Is there a way, how to send [enter] via inject node? (Found discussion related to this, but the solution was to use ECHO - in this case it seems not to be possible).

Best regards, thanks in advanced
Stepan

HI,

for Enter - rather than inject a type String... which will indeed take the \n character and send \ followed by n - try the JSON type as the "Command A\n" will send Command A(Enter).

Also does you cmd.exe buffer up it outputs ? certainly python apps do and so they only send results when the buffer is full or they finish unless told to send output unbuffered.

Hi,

this was pretty good tip, thank you for that. However the output is still one msg delayad. Eventhough I am now able to use [enter] alone, it does not output anything until Command, which outputs valid result, is applied. I am sure, that it is not buffering the output, but I will try to use -u suffix to prove that.

Neverthless by knowing the delay is present, it is possible to use it seamlessly.

Thank you for your help.

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