Page 10 of 11

Re: Send GCode Directly to OctoPrint

Posted: Wed Jan 02, 2019 5:25 pm
by kurtnelle
rodrigomes wrote:
Wed Jan 02, 2019 3:23 pm
kurtnelle wrote:
Fri Jan 26, 2018 12:39 pm
Is there any ability or feature request that currently exists, that will address the issue of being able to send directly to octo print or some other default file system (network or other wise) location?

Edit: Nvmd, I wrote code and solved my problem. Now I can Right click "Print via OctoPrint"
How did you do that, my friend? Could you share the code?
If I have time, I'll try to share it on GitHub... Stay Tooned.

Re: Send GCode Directly to OctoPrint

Posted: Thu Jan 24, 2019 1:37 pm
by Menissalt
kurtnelle wrote:
Wed Jan 02, 2019 5:25 pm
If I have time, I'll try to share it on GitHub... Stay Tooned.
Following this

Re: Send GCode Directly to OctoPrint

Posted: Thu Jan 24, 2019 3:07 pm
by kurtnelle
@ Menissalt, noted.

Re: Send GCode Directly to OctoPrint

Posted: Sat Feb 02, 2019 10:44 pm
by Sour_Pickel
I know this topic has been going on for ages and some people will have already figured out how to do this. I just wanted to toss in how I do this without revealing my API Key in the gcode since the STRIP command does not work for me on Windows.

I make a bat and place it in C:\Windows\System32. It contains this(Change API Key, IP and Port):
@echo off
curl -k -H "X-Api-Key: APIKEYGOESHERE" -F "select=false" -F "print=false" -F "file=@%1" "http://IP:PORT/api/files/local"


Then in the S3D additional post processing I use this (S3D-FF-Upload.bat is my .bat file in System32):
S3D-FF-Upload.bat [output_filepath]

Re: Send GCode Directly to OctoPrint

Posted: Mon Feb 04, 2019 3:05 pm
by ESS-Cr10s-fan
This would be a nice feature.

Re: Send GCode Directly to OctoPrint

Posted: Mon Feb 04, 2019 5:46 pm
by jaymcd
Kurtnell - Did you get a chance to post your code - Many would love this feature!

Re: Send GCode Directly to OctoPrint

Posted: Tue Feb 05, 2019 9:34 am
by kurtnelle
No I didn't. Actually, I like the aforementioned post processing command as a mono shot solution. I think I'll migrate to doing that; but with a powershell script.

Re: Send GCode Directly to OctoPrint

Posted: Fri Feb 15, 2019 12:31 am
by kurtnelle
So, after some struggling, I managed to create this powershell script that will give users the option to send a .gcode file to octoprint
SendToOctoprint.ps1.txt
(4.77 KiB) Downloaded 71 times
Remove the .txt extension, add your octopi url/ip address and api key. Run it one to setup the registry stuff; it should be run as admin but it will prompt you. Then right click on any .gcode file and "Send to OctoPrint"

Re: Send GCode Directly to OctoPrint

Posted: Mon Feb 18, 2019 11:37 pm
by David_Quick
i have added

curl -k -H "X-Api-Key:<Mykey>" -F "select=false" -F "print=false" -F "file=@[output_filepath]" "https://octopi.local/api/files/local"
{STRIP "; postProcessing"}

to the Additional terminal commands.

When I copy disk the file dialog pops up. Is that normal?
Nothing appears on the octoprint screen.

Suggestions?

Running on El Capitan, that is the newest version this machine will run on.

Re: Send GCode Directly to OctoPrint

Posted: Tue Feb 19, 2019 8:53 am
by Royce
there's no need for a batch or powershell script.
simply put the curl command in the post action section and it will upload the gcode to Octo when hitting save gcode