I am trying to run a wget command when a custom action is triggered using the ActionCommands plugin.
the action is "materialempty"
the test with type 'gcode' and command 'M114' works
the test with type 'system' and command 'wget ...url...' doesn't work
(also tried 'sudo wget ...url...)
the wget command works in the terminal on the same machine
pretty important maybe: I am running octoprint on ubuntu
does it has to do with rights?
what usefull information can I post to get the question clear...
cheers / joris
SOLVED:
Try with /usr/bin/wget instead.
thanks to @jneilliii, but also the other replies
I am not a ubuntu/terminal expert at all, do you mean you cannot acces the wget?
how to bypass that, with a bash script and then run the bash script?
(how would the bash script look like then and where to store the bash script?!)
another thing to consider is that just running wget won't work, you need to include the full path to the executable, because there is no "Path" environment loaded I suspect. Try with /usr/bin/wget instead.
I am not downloading anything, just want to activate an scenario at make/integromat to send out an email and/or slack message so I can see when the material is empty.
The trick is I want to make it work while octoprint is printing and cannot be restarted, so with the plugins already installed... : )
I think I am pretty close, but cannot figure why the command is not working...
I know I had similar problems with the shutdown command, I think I fixed that somehow, but cannot test at the moment. It had to do with Ubuntu (vs rapberry pi) iirc.
as usual a user error, my fault...
I tested the gcode version with the same action, but disabled, that caused that the enabled version wasn't executed either.
After that I changed to the full path, but it was never triggered. This I found in the logs (thtanks for the tip!!)
removing the gcode version and using the full path made it work.