CTGreybeard
Posts: 8
Joined: Sun Dec 20, 2015 8:22 pm

Re: Send GCode Directly to OctoPrint

Hmmm, I just got to thinking :idea: that on a Mac you can set Folder Actions. An the action code be to scp the file to the OctoPrint server. That way you just save the gcode to that folder on your Mac and it automagically goes to the server.

I'll work on it .... Anyone interested :?:
saintgimp
Posts: 2
Joined: Mon Sep 12, 2016 4:59 pm

Re: Send GCode Directly to OctoPrint

I would also like this feature to be built in to Simplify3D. I imagine they could build it as a generic "send to print service" button with a built-in script for Octoprint and the ability to provide a custom script for other services.
gruvin
Posts: 8
Joined: Thu Aug 18, 2016 7:50 pm

Re: Send GCode Directly to OctoPrint

[rant]
Blows me away how someone can ask for a feature and a dozen or more people pop in with nonsense about how, "[you don't need it]". Folks ... if we didn't want it, we wouldn't freaking ask for it. In Slic3r for example, I click ONE BUTTON -- not even Prepare to Print then one button, then enter a name, then click save then ... *yawn* ... just ONE click -- and OctoPrint is ready to rock and roll. All this, save here, drag their, ssh and run a script (seriously?) stuff is THE WHOLE POINT. We don't want to do that. It's annoying, boring and tedious.
[/rant]
dorsai3d
Posts: 237
Joined: Mon Jan 11, 2016 9:01 am

Re: Send GCode Directly to OctoPrint

gruvin wrote:[rant]
Blows me away how someone can ask for a feature and a dozen or more people pop in with nonsense about how, "[you don't need it]". Folks ... if we didn't want it, we wouldn't freaking ask for it. In Slic3r for example, I click ONE BUTTON -- not even Prepare to Print then one button, then enter a name, then click save then ... *yawn* ... just ONE click -- and OctoPrint is ready to rock and roll. All this, save here, drag their, ssh and run a script (seriously?) stuff is THE WHOLE POINT. We don't want to do that. It's annoying, boring and tedious.
[/rant]
Err... people here are trying to give a solution that works *now* rather than sitting around waiting. You can already have it automatically upload when you save the file - no extra steps needed once you have it set up. And the setup is easy, just one line in your postprocessing commands:
pgoth wrote:I've solved it fairly easy.. I'm running on S3D on a Mac and I am just calling a curl command as follows:

Code: Select all

curl -H "X-Api-Key: 185A556C8F684E20AAB85F2D867F2791" -F "select=false" -F "print=false" -F "file=@[output_filepath]" "http://192.168.2.197/api/files/local"
Replace with your own OctoPrint API-key and hostname/IP-address and when you click on the "Save toolpaths to Disk" button it will send the gcode to OctoPrint.
centenary
Posts: 2
Joined: Thu Oct 06, 2016 12:43 am

Re: Send GCode Directly to OctoPrint

pgoth wrote:I've solved it fairly easy.. I'm running on S3D on a Mac and I am just calling a curl command as follows:

Code: Select all

curl -H "X-Api-Key: 185A556C8F684E20AAB85F2D867F2791" -F "select=false" -F "print=false" -F "file=@[output_filepath]" "http://192.168.2.197/api/files/local"
Replace with your own OctoPrint API-key and hostname/IP-address and when you click on the "Save toolpaths to Disk" button it will send the gcode to OctoPrint.
I've discovered a possible security issue that people should be aware of. When you use this approach to make Simplify3D send gcode files to OctoPrint, Simplify3D will embed your API key within gcode files underneath the "postProcessing" line.

Anyone with access to the OctoPrint instance can freely download the gcode file, even without logging into OctoPrint. This means that anyone with access to the OctoPrint instance can gain access to your API key. This will then give them full control over the OctoPrint instance, which can allow for malicious actions to be taken.

For most people, this won't be an issue since they keep OctoPrint isolated to their home network. But if anyone has an OctoPrint instance publicly exposed (i.e. to others on the network, to the Internet), this is something you should be aware of.
User avatar
Talons-3D
Posts: 2
Joined: Sat Oct 15, 2016 10:27 pm

Re: Send GCode Directly to OctoPrint

Until a week or so ago I would just upload the gcode that S3D would output to my OctoPi and it worked great.
An automated and would be great.
Now though I'm back to SD card printing because a week or so ago the prints sent to the OctoPi fail.
The x3g file that is generated works fine from the SD card.

I would think a direct to OctoPi would help stop issues like this from happening.

I would like this feature as well added to S3D.
EberleG
Posts: 3
Joined: Mon Oct 24, 2016 10:29 pm

Re: Send GCode Directly to OctoPrint

I'm a long time user of Repetier server - host - informer. I'd like to switch over to Symplyfy 3D, but until it has a similar workflow (via OctoPi), I'm sticking the ease of Repetier. +1 for development in direct server control via OctoPrint.
arhi
Posts: 483
Joined: Thu Oct 06, 2016 5:13 pm

Re: Send GCode Directly to OctoPrint

++ for seamless integration from s3d and direct control of the octoprint

@pgoth thanks for the workaround :)
gcodestat integrates with Simplify3D and allow you to
Calculate print time accurately (acceleration, max speed, junction deviation all taken into consideration)
Embed M117 codes into G-Code
Upload your G-Code directly to Octoprint
open source and unlicence
dorsai3d
Posts: 237
Joined: Mon Jan 11, 2016 9:01 am

Re: Send GCode Directly to OctoPrint

centenary wrote:I've discovered a possible security issue that people should be aware of. When you use this approach to make Simplify3D send gcode files to OctoPrint, Simplify3D will embed your API key within gcode files underneath the "postProcessing" line.

Anyone with access to the OctoPrint instance can freely download the gcode file, even without logging into OctoPrint. This means that anyone with access to the OctoPrint instance can gain access to your API key. This will then give them full control over the OctoPrint instance, which can allow for malicious actions to be taken.

For most people, this won't be an issue since they keep OctoPrint isolated to their home network. But if anyone has an OctoPrint instance publicly exposed (i.e. to others on the network, to the Internet), this is something you should be aware of.
That's a good one to be aware of. Octoprint definitely isn't designed with security in mind (it's really just supposed to be local net only), but that is a pretty glaring hole. Fortunately there's an easy fix for the gcode files. Add the following to your postprocessing:

{STRIP "; postProcessing"}
bpopp
Posts: 3
Joined: Mon Nov 21, 2016 3:47 am

Re: Send GCode Directly to OctoPrint

For those of you on Windows, I just built a small background application for uploading gcode and stl files from a local folder to an Octoprint server (via REST). Once configured, it watches for changes to the folder and automatically uploads any added files. Seems to be working well for me, but your mileage may vary. Would love to hear feedback at bpopp [at] bpopp [dot] net (or github) if anyone tries it out:

https://github.com/bpopp/OctoprintUploader/releases

Return to “Feature Requests”