GCODE System Commands

GCODE System Commands – GPIO

Good morning,

I want to use “GCODE System Commands – GPIO” to set the GPIO2 bit.

I always get the "error" message when I type "OCTO901".

“OCTO901” is associated with the phpRelais.sh program

phpRelais.sh is an executable program located in the /usr/local/bin/ directory.

Below is a copy of the different screens.

Thank you for your help, kind regards..

GCODE System Commands - GPIO.pdf.zip (290.5 KB)

Hello @php !

There has been a template - you have deleted it.

It asked for some information. Without that, we only can guess.

OctoPrint doesn't run as root, so the permissions could be related (sorry haven't spoken French in ages). If anything I suspect this is related to a permissions issue, the bash script isn't made executable (I think one screenshot shows this is set correctly), or you need to use full paths for the gpio commands inside the script. If you run the script manually in SSH session logged in as the same user the OctoPrint service runs under does it work as expected? What is your octoprint running under, the path shows in one of the screenshots was strange /media/phillipe....etc. Personally I would put the script file in OctoPrint's base folder under the Scripts folder and that would allow for it to be backed up with OctoPrint's backup system.