CANUTILS in node-red

I want to send a file with CAN messages with node-red. In the terminal it works fine with canplayer -I /home/candump.log (canutils). Now I want to send the same command from node-red with an exec node. Unfortunately the result is an error (infile: No such file or directory). The "infile" is the option which is used to set the file with the can messages as given in the help

-I (default stdin)

anyone can help me?

Thanks in advantage

Ino

Can you show us the settings for your exec node and the exact stdout and stderr output from the node?

input: timestamp

Command: canplayer -I
Append msg.payload (not checked)
/home/Argos/candump-test.log

stdout : no output
stderr : {"_msgid":"b1371f0b27fa7bd6",
"topic":"","
payload":"infile: No such file or directory\n","rc":{"code":1,
"message":"Command failed: canplayer -I /home/Argos/candump-test.log\ninfile: No such file or directory\n"}}
return code : {"_msgid":"8235dd77db8baed4","
topic":"","payload":{"code":1,
"message":"Command failed: canplayer -I /home/Argos/candump-test.log\ninfile: No such file or directory\n"}}

  1. If Append msg.payload is not checked, how does it know to process /home/Argos/candump-test.log? A screen capture of the setup might have clarified this.

  2. Does the file /home/Argos/candump-test.log actually exist? (Your original post says that from the command line it's /home/candump.log that works.

  3. Does it make a difference if your exec node uses the full pathname of canplayer? (Use which canplayer to find this)

sorry jbudd, found the problem and that was me. 2 raspberry's, 2 running node-red versions, too late and too much use of ctrl C and control V. The reason of malfunction was the use of the wrong file. It is working fine now and the next challenge is to stop the canplayer.
many thanks for your reply!

1 Like