Is there a api or somewhat that can recieve a file and start printing it ?
What I mean is that I have a queue system on another system and I would like to just press a button in that system to upload and start printing. Is this possible or do I need to develop a plugin for this first?
It doesn't necessarily have to be a plugin. At least two of the smartphone-related apps do this, as does the Cura plugin or other slicers' versions of same.
You can also use the search feature here on the forum, for example: push curl api
As an example, with Slic3r you can "send to server" (eg octoprint) and check a box to start the print. True in Slic3r and Slic3r PE. It uses the octoprint API to do so. (while uploading, setting print=true
)
It's hard to tell what exactly you are after.. a slicer that does this, or you want to do it from a computer that already has gcode, or.. I don't know.
1 Like
What I would like to do is collect a queue of prints on a webpage so I can send the gcode from that webpage
You can send files to octoprint using curl
curl -k -H "X-Api-Key: yourkeyhere" -F "select=false" -F "print=false" -F "file=file/path/here" "http://octopi.local/api/files/local"
How you collect and store the gcodes on your web page and its server is up to you. You can replace the select with true, and print with true and it'll automatically select and start printing, but be damn sure 100% the bed is clear and the printer is ready to print if you're going to that level of automation.
Is there a way to do this in a C program? (without just running the curl command)
Sure, how about libCurl? Or any other lib that will let you make http requests.