#Possible states of print_stats in moonraker API

25 messages · Page 1 of 1 (latest)

young pollen
#

I am wondering what could be the the possible values of /printer/objects/query?print_stats in ['result']['status']['print_stats']['state'].

According to the documentation:
https://moonraker.readthedocs.io/en/stable/printer_objects/#print_stats
"states" can only be :
"standby"
"printing"
"paused"
"complete"
"cancelled"
"error"

On the internet I also found the additional states:
"pausing"
"cancelling"
"resuming

Are the last 3 states (still) valid or have they ever been?
On my tests I could not bring the states to those values on moonraker 0.9.1.0

Thanks for you help 🙂

random flameBOT
#

Ahoi @young pollen!
It looks like you did not provide all the necessary information we need to help you.
Please upload your logfiles and a detailed description of your problem.
For further information see: https://docs.mainsail.xyz/faq/getting-help/discord#provide-information
Note: We only accept .log and .txt files as log files.
This is an automated message

We are glad to help and chat with you on our Community Discord, but if you need help and want the best support possible you should, follow a few simple rules:

last plover
#

Those are no all state, but in that file the method occurs a few times

#

Herer the sp_state

#

I at least assume that those are the states, but I'm just speculating right now, as I'm not 100% familiar with the Moonraker code

#

For me it looks like the standby state is operational

young pollen
#

It sounds like you were telling me to search better, but I promise I did my best ❤️
I am also not 100% familar with Moonraker as you saw and did check the docs plus more to find those "3 hidden ones" (pausing, cancelling and resuming).

Searching is not complicated, you are right.
But knowing what is right and the current status is hard if the docs are not up to date and complete.
The docs seem to be outdated for me as I found 3 more states and you found the additional states "offline" and "operational".
But you didnt find the "standby" state which is definitely the current state that my printer is giving me when idle.

So I am still confused what are possible correct states 😦

last plover
#

But you didnt find the "standby" state which is definitely the current state that my printer is giving me when idle.
Like I wrote, that's the operational state

#

So that's not the complete correct point in the code, but I cannot research it right now. I recommend to look at the code that I sent, as a starting point. As that code seems to be for the event state_change

#

Also it's the simplyprint code 🤦

#

So nvm what I wrote

#

The docs are most likely correct, if you can only produce those states stated there

next sundial
#

pay attension, that all /printer/objects/query?... states a are from klipper. so i would check the klipper code for that

#

the name behind the ? is the /klipper/klippy/extras/xxx module

#

but if you follow the file print_stats.py, the following outputs should be possible:

  • printing
  • error
  • paused
  • complete
  • cancelled
next sundial
young pollen
young pollen
young pollen
#

still very confusing that there is no lookup for that but you have to download the whole source and digg into it to find these values.

so what I was getting are the klipper states for the printer and for the server - but all coming from klipper instead of moonraker?

next sundial