Jacques44 / node-red-contrib-bigssh

remote command using ssh big node
Apache License 2.0
8 stars 12 forks source link

Sending data to STDIN problem #37

Closed Toreca closed 1 year ago

Toreca commented 1 year ago

Hi. Experience problems with sending data to STDIN of an instantiated process. I'm using MPG123 for playing MP3 files. All works from local SSH console so I'm trying it via BIGSSH (to the same machine as EXEC Nodered node didn't work). I'm running command /usr/bin/mpg123 -o pulse -a 0 --remote. Then the process expects string commands via STDIN to be controlled.

If I check Do not send payload to the command then I can instantiate MPG123 process in memory but I cannot send any data to STDIN afterwards (I understand it is because of the checked Do not send payload to the command).

If I uncheck this I would probably be able to send payload via STDIN to the process but in this case I cannot make MPG123 stay in memory and it immediately begins with RC 0. See also the pictures.

What is the proper way of first running the command in order to stay in memory (for MPG123 it is ensured by --remote switch) and second send the string data to STDIN of that running process? What should be in the first and second inject nodes and how should be the BIGSSH node configured?

Thx.

2023-02-05_133943 2023-02-05_134834

Jacques44 commented 1 year ago

Hello, sorry for taking time to reply. As I understand, you'd like the remote command to stay alive while sending different payloads? If so, this is not the behavior of the node. You'd probably have to build the whole message then send it to the node

Toreca commented 1 year ago

Oh, I see. Btw, I've solved the issue by using VLC player (instead of MPG123) with telnet session established for remoting.