Jump to content
Ultimaker Community of 3D Printing Experts
andin

Connect to Octoprint from Cura

Recommended Posts

Hi,

OctoPrint allows wireless/LAN based control over the 3Dprinter. Cura is an STL-file processing/slicing software. However, as far as I understand Cura cannot communicate to OctoPrint.

I wonder if it will be possible in the near future to upload GCODE generated on Cura to the Octoprint server running on the RPi directly from the Cura's (amazing) GUI?

This would remove all the limitations of USB and enable WiFi printing directly from Cura - this would be truly awesome...

 

Share this post


Link to post
Share on other sites
Keep in mind though that the API is still in the process of being fleshed out and thus things might change there until further notice!

 

That's a bit scary. There is also the "current" and "develment" api which are vastly different...

Still, would be possible to implement, with the doodle3d as example:

https://github.com/daid/Cura/blob/SteamEngine/Cura/util/printerConnection/doodle3dConnect.py

Discovery would be indeed an issue. But could be solved with:

http://en.wikipedia.org/wiki/Simple_Service_Discovery_Protocol

 

Share this post


Link to post
Share on other sites

Isn't this already possible with octoprint? (I should test it tonight if i have time)

You can upload gcode directly via the web interface (even directly to the printer SD) from what i saw on the website

 

Yes, but the idea proposed here, is to have a button in Cura to upload&start the print, so you do not need to go to the webinterface.

 

Share this post


Link to post
Share on other sites

I know this thread is a little old, but I found it in the process of determining that noone has created an integration of this sort.

So I made one, because while we geeks are lazy, we are quite willing to spend many hours coding something that will save us 30 seconds doing a repetative task (save gcode, upload, hit print) :)

https://github.com/scotthraban/octoprint-printer-connection-plugin-for-cura

It won't work with the current Cura, as there are a couple of modifications that would need to be made to the Printer Connection and Plugin instantiation code, for which I have created pull requests.

If someone more familiar with Python UI would be willing to offer some help, that would be awesome, currently the plugin requires putting the OctoPrint API Key in the source code, which is, um, sub optimal.

Thanks!

 

Share this post


Link to post
Share on other sites

Keep in mind though that the API is still in the process of being fleshed out and thus things might change there until further notice!

That's a bit scary. There is also the "current" and "develment" api which are vastly different...

Now that Octoprint 1.2 has been released, there is one stable API.

Share this post


Link to post
Share on other sites

Actually you can use the cura engine to slice your model directly on your raspberry pi running octoprint.

 

In my opinion, slicing is better done on the desktop. More control over parameters, and lots more processing power.

I guess it is smarter to wait for Pink Unicorn to try doing a proper "Send to Octoprint" plugin in Cura.

Share this post


Link to post
Share on other sites

Nice!

Creating the octo.gcode tempfile wasn't working for me, so I changed that bit by using the tempfile module to create a file in the temp folder (should work cross-platform). This file is then also cleanly disposed of after sending the file to OctoPrint.

http://f.fld.vu/temp/cura_octoprint_tempfile.patch

One issue is that this implementation locks up the UI thread, so the UI cannot show the progress.

Share this post


Link to post
Share on other sites

For the sake of people finding this thread and wondering about the state of integrating OctoPrint into Cura 2.3 and newer, have a look at this plugin:

https://github.com/fieldofview/OctoPrintPlugin

It features ZeroConf/Bonjour enabled discovery, printing directly from Cura without having to store a gcode file, monitoring the progress, and even a view of the webcam, all nicely integrated into Cura.

  • Like 1

Share this post


Link to post
Share on other sites

For the sake of people finding this thread and wondering about the state of integrating OctoPrint into Cura 2.3 and newer, have a look at this plugin:

https://github.com/fieldofview/OctoPrintPlugin

It features ZeroConf/Bonjour enabled discovery, printing directly from Cura without having to store a gcode file, monitoring the progress, and even a view of the webcam, all nicely integrated into Cura.

 

Nice plugin. I used it successfully in Cura 2.3 release connected to Octoprint and an Ultimaker 2+. Unfortunately, I had to add a new custom Printer with Ultimaker 2+ details to change machine settings to Marlin/RepRap g-code, because the standard printer profile for UM2+ doesn´t seem to allow changes of g-code flavor anymore. I tried to edit/copy json defintions file but failed. Any hint or idea?

Share this post


Link to post
Share on other sites

The only issue I found with this is that the Plugin streams video (if you have a camera attached to your Pi) even if you don't have that window open in Cura.

This really impacts (degrades) network performance with the megabytes of data flowing all the time.

Just an FYI.

Share this post


Link to post
Share on other sites

The only issue I found with this is that the Plugin streams video (if you have a camera attached to your Pi) even if you don't have that window open in Cura.

 

Yeah, that's true. Same thing for the UM3 though (Fun fact: the UM3 uses the same software for streaming the camera image. Another fun fact: the OctoPrint plugin is a fork of the UM3NetworkPrinting plugin).

Streaming stops when you switch to another printer though.

 

This really impacts (degrades) network performance with the megabytes of data flowing all the time.

 

Serious question: is it really impacting network performance? I would say that (on an internal network), it should be hardly noticable; it's not *that* much data.

Unfortunately the plugin currently can't tell if you are looking at the monitor tab or not. I would rather not implement a hack in the OctoPrintPlugin for something that really needs to be fixed in Cura itself. As a quick fix I can add an option to not display the video stream (at all) when connecting to OctoPrint.

Note that I have code ready to display the streaming video instead of the current high-speed slide-show, but this issue is the reason I have not merged that yet.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Our picks

    • How to 3D print with reinforced engineering materials
      Ultimaker is hosting a webinar where we explain how you can achieve and maintain a high print success rate using these new reinforced engineering materials. Learn from Ultimaker's Product Manager of Materials and top chemical engineer Bart van As how you can take your 3D printing to that next level.
      • 0 replies
    • "Back To The Future" using Generative Design & Investment Casting
      Designing for light-weight parts is becoming more important, and I’m a firm believer in the need to produce lighter weight, less over-engineered parts for the future. This is for sustainability reasons because we need to be using less raw materials and, in things like transportation, it impacts the energy usage of the product during it’s service life.
        • Like
      • 12 replies
×

Important Information

Welcome to the Ultimaker Community of 3D printing experts. Visit the following links to read more about our Terms of Use or our Privacy Policy. Thank you!