OctoPrint

From Gentoo Wiki
Jump to: navigation, search
Note
Currently this logs everything I have done to set up the OctoPrint E-Build I am setting up. My intention is to distribute the E-Build in due course at which point this will transition into a document detailing how to install the E-Build. Please bear with me while I get this all resolved. I am aware that I probably deviate significanlty from the Wiki Guide Lines, but do not presently feel this is a problem

Introduction

OctoPrint is a 3D Printer Server. At the time of writing it has apparently been available for about 3 or so years and is fairly mature. It is a Flask based web application that controls ones 3D printer providing real time video streaming during a print and a number of other features.

Printers

OctoPrint supports a large number of printers out of the box. The most complete listing is provided on the OctoPrint Wiki.

Installation

The installation places files in the following locations

Path Description
/var/lib/octoprint The home folder for the OctoPrint User, containing all it's configuration, log and stored files
/etc/init.d/octoprint RC-Service Script for starting and stopping OctoPrint
/etc/conf.d/octoprint This is where the OctoPrint configuration file should go but currently does not (See the home folder)
/usr/bin/octoprint This is the main Python script that is called by the service, you can csll it yourself but it will then execute under you profile, creating a .OctoPrint folder in your home directory
/usr/libs/python2_7/site-packages The main installation of OctoPrint Code goes into one Python installation

User(s) and Group(s)

The OctoPrint manual recommends one should create an OctoPrint user and allow it access to the Serial and Terminal groups. Gentoo provides the tty group for terminal access but this is not really required by OctoPrint and there is no Serial group so instead the uucp group is specified in the EBuild.

Serial

Note that one must enable USB/Serial communication in the Kernel for these printers to work. 3D Printers do not run on drivers like traditional printers do and communicate with the computer via a serial interface. The Arduino section describes how to set this up. There is a nice entry in the Gentoo Forums that explained this setup aswell . The Arduino website further discusses serial connection issues.

Cura

Cura is a 3D slicing program which seems to have gone through three major architecture changes roughly coinciding with versions 0.15.X and 2.1.X. OctoPrint (Currently 12.1) does not support the 2.1.X implementation and the EBuild locks in at the 0.15.6 version available in the gentoo repository.

When OctoPrint calls Cura it might fail with one of the following error codes. I have not worked out what the differences, causes or resolutions are for each one just yet. I did find they occurred when trying the 2.1.X version of Cura with the 12.5 version of OctoPrint. I simply list them here for now, perhaps they are investigated further by other parties.

Error Code Error Description
1 Cura Executed but did not produce a G-Code file. In the logs only the help text is shown indicating it does not like the call arguments
2 This only occurred once while I was fiddling about with my installation so I have no further information on this one at this time.
6 The call to Cura included a whole series of text which appears to be mostly Meta information about the STl file, but I stand corrected.

Service

Once installed one may simply enable the OctoPrint service via the usual Open RC commands.

Setup

When one initially opens the first page in OctoPrint they are asked to create and admin account. This allows one to secure the server. One should created this account not doing so exposes ones printer to the more interesting of the netizens who might have ill intent for your wee printer.

Cura

The Cura Plugin is enabled by default but one must specify the location of the Cura Binary. There are two that are setup by the media-gfx/cura ebuild. Namely the one residing in /user/bin/cura which is the user interface and /user/bin/CuraEngine which is the slicing engine itself. The latter path must be provided in the Template:Menu Plugin settings.

The CuraEngine requires a Printer Profile which one must generate directly from Cura itself. This is done by navigating to Template:Menu and saving the resulting file which is then loaded directly into the OctoPrint interface under Template:Menu.