If I want to use msg.payload in the command line of the EXEC node, is this possible? I tried using {msg.payload} as well as two and three mustaches without success. Anyone know how to do this?
No, but you can use a template node to build the payload you want before the exec node and then use the append payload
option (iirc you can leave the command empty in the config so the whole cmd line can be passed in as the msg.payload)
Appreciate the suggestion but I failed to mention in my original post, I need to insert a variable in the middle of the command string. The reason for my question was I was hoping to avoid having to insert another node in front of the EXEC node. If that's not possible, I'll just use a Function node and move on.
You can't use moustache but you can insert a value into the command - just tick the append msg.payload to append it then any other parameters afterwards...
You should be able to assemble a command line with Jsonata in an inject node, something like this (ifconfig wlan0 | grep inet
)
@jbudd... thanks I think will work for my situation.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.