Page 4 of 11

Re: Send GCode Directly to OctoPrint

Posted: Tue Sep 06, 2016 9:28 pm
by CTGreybeard
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 :?:

Re: Send GCode Directly to OctoPrint

Posted: Mon Sep 12, 2016 5:01 pm
by saintgimp
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.

Re: Send GCode Directly to OctoPrint

Posted: Wed Sep 28, 2016 5:00 pm
by gruvin
[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]

Re: Send GCode Directly to OctoPrint

Posted: Fri Sep 30, 2016 9:39 am
by dorsai3d
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.

Re: Send GCode Directly to OctoPrint

Posted: Thu Oct 06, 2016 12:51 am
by centenary
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.

Re: Send GCode Directly to OctoPrint

Posted: Sun Oct 16, 2016 2:57 am
by Talons-3D
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.

Re: Send GCode Directly to OctoPrint

Posted: Mon Oct 24, 2016 10:34 pm
by EberleG
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.

Re: Send GCode Directly to OctoPrint

Posted: Sat Oct 29, 2016 9:58 pm
by arhi
++ for seamless integration from s3d and direct control of the octoprint

@pgoth thanks for the workaround :)

Re: Send GCode Directly to OctoPrint

Posted: Mon Oct 31, 2016 10:21 am
by dorsai3d
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"}

Re: Send GCode Directly to OctoPrint

Posted: Mon Nov 21, 2016 3:57 am
by bpopp
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