Update 01-Mar-20 – I don’t know how I didn’t know about, but OctoPod has a plugin. I added it to the list. I also added some info about 

About 8 months ago I purchased a Creality Ender 5. I wrote a mini getting started guide about it. In that guide, I mentioned OctoPrint, and how I would do a separate write-up on that. I installed OctoPrint after a few prints. I wanted to be able to monitor the prints remotely since the printer is down in the basement. This write-up goes through my setup and settings along with the plugins I used.

Installation

Here’s what you will need if you are planning on installing on a Pi:

  • Raspberry Pi 4 – This is the 2GB version. 1GB will work, but this is only $2 more at the time of this writing.
  • A good SD Card – Whichever brand you go with, get an ‘Application Class’ card. These will just be more durable. SD Card failures are very common with RPi’s.
  • A Solid Power Supply – OctoPrint doesn’t like getting warnings from the Pi about power issues. Don’t cheap out here. A lot of regular phone power adapters just don’t deliver enough juice.

I’m not going to go into much detail on installing it since there are many resources out there to show you how to do that. If you plan on installing on a Pi using OctoPi, then I just recommend following the steps on OctoPrint’s site. If you want to install on Ubuntu or Linux Mint (It will probably work on other distros, but I haven’t tested it), then I recommend this video. A lot of the video walks you through installing Ubuntu. You can skip that part if you don’t need it. Also, he has a link to a doc in the description that has all the commands that you need.

The most common method of installing it is using OctoPi. OctoPi is a full OS that runs OctoPrint. It is highly recommended to run OctoPrint on at least a Pi3. However, my Pi3 was being used for something else that that time, so I just decided to go with the Pi2. And that was a mistake. I saw why the Pi3 is recommended. It was very slow. I don’t think I had any print issues, but I also wasn’t running many plugins.

I was about to move things over to a Pi3, when I remembered that the PC that is dedicated to running my Home Assistant install on Linux Mint(Ubuntu) is right next to the Ender 5. Even thought it’s 6 years old, it is more than powerful enough to run both HA and OctoPrint at the same time without breaking a sweat. I’m glad I moved it to that PC. With the SSD drive in it, the difference was night and day compared to the Pi. The interface loads up much quicker. Plugins that took 30 seconds to install take just a few seconds.  

I understand most people won’t be in the same situation as me and won’t have a PC laying around that they can use for just this purpose. And if you can’t do that, then something like an Intel NUC would be great. And if that’s out of your budget, then go with the Pi4. At the time of writing, it’s in the beta stages of OctoPrint support, but it appears to be working well for most people. And as stated before, the Pi3 is the bare minimum you should go with. It will technically run on Pi2’s and Zeroes, but I see a lot of people coming into the forums and Reddit with OctoPrint issues, only to learn they aren’t using a Pi3 or higher.

If you go with the Pi, as I’m sure most will, then there are 2 things that I feel are an absolute must: 1) A solid SD card. This one is made to handle a lot of data being written to it. I’ve seen TONS of people have issues with the Pi, both with OctoPrint and Home Assistant, that were resolved by replacing the SD card. 2) A solid Power Adapter for the Pi. This is also a common issue. When the Pi doesn’t get enough power, it starts to throttle. Your prints will suffer when that happens.

My Setup

In this section, I’ll go through a handful of my OctoPrint settings and explain why I did it that way. Up until a week ago, I was using Klipper with OctoKlipper for my printer firmware. It worked OK, but I have now upgraded my stock board on my Ender 5 (Here’s my writeup on the Ender 5) to an SKR Mini E3.

Printer

Serial Connection: The only thing I really changed here was on the ‘Behaviour’ tab. It was setup to disconnect from the printer on any error. Well OctoKlipper caused it to disconnect if you manually sent a command for the printer to travel out of bounds. So, I just set it to cancel the print job, but stay connected to the printer.

GCode Scripts: Here I added some GCode to run when the print starts and stops:

Start GCode. The first thing this GCode does is heat up the bed and extruder at the same time. It uses the Preheat Plugin to get the starting temperatures of the print. By using the M140 and M104 commands, it doesn’t wait for the bed to heat up before heating the tool. This way the print starts a couple minutes sooner. I haven’t had any issues with this, but I don’t know if other printers have problems heating both up at the same time. The M190 and M109 commands then wait for both to reach their temperatures before starting. After that, it just prints a prime line along the right side of the bed to get the filament primed:

