3
$\begingroup$
What I saw

Last night, I sliced a Califlower in Cura, used the "Send to OctoPrint" option to send it to the printer via the OctoPrint Connection plugin (the standard Cura OctoPrint plugin at v3.7.3), made sure the first layer printed fine, and then put my PC to sleep.

That's when I noticed the print had stopped.

What I expected to see

I expected the print to carry on in the background, as I thought the print had already been sent to the OctoPrint 'server'.

It seems that rather than Cura uploading the G-code to OctoPrint (running on a Raspberry Pi 5, plugged into the printer via USB) telling it to print and then just monitoring progress, it streams the whole G-code in real time, using OctoPrint as a glorified network attached USB serial port, which rather defeats the purpose of having a print 'server' at all.

What I tried

I tried setting the option to "Store G-code on the SD card of the printer", but the Note: wasn't kidding when it said this would take a long time. Since there was no option to cancel, I ended up restarting OctoPrint, forcing a disconnect.

What I want to understand

Is there any way to get Cura to upload the G-code to OctoPrint and then tell it to print rather than stream it to the printer?

I would prefer my power efficient Raspberry Pi pushing G-code commands to the printer for hours, not my power hungry gaming PC.


† Specifically a Raspberry Pi 5, running Raspberry Pi OS the from 2023-13-05 Image, fully `apt` upgraded, and running OctoPrint 1.9.3, installed using the recommended `octoprint_deploy` script.

‡ When I send a 50 page document to my networked HP printer, I don't expect that to stop printing after I put my PC to sleep either!

$\endgroup$
13
  • $\begingroup$ Searching for an answer to this question, I found, 3dprinting.stackexchange.com/q/15935/63 but while the question was alluding to this question, the answers were answered it directly, missing the obvious frame challenge. This question aims to be a practical, answerable equivalent of that arguably Opinion Based question. $\endgroup$
    – Mark Booth
    Commented Jan 29 at 12:32
  • 1
    $\begingroup$ Where is Octoprint running? It needs to be on the device that will remain on and connected to the printer (in your case that sounds like the RPi), not on your gaming PC. The whole point of it having a web UI is that you can access it from your PC while it runs on a more appropriate device that remains online and dedicated to a particular role. $\endgroup$ Commented Jan 29 at 17:33
  • $\begingroup$ Sorry @R..GitHubSTOPHELPINGICE, I thought that it was obvious that Octoprint was running on a Pi attached to the printer, but I've updated my question to make that clear. $\endgroup$
    – Mark Booth
    Commented Jan 29 at 19:44
  • 1
    $\begingroup$ @MarkBooth Good you made that clear it was running on a RPi, I really thought to read in between the lines you ran it from the PC... My bad. I now fully understand the question. $\endgroup$
    – 0scar
    Commented Jan 29 at 21:32
  • 1
    $\begingroup$ OctoPi is a distribution image @BobOrtiz, an old version of Raspberry Pi OS with OctoPrint pre-installed on it, it's not a generic name for any OctoPrint instance installed on a Raspberry Pi. I'm running a Raspberry Pi 5, which isn't supported by OctoPi, which is why it is no longer listed as an option in the Raspberry Pi Imager, for the Pi 5. As recommended, I installed up to date Raspberry Pi OS, then used octoprint_deploy on that. $\endgroup$
    – Mark Booth
    Commented Jan 29 at 22:10

2 Answers 2

7
$\begingroup$

The answer turned out to be to update Cura to the latest version.

Why does the Cura version matter?

Older versions of Cura (some time before v5.6.0) would stream commands to the OctoPrint Connection plugin rather than upload the G-Code to OctoPrint and let it stream the commands to the printer.

This is probably because OctoPrint Connection started out as a fork of UM3NetworkPrinting plugin which provided the Cura interface to UM3 networked printers, so inherited that heritage.

Because it was Cura itself that was streaming the commands, if the machine running Cura was put to sleep, it would stop streaming those commands. With the latest version of Cura, it behaves as you would expect. It uploads the G-Code to OctoPrint (not the printer, which would be very slow) and then lets OctoPrint stream the commands to the printer, so if the PC running Cura goes to sleep, the Raspberry Pi running OctoPrint keeps sending the commands to the printer.

Alternative solution

If you cannot upgrade your Cura version, for some reason, there appear to be several other options which could work.

Export & Upload the G-code file to OctoPrint

Export the G-code in Cura to a file and upload the file to the Web-UI of OctoPrint, it's then fully stored on the storage of OctoPrint. There you can then select the file and start the print.

Watch a folder on my NAS

