kurtnelle
Posts: 21
Joined: Mon Jan 15, 2018 4:38 pm

Re: Send GCode Directly to OctoPrint

Wed Jan 02, 2019 5:25 pm

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.

Menissalt
Posts: 30
Joined: Fri Jul 03, 2015 4:39 am

Re: Send GCode Directly to OctoPrint

Thu Jan 24, 2019 1:37 pm

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

kurtnelle
Posts: 21
Joined: Mon Jan 15, 2018 4:38 pm

Re: Send GCode Directly to OctoPrint

Thu Jan 24, 2019 3:07 pm

@ Menissalt, noted.

Sour_Pickel
Posts: 2
Joined: Mon Jan 14, 2019 11:24 pm

Re: Send GCode Directly to OctoPrint

Sat Feb 02, 2019 10:44 pm

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]

ESS-Cr10s-fan
Posts: 3
Joined: Mon Feb 04, 2019 3:01 pm

Re: Send GCode Directly to OctoPrint

Mon Feb 04, 2019 3:05 pm

This would be a nice feature.

jaymcd
Posts: 2
Joined: Wed Apr 26, 2017 11:05 am

Re: Send GCode Directly to OctoPrint

Mon Feb 04, 2019 5:46 pm

Kurtnell - Did you get a chance to post your code - Many would love this feature!

kurtnelle
Posts: 21
Joined: Mon Jan 15, 2018 4:38 pm

Re: Send GCode Directly to OctoPrint

Tue Feb 05, 2019 9:34 am

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.

kurtnelle
Posts: 21
Joined: Mon Jan 15, 2018 4:38 pm

Re: Send GCode Directly to OctoPrint

Fri Feb 15, 2019 12:31 am

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 57 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"

David_Quick
Posts: 3
Joined: Tue Feb 12, 2019 9:14 pm

Re: Send GCode Directly to OctoPrint

Mon Feb 18, 2019 11:37 pm

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.

Royce
Posts: 8
Joined: Wed Aug 23, 2017 4:33 am

Re: Send GCode Directly to OctoPrint

Tue Feb 19, 2019 8:53 am

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

Return to “Feature Requests”