M420 S1 Z20 ;load bed mesh

M900 K0.35
M140 S{{ plugins.preheat.bed|int() }}
M104 S{{ plugins.preheat.tool0|int() }}
M105
M190 S{{ plugins.preheat.bed|int() }}
M109 S{{ plugins.preheat.tool0|int() }}
M82 ;absolute extrusion mode
G28 ; Home all axes
G92 E0 ; Reset Extruder
G1 Z2.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed
G1 X218.1 Y218 Z0.28 F5000.0 ;Move to start position
G1 X218.1 Y2.1 Z0.28 F1500.0 E15 ;Draw the first line

G1 X218.4 Y2.1 Z0.28 F5000.0 ;Move to side a little
G1 X218.4 Y218 Z0.28 F1500.0 E30 ;Draw the second line
G92 E0 ; Reset Extruder
G1 Z2.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed
; End of custom start GCode

Print Complete/Cancel GCode. This basically just moves the print head to the home position. I have a direct drive extruder, so you may need to change your retraction accordingly:

M140 S0
M104 S0
M220 S100 ; Reset Speed factor override percentage to default (100%)
M221 S100 ; Reset Extrude factor override percentage to default (100%)
G91 ; Set coordinates to relative
G1 F1800 E-1 ; Retract filament 1 mm to prevent oozing
G1 F3000 Z20 ; Move Z Axis up 20 mm to allow filament ooze freely
G90 ; Set coordinates to absolute
G28 ; AutoHome
G1 Z10 F3000
;M84 ; Disable stepper motors
; End of custom end GCode

Webcam & TimeLapse

I simply followed the guides for setting up the webcam. In my opinion, this is a must have feature for OctoPrint. It’s how you can know if a print has gone south and needs to be cancelled. You basically have to setup a webcam server(You can use the same Pi/Computer as OctoPrint) using MJPEG Streamer. Then you point OctoPrint to that server to get the images. I personally use the OctoLapse Plugin, mainly because it creates MP4 videos of the time-lapse and it gives me a lot more control over the focus and other picture settings of the webcam. I use the Logitech C920, and it does a pretty good job.

Server

I put in the commands for OctoPrint to be able to restart itself and the server. Here’s what I have. I left the last one blank because I don’t think I would ever want to shutdown that computer via OctoPrint.

Backup/Restore

There are no settings to configure here, but I do recommend taking the occasional backup. Especially before and after any major changes.

Clients

There are a few different ways to access OctoPrint. Of course, the most common, and feature rich method is through the web interface. However, there are apps out there that you might find a lot quicker than waiting for the web interface to load up. 

  • OctoPod(iOS): This is the one I use since I started using OctoPrint. The last few big updates have been awesome, so that usually means the product will continue to get better. It even has push notifications, so it can send you a notification when your print is done and when the bed has cooled below a specified temperature.  You do need to be connected to your local network via WiFi or VPN, to be able to use the app. 
  • AstroPrint(iOS and Android): This is probably the easiest way to get remote access to your OctoPrint instance. However, the controls are limited, and I believe the video doesn’t refresh that often. I love the AstroPrint service, but their app needs some work. 
  • Kraken(iOS): I don’t like it as much as OctoPod. But I also didn’t try the Pro version which costs $6. But I don’t really see any features that the Pro version has that OctoPod doesn’t. It may be able to handle multiple printers better, but I only have the one printer, so I can’t test. But, there have been constant updates for the past few months. Might be worth keeping an eye on this one. 
  • OctoRemote(Android): I haven’t tried it, but it looks really good and is well reviewed. The interface looks a lot like the web interface. Just my personal opinion, but I like the OctoPod interface better for a touch device. 
  • Printoid(Android): I have not tried it. But the free, ‘lite’ version appears to be available on the Play Store so you can test it and make sure it can connect to OctoPrint. The Premium version costs $8, and unlocks a bunch of features. It supports widgets, and smartplugs, and a few other things. This one looks like it would be worth checking out. I miss having widgets from when I was using Android. 

Plugins

Here I’ll go through the plugins I use and what I use them for.

FilaWeigher Plugin: Of course, the one plugin I actually wrote gets to go first. I wrote about my FilaWeigher project that I created. This plugin grabs the data from the FilaWeigher and displays it in the OctoPrint sidebar.