If you have network attached storage, you could save files into a network share, then mount that folder on the OctoPrint Raspberry Pi as it's watched folder, as detailed in Network Mounting OctoPrint Data from a NAS, then monitor progress on the OctoPrint web interface rather than in Cura.

Switch to another slicer.

Another option is to switch to another slicer. It looks like the OctoPrint integration in other slicers support print once uploaded too. Looking at PrusaSlicer & OctoPrint: How to Use Them Together, I can see one of the steps is to check the "Start printing after upload" checkbox, but I haven't tested this yet.

$\endgroup$
5
  • $\begingroup$ Thanks for the updates, great answer. Please remember to accept your solution as the answer to the question! $\endgroup$
    – 0scar
    Commented Feb 6 at 13:50
  • $\begingroup$ I'm generally uncomfortable with accepting a self-answer @0scar, but since you asked nicely. $\endgroup$
    – Mark Booth
    Commented Mar 11 at 12:05
  • 3
    $\begingroup$ You really shouldn't be uncomfortable! Even SE endorses self answered questions! Sharing knowledge and experience is very important, it may help others. Even you got inspired by an answer that did not answer the question! $\endgroup$
    – 0scar
    Commented Mar 11 at 13:08
  • $\begingroup$ It's amusing how often the solution to 3D printing problems is just "Don't use Cura, it's 2024". $\endgroup$
    – towe
    Commented Mar 11 at 14:43
  • $\begingroup$ Thanks @Oscar but I generally feel the community is best placed to indicate a 'correct' answer than the question asker, and acceptance is far more valuable when it isn't a self-answer anyway. $\endgroup$
    – Mark Booth
    Commented Mar 11 at 19:09
-2
$\begingroup$

The obvious, a bit expensive but probably best and most common solution is to use Octopi. (it's so common it took me a while to realize you're running Octoprint from a PC!)

You get a Raspberry Pi 3b, or 4, or any of a large number of cheaper and more available alternatives (I personally use Orange Pi zero 2) - then you install Linux with Octoprint on it. You power it up from the printer's power through some sort of regulator, connect the printer with it over a stub of USB cable, and connect it to your home LAN over Ethernet or Wifi. It's powered on and running while the printer is running. You link up Cura to it to upload gcode to its sd card (over LAN, so very fast) and you control it over web interface. That means the PC can be in another room (with Octoptint page displaying camera view of the print bed on second screen, in case anything goes wrong), you can design and slice your projects in silence and shut down your PC when you're done, while the small Pi works overnight feeding the printer gcode over its USB connection.

Configuration:

  • From Cura Marketplace install Octoprint Connection.

enter image description here

  • in Octoprint: wrench icon, Features > Application Keys
  • Generate key, name: cura.

enter image description here

  • In Cura, Setings, printer, manage printers, select the printer, 'Connect Octoprint'.

enter image description here

  • Select the Octopi from list, paste the application key in the key field.

enter image description here

From then on the PC is connected to Octopi over the net, so the transmission between the two is vastly faster than over serial, and after slicing you get the drop-down option "Print with Octoprint" besides "Save to disk". Selecting "Print with Octoprint" allows you to type in the directory on Pi, edit the file name, and pick whether to select and start the print immediately - without that it will just be placed in the storage medium of the Octoprint device, to be started from Octoprint at a later time.

enter image description here

$\endgroup$
4
  • 5
    $\begingroup$ No he has a Raspberry Pi that runs OctoPrint, the problem is that OctoPrint is used through Cura, if so then when you shut down the PC, the print stops. So although it appears he is using OctoPrint, the instructions are send by Cura, so, when you shutdown the PC the instructions stop being sent and the print stops. $\endgroup$
    – 0scar
    Commented Jan 30 at 12:24
  • $\begingroup$ @MarkBooth In my case "Send to Octoprint" takes maybe 5 seconds to complete, so you'd have to really speedrun putting your PC to sleep while it's still in progress. $\endgroup$
    – SF.
    Commented Jan 31 at 7:54
  • $\begingroup$ @MarkBooth I sent the overnight print to the printer, watched the first layer, closed Cura, shut down the PC completely, went home, and in the morning came back to completed print with the PC dark and silent. $\endgroup$
    – SF.
    Commented Feb 1 at 6:47
  • 1
    $\begingroup$ Ok, so it turns out this is a Cura version issue. Without changing the "OctoPrint Connection" plugin, updating Cura made my "Connect OctoPrint" configuration dialogue look like yours, with the option to select "Start print job after uploading" now being present, so the plugin itself must have different behaviour depending on the version of Cura it is running under. Thanks, your answer may not have answered my question, but the differences between your screenshots and what I was seeing, did help me find the answer. $\endgroup$
    – Mark Booth
    Commented Feb 5 at 16:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .