Basic execute command failure

Hello everyone. I've been banging my head against the wall for the last hour with execute command. As a basic test, If I run the command vcgencmd measure_temp in the terminal I receive CPU temp on the raspie.

I put this same command into execute command in node red and I get nothing back into debug node. No error, i see it flash pid quickly under the node as if it's running... I've tried all sorts of variations found on google, using `` and " " yada yada.. I think i'm missing something simple?

I just want to understand if you can run basic CLI commands and read the output. Image below. Thank you in advance!

Check out the info for the exec node, each output on the right side of the node gives different things. The middle one is standard error. The top one gives standard output, and the bottom one gives the exit code.

:man_facepalming: i knew it was something stupid i was doing... lol thank you.


I think you need a bit more in the command.

I have done what you said but I have a slightly different bit of stuff in the exe node.

/opt/vc/bin/vcgencmd measure_temp| sed 's/[^0-9]*//g'

That gives a nice output for me.

You could also use Telegraf which is really useful if you want to track system metrics over time by output to InfluxDB. However, you can also use it to output to MQTT if you just want the spot value.