AstroPrint: This is probably my most used plugin. AstroPrint is a freemium service that connects to OctoPrint. You create an account on https://cloud.astroprint.com and then punch in that login info into the plugin. Then you can access your printer through the AstroPrint portal. I am currently on the free tier. Their paid tiers are useful if you have more than two printers, or need more than 1GB of storage space in their cloud. AstroPrint can also connect to other services such as ThingiVerse(When it’s actually up) and TinkerCad, along with a few others. All through AstroPrint, you can find a model on ThingiVerse, import it with a click, slice it, and send it on to your printer. I have sent dozens of prints to my printer while away from home using my smartphone. It takes just a couple minutes to do it. It’s a very nice product. You can also see screencaps of the print through AstroPrint. Live video is available in the paid version. This is an excellent option for people who want to be able to access their OctoPrint instance remotely without having to open up ports on their router (DON’T DO THIS) or setting up a VPN, which can be complicated. There is also an app available, but I haven’t really used it since it lacks a lot of features.

Bed Leveling Wizard: This is a nice plugin for those of us that are manually leveling their beds(There are DOZENS of us). It basically just places the hotend near the corner of the bed so you can level that corner. You press Next and it moves on to the next corner.

Bed Visualizer: In just the past week, I learned about manual mesh leveling. I really wish I would have known about that sooner. Anyways, this let’s see what your bed looks like in a 3D visualization.

BetterHeaterTimeout: This is one of the handful of plugins I use to ensure safe operation of the printer. It basically kills the power to the printer if it detects anything funny happening with the temperature(For example, a heater heating up way past what it is supposed to, or not heating up even though the heater is on).

Cancel Objects: This is a useful plugin for those times you are printing multiple things at once and one of those things fail. With this plugin, you don’t have to cancel the whole print. Just cancel the one object that failed. Although, the Exclude Region plugin is probably a better option most of the time.

Cost Plugin: This simple plugin just tells you how much the current print is costing you. You can put in the cost of the filament, and the cost of the print time and it will calculate it.

Custom Control Editor: You can add custom buttons to OctoPrint using YAML config files. This plugin puts that functionality into the GUI. I use it for manual mesh bed leveling straight through the OctoPrint interface. This is especially useful for those that want to save some space on their printer firmware by leaving it out of the LCD interface on the printer. I followed this forum post to set that up.

Display ETA: This plugin tells you what time your print will finish.

DisplayLayerProgress: This tells you what layer the print is currently on.

Dropbox Timelapse: I’m hoping to use this plugin to upload video to dropbox automatically, and then use Zapier to automate uploading the video to YouTube. 

Exclude Region: This plugin allows you to exclude a certain region of the print bed. Anything in that region will not be printer. This can be useful when you have a GCode file with multiple objects, but don’t need all of them.

Filament Manager: This can keep track of how much filament is left on the spool, based on how much has been printed. You can to make sure you add in a new spool when you swap spools. I don’t use this plugin anymore since I have my filaweigher.

File Manager: This adds a cleaner way to manage the files you have in OctoPrint

Firmware Updater: This allows you to send firmware updates for your printer board straight through OctoPrint. This is useful so you don’t have to connect the printer to your computer just to update the firmware. It worked great with the stock board on my Ender 5, but I’m not sure if it’s possible to update the SKR Mini E3 this way.

Floating Navbar: This plugin makes it so that the navbar is always at the top of the page, even when you scroll down

MQTT: This lets you send MQTT messages about the printer to an MQTT broker. I’m not really using this one much, but I might try to integrate it into Home Assistant using this.

MQTT Publish: This lets you control MQTT devices using buttons on the navbar. You can also control them through GCode. I’m using it in conjuction with the PSU Control Plugin to the that PSU plugin can turn of by smartplug, which is controlled by MQTT through Home Assistant.

Navbar Temperature Plugin: Shows bed and tool temps in the nav bar.

OctoKlipper: This is the plugin that you need if you are using Klipper

OctoLapse: Personally, I’m just using it to take snapshots while the print is ongoing so it can create a time lapse. I’m not doing the fancy time-lapses that park the hotend before taking the snapshot, but I do plan on setting this up soon.

