pgoth
Posts: 5
Joined: Mon Feb 29, 2016 6:47 am

Re: Send GCode Directly to OctoPrint

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"
symekutz
Posts: 3
Joined: Thu Apr 28, 2016 9:34 pm

Re: Send GCode Directly to OctoPrint

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!!!
dklassen
Posts: 25
Joined: Fri Jul 04, 2014 11:12 am

Re: Send GCode Directly to OctoPrint

Is there an easy way to do this on a Windows 10 machine?
pgoth
Posts: 5
Joined: Mon Feb 29, 2016 6:47 am

Re: Send GCode Directly to OctoPrint

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"
kmbecker13
Posts: 1
Joined: Tue Jul 05, 2016 4:55 pm

Re: Send GCode Directly to OctoPrint

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!!
ovidiu
Posts: 34
Joined: Mon Aug 17, 2015 3:58 am

Re: Send GCode Directly to OctoPrint

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.
webdad
Posts: 38
Joined: Fri Mar 18, 2016 7:18 am

Re: Send GCode Directly to OctoPrint

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?
ovidiu
Posts: 34
Joined: Mon Aug 17, 2015 3:58 am

Re: Send GCode Directly to OctoPrint

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"
webdad
Posts: 38
Joined: Fri Mar 18, 2016 7:18 am

Re: Send GCode Directly to OctoPrint

ahhh. Thanks! let me give that a shot.
akegata@gmail.com
Posts: 9
Joined: Tue Apr 05, 2016 6:09 pm

Re: Send GCode Directly to OctoPrint

+1

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

Return to “Feature Requests”