Page 3 of 11

Re: Send GCode Directly to OctoPrint

Posted: Tue Apr 05, 2016 7:51 am
by pgoth
Hi,
yeah, if you have SSL enabled and required for your OctoPrint server and you are using a self signed/insecure certificate the "-k" parameter is required. Good input

Thanks
pgoth
davidbitton wrote:
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 had a small issue with this (cURL error 55) that I was able to resolve by adding -k and using the https address for OctoPrint. Thanks!

Code: Select all

curl -k -H "X-Api-Key: A5D3DEAF7284412F9563945057BB95F7" -F "select=false" -F "print=false" -F "file=@[output_filepath]" "https://octopi.local/api/files/local"

Re: Send GCode Directly to OctoPrint

Posted: Thu Apr 28, 2016 9:45 pm
by symekutz
I went into the Pi running Octoprint and SMB shared the uploads folder. Then I mounted that fodler on my S3d machine now I can just save tool paths to disk and boom there they are n OctoPrint. Would be nice to be able to auto-magically start prints in Octo right from S3d!!!

Re: Send GCode Directly to OctoPrint

Posted: Sat Apr 30, 2016 7:39 pm
by dklassen
Is there an easy way to do this on a Windows 10 machine?

Re: Send GCode Directly to OctoPrint

Posted: Tue May 03, 2016 4:36 am
by pgoth
dklassen wrote:Is there an easy way to do this on a Windows 10 machine?
Yes, just download curl (small binary) from https://curl.haxx.se/download.html and unzip it. If you are using SSL on the OctoPrint server also download the SSL version that includes the OpenSSL dlls..

Then call the curl command as previously described. Add the path to curl.exe if you haven't placed it in a common library. E.g. c:\temp\curl.exe

If you are using SSL, add the "-k" parameter as the SSL certificate is not a valid one (self signed).

If you want to start the print directly after upload, change to "print=true"

Code: Select all

curl -k "X-Api-Key: A5D3DEAF7284412F9563945057BB95F7" -F "select=false" -F "print=false" -F "file=@[output_filepath]" "https://octopi.local/api/files/local"

Re: Send GCode Directly to OctoPrint

Posted: Tue Jul 05, 2016 5:07 pm
by kmbecker13
I'm having a bit of trouble with this. I've added the curl statement that was posted above into my post-processing section in S3D, but nothing happens with I click save to disk. If i copy and paste the curl statement into CMD (and add the file location) then it works great. Do i need to do anything else to enable to the post-processing in S3D?

Otherwise this seems like an awesome tool!!

Re: Send GCode Directly to OctoPrint

Posted: Wed Jul 06, 2016 9:26 am
by ovidiu
A strange bug that I noticed is that if Simplify3D opens as a result of its file association (click on an stl file in Finder) the post process script does not execute.
Try to close and then normally open the app (it will remember the last stl file it had opened) and regenerate and save to disk.

Hopefully this helps.

Re: Send GCode Directly to OctoPrint

Posted: Fri Aug 26, 2016 9:35 pm
by webdad
I tried this but have not been able to get it to work.

I've been using the below:

curl -k -H "X-Api-Key: aaaaaaaaaaaaaaaaaaaaaa" -F "select=false" -F "print=false" -F "file=test.gcode" "http://xxx.yyy.zzz/api/files/local"

the file in question, test.gcode resides in the directory where I'm running the command.

When I run it from a cmd line on my window box, I get "no file included"

where is the /api/files/local location on the Octopi?

Re: Send GCode Directly to OctoPrint

Posted: Sat Aug 27, 2016 4:17 am
by ovidiu
webdad wrote:I tried this but have not been able to get it to work.

I've been using the below:

curl -k -H "X-Api-Key: aaaaaaaaaaaaaaaaaaaaaa" -F "select=false" -F "print=false" -F "file=test.gcode" "http://xxx.yyy.zzz/api/files/local"

the file in question, test.gcode resides in the directory where I'm running the command.

When I run it from a cmd line on my window box, I get "no file included"

where is the /api/files/local location on the Octopi?
Missing something.... "file=@test.gcode"

Re: Send GCode Directly to OctoPrint

Posted: Sun Aug 28, 2016 2:20 pm
by webdad
ahhh. Thanks! let me give that a shot.

Re: Send GCode Directly to OctoPrint

Posted: Tue Sep 06, 2016 4:40 pm
by akegata@gmail.com
+1

This is the feature I'm missing the most from Simplify3d.