OctoPod Plugin: I’ve been using the OctoPod iOS App since shortly after I started using OctoPrint. However, for some reason, I didn’t discover this plugin until after I wrote this article. If you are using that app(which I HIGHLY recommend if you have iOS), then this plugin is a must. It sends notifications to your phone. So it basically does what I use Telegram for. However, I don’t think there’s a way to send periodic notifications like Telegram when there is an ongoing print. But this plugin is a lot less work to setup than Telegram. 

Preheat Button: This adds a convenient button next to the “Print” and “Stop” buttons that will preheat the bed and tool to the temperatures in the current GCode file.

PrettyGCode: This is a cool plugin. I think it’s still a work in progress, but it adds a 3D GCode viewer, Similar to what you would have in your slicer.

PrinterStats: This plugin keeps track of various statistics for your printer. Things like how many hours were spent printing, the kWh used, and how many prints were successful/failed.

PrintJobHistory: This keeps a log of every print job. Useful if you wanted to know the last time you printed something or how many times a particular print has failed.

PrintTimeGenius: This uses some additional logic to better estimate the amount of time a print will take.

PSU Control: This plugin can control a PSU using either system or GCode commands. In my case, I’m using a GCode command to send a command to the MQTT Publish plugin to turn on or off the smart plug that my printer is plugged into. You should also be able to do this via other smart plug plugins such as TP-Link. You can also have it turn on automatically when certain GCode commands are issued. Here’s the list of commands I have it set for: G0,G1,G2,G3,G10,G11,G28,G29,G32,M104,M106,M109,M140,M190,M80
You will want to make sure that the first command in your start GCode is in that list.

Stateful Sidebar: This plugin remembers which sidebar items are collapsed or expanded. Useful if you find yourself collapsing the same sidebars repeatedly.

Tab Order: This lets you change the order of the tabs. You can also specify icons for the tabs, or hide/customize the label for them.

Telegram Notifications: This plugin lets you receive notifications via Telegram. It can even send you a GIF. And if you want, you can also control the printer by sending commands back to it. You can get a list of print files available, and kick of a print of one of them. I’m a big fan of Telegram. I also use it for Home Assistant, and a few other things. If you don’t use telegram, I highly recommend using .

Temperature Failsafe: This plugin shuts off the heaters if the temperature goes out of range.

Themeify: If you want to make any changes to how OctoPrint looks, this is the way to do it. Because I access OctoPrint through my phone and computer, I had a tough time making it look decent on both. I wanted to have it use up the whole screen on my computer while also being usable on my phone. And I just didn’t like the other plugins that I tried for a mobile interface. After a bunch of trial and error, here are the settings that finally worked. It could probably still be better, but I’m happy with how this turned out.

The ones that are cut off say this:

.octoprint-container
.row-fluid.print-control
.navbar-inner > .container

And it may be tough to see, but some of the selector fields have a period at the beginning. If anyone has better settings than this, and their setup works well on PC and mobile, please let me know.

Other Plugins:

These are plugins that I don’t use at this time, but might be useful for others.

DeleteAfterPrint: I just discovered this one as I was writing this up. Can’t load it right now since I’ve got a print going. But it allows you to move or delete files after you print, or after a certain amount of time. It might help keep things organized.

SmartPlug plugins: The link just goes to the list of OctoPrint plugins. There are a bunch for various smartplugs. I highly recommend using one to kill power to the printer in case of a problem or just to save power when you aren’t using the printer. There are plugins for TP-Link(I’m planning on going this route using their Energy Monitoring Plugs), Philips Hue, Tasmota, Tuya, Wemo, and probably a couple other ones that I’m missing. Be sure to confirm that the smart plug you go with is rated at least to the number of amps as your printer will draw. For example, the Ender 5 is rated for 15 amps. You need to use a smart plug that can do 15 amps or more.

Notifcation plugins: If you don’t go with Telegram, you should look for something that will send you updates on your print jobs. They have PushBullet, Slack, Discord, etc.

Spaghetti Detective: This is a freemium service that analyzes the video from your printer and is able to detect when a print has failed and can automatically pause the print. I haven’t used it, but it’s on my list.

Conclusion

OctoPrint is one of the most useful upgrades for my printer. There have been times when I have printing multiple items when I wasn’t even home. I was able to just push the old print off by moving the hotend, and then starting the next print. It makes the printer much safer to use because you can implement logic to cut power under certain circumstances. You can monitor your job remotely to see if it has gone awry. It is well worth the price of a Pi for the features it brings to a printer.

One Reply to “Setting Up OctoPrint and its Plugins”

Leave a Reply