πŸ‡ΊπŸ‡¦ We stand with Ukraine! πŸ‡ΊπŸ‡¦

How do I start a "currently selected file" print job from command line / terminal window? (Using Prusa MK3S)

What is the problem?

I need to know how to start a print job from command line
So to sum up the question: is it possible to launch a print job from the Terminal window? I guess NO?

What did you already try to solve it?

CHECKED all known documentation and Prusa Support.

Have you tried running in safe mode?

N/A

Did running in safe mode solve the problem?

N/A

Systeminfo Bundle

You can download this in OctoPrint's System Information dialog ... no bundle, no support!)

N/A

Additional information about your setup

OctoPrint version, OctoPi version, printer, firmware, browser, operating system, ... as much data as possible

  • OctoPrint 1.8.1
  • Python 3.7.3
  • OctoPi 0.18.0

Also why are there @ commands like pause, resume, etc but NO start command?!
https://docs.octoprint.org/en/master/features/atcommands.html

The @ commands are in the gcode file so a start command doesn't make sense because the file must be started for the @ commands to be interpreted. I think what you are looking for is the REST API.

It would help if you could describe the problem you are trying to solve in a little more detail.

Sure!

I use Octodash as GUI for a touch screen running with the Pi, but Oxtodash still has no START A PRINT command unless you manually scroll all the files and select one, then click PRINT icon.

Sometimes, since I'm on a farm, it's easier to choose each file on my computer browser and then just go and hit print on the Octodash screen. So the closest I get is creating an icon on Octodash, but then.... How do I tell it to start the print of the currently selected file?

You may consider to use this:

https://octofarm.net/

1 Like

Yes but thats from the global POV. Im talking of ocasional LOCAL control...

If you mean from the device that OctoPrint is installed to you could do:

$ octoprint client -a APIKEY post_json /api/job '{"command":"start"}'

octoprint would need to be the path of the octoprint script, or you need to activate the appropriate venv first, and APIKEY is an appropriate api key (OctoPrint settings -> Application Keys).

You could also do this from any device that can access the OctoPrint server via HTTP with something like curl. Such as:

$ curl -X POST -H 'X-Api-Key: APIKEY' -H 'Content-Type: application/json' -d '{"command":"start"}' http://octopi.local/api/job

Where http://octopi.local is the appropriate base URL to your OctoPrint.

1 Like

Thanks on that. I'm not sure how much scripting does Octodash allow.... Will have to check with them.

Thanks!

So to sum up the question: is it possible to launch a print job from the Terminal TAB window? I guess NO?

You were given a solution to start a print from the terminal here:

From OCTOPRINT terminal tab... sorry.

The Octoprint terminal just connects your printer. It's not a Linux command line and doesn't communicate with the OS.

1 Like

Yeah I assumed that. Was just willing to find out if the print job could be launched somehow from there as Octodash allows to customize buttons and actions but there's no such action "Start".

Thanks though.

You may start a feature request here:

Just curious, I don't use OctoDash. Can't you start a print with the printer icon

grafik

Not sure if that's on bigger displays, I'm on 3.5" and the icon is not there.

This is intriguing indeed...

According to https://github.com/UnchartedBull/OctoDash/wiki/System-Requirements you need a screen bigger than 3.5" (5"-7" recommended). This might explain the layout issue.

Agreed. But there's hope to get the print icon in! :stuck_out_tongue_closed_eyes:

Thanks