OctoPrint one step closer to replacing Printrun - custom controls!
Originally shared by OctoPrint
I spent most of today finalizing the much-requested feature to allow adding custom controls to the controls tab. I’m happy to say that it’s now available in the devel branch: https://github.com/foosel/OctoPrint/tree/devel
You can see an example below. The excerpt from the (now YAML based) configuration file defines four buttons in two sections, “Motors” and “Fan”. “Motors” contains one button each for enabling and disabling the motors, sending “M17”/“M18” to the printer when clicked. Section “Fan” contains a parametric command for enabling the fan with a user-supplied speed value defaulting to 255 (“M106 S255”) and a regular command for disabling the fan (“M107”).
There only exist three control types for the type being, “section”, “command” and “parametric_command” with the available attributes being as given in the screenshot. You can also read about the syntax in the README file: https://github.com/foosel/OctoPrint/tree/devel#configuration
I will merge this and the other features currently contained in the devel branch (namely pagination for the gcode file list, autoscrolling on the terminal tab, a bugfix for the temperature graph and the switch to YAML as config file format) onto the master branch in a couple of days, once I’ve gotten a chance to play around with them some more myself and/or I’ve gotten some feedback from you, the users