Loading

MakerBot Print is our newest print-prepration software, which supports native CAD files and STL assemblies,
allows you to interact with all your printers via the Cloud, and many other exciting new features.

Download Now

Report as inappropriate

I'm still in the process of implementing everything, so I haven't gotten everything figured out yet. My initial plan is to control cooling fans and lights with the relay. Possibly even controlling the power to my printrboard with the relay as well. I started with this example:

https://github.com/foosel/OctoPrint/wiki/Controlling-a-relay-board-from-your-RPi

However it seems like the only default way to execute shell commands for the GPIO pins in octoprint are from the "system" drop down menu or though event hooks in the config.yaml file. I wanted the option to control the relay though the control tab of octoprint, however it seem like you can only send gcode with the custom controls in the control tab. I also wanted to the cooling fans to turn on and off automatically with the hotend, but there aren't any event hooks for that.

So right now my plan is to make buttons in the controls tab that send fake gcode. Then I will use an Octoprint plugin which will intercept the fake gcode, execute the shell commands for the GPIO pins, and then suppress the fake gcode before it goes to the printer. It is a super round about way to issue the commands, but it looks like it is going to work. Here is some documentation on how to write a custom octoprint plugin.

http://docs.octoprint.org/en/master/plugins/hooks.html#octoprint-comm-protocol-gcode-phase