Just discovered NODE-RED and still learning the basics...
Hardware is Raspberry Pi.
Designed a flow, with a few exec nodes.
Works perfectly on Rpi/Raspbian, commands work in Terminal.
Now I want to run the flow on another Rpi.
This one has OSMC/Kodi. (Linux osmc 4.14.34-6-osmc)
Installed Node-Red without problems, imported flow without problems, only the exec nodes return an error.
Commands are working if I connect with ssh.
Tried different simple commands, tried adding sudo, same error:
"Command failed: sudo ls 1544782951140 ls: cannot access '1544782951140': No such file or directory"
That looks very much like you have the append msg.payload option still ticked in the Exec node - so the timestamp from an Inject node is being appended to the command. Untick that box in the Exec node and try again.
In addition to @ukmoose's comments it looks as if you are trying to use a timestamp as a parameter to the exec node. Perhaps you are triggering it with an inject node and have got the 'Add msg.payload to command' option ticked.
@knolleary Of course you are right, stupid of me, forgot to uncheck this for my example...but this wasn't really the problem...I think.
@ukmoose
This Rpi runs OSMC showing an info-clip continuously on a TV.
Next to that it has node-sonos-http-api, which is an Sonos-server listening on port 5005.
A camera with motion detection makes the sonos system welcome people coming in with tts.
This all works fine.
Now, next to all that I installed Node-Red with the intention of checking if everything is running like it should.
For example I send a HTTP request to the sonos server to see if it's up and running. If not (ECONREFUSED) I try to start it by way of the EXEC node running : bash ~/node-sonos-http-api/st.sh.
An executable script.
Of course you are right, I shouldn't have to use root.