Paused for user status api

Hey Everyone,

Quick question, I've been using the REST api to query octoprint for various states, but I can't find any way of getting the state when an M0 gcode put the printer in to a "echo:busy: paused for user" state. Is there any way anyone knows of a way I can query octoprint for this paused state?

cheers

Does the printer state API not gice you what you expect?

No, octoprint terminal is definitely spitting out the "echo:busy: paused for user" over and over again.

Printer API returns this:

{ "sd":{"ready":true},
"state":{
"flags":
{
"cancelling":false,
"closedOrError":false,
"error":false,
"finishing":false,
"operational":true,
"paused":false,
"pausing":false,
"printing":false,
"ready":true,
"resuming":false,
"sdReady":true
},"text":"Operational"},"temperature":{"bed":{"actual":24.12,"offset":0,"target":0.0},"tool0":{"actual":18.25,"offset":0,"target":0.0}}}

I would have assumed paused would be set to true?

Im running octoprint version Version 1.5.2

Did you move this command from the blocked commands to the pausing commands in OctoPrint's settings?

yep my settings are...

image

Ok so it seems that if the printer is idle "ready" and I call the M0 command, the states dont change and the state remains in ready mode. But If I use the M0 command while printing it gives me a 'pausing' state.

Only other way to pick up the exact line the printer is printing, would be to use the websocket for push (server -> client) communication. Implementing that might be more effort than it's worth. If you've got it figured I wouldn't bother :slightly_smiling_face:

I tested a print with M0 in the end gcode scripts section... this leaves it in the "Finishing" state which I think will be fine for what I'm trying to do.

:+1: thanks for the help