I've been struggling to use the exec node to run a command that will work in a standard linux cli. The command sends a request to a thermostat in my home, and returns a JSON object with the current status of the thermostat. The command is:
echo -e '{"GET_SYSTEM": 0}\0\r' | nc 192.168.1.20 4242
It works perfectly in the Raspberry Pi terminal, but when I've tried using it in the exec node, I don't get the result I'd expect:
1 - If I add the command, as written above, to the "Command" field of the exec node, I get no message on the stdout, stderr or return code outputs of the node.
2 - I've tried changing to spawn mode, instead of exec node, and then I get a raw data buffer output, which I can't comprehend.
3 - I've tried "injecting" the command to the exec node as well, and this gives the same results.
Any pointers? Is there something obvious I'm missing?