I'm having an issue that I'm not able to fix when using a | (pipe) in an exec node. The full command I am trying to exec is:
pactl load-module module-loopback latency_msec=1 source=2 sink=1 | multimon-ng -a DTMF /dev/stdin
But the command will not get executed and the error message thrown is:
Failure: Module initialization failed
However if I just exec the below command in the exec node, it works:
pactl load-module module-loopback latency_msec=1 source=2 sink=1
And if I just exec the below command in the exec node, it also works:
multimon-ng -a DTMF
So I tried the above two commands that are failing in node-red, by executing them directly in the console. Both work:
pi@raspberrypi:~ $ pactl load-module module-loopback latency_msec=1 source=2 sink=1 | multimon-ng -a DTMF /dev/stdin multimon-ng 1.1.8 (C) 1996/1997 by Tom Sailer HB9JNX/AE4WA (C) 2012-2019 by Elias Oenal Available demodulators: POCSAG512 POCSAG1200 POCSAG2400 FLEX EAS UFSK1200 CLIPFSK FMSFSK AFSK1200 AFSK2400 AFSK2400_2 AFSK2400_3 HAPN4800 FSK9600 DTMF ZVEI1 ZVEI2 ZVEI3 DZVEI PZVEI EEA EIA CCIR MORSE_CW DUMPCSV X10 SCOPE Enabled demodulators: DTMF
So I suspect the exec-node does not handle the pipe properly.
I hope someone has faced the same issue and can help me.
PS: It is not a matter of appending the msg.payload as I am even trying by passing the entire command manually in the exec node to make sure the command is executed properly.