Is there a programatic way get all possible printer states?

My plugin triggers different light signals depending on the printers status e.g White light on when connected, dimmed while printing, green on print complete etc.

I am adding a feature to allow users to add additional signals for any other state they are interested in. It would make the users life easier if i could present them with a select box instead of requiring them to look it up then type it. I'd also like to avoid, if possible, hardcoding the possible states manually from the list in the documentation.

So as per the title, is there a way to pull a list of available printer states programatically?

No, currently there is no such thing. There never was a need for it so far, the documentation has always sufficed.

Hi @foosel,

Thanks for the speedy reply.

Not a problem. For the time being I'll just link to the appropriate docs in my plugins readme.

Out of curiosity, could you point me in the direction of the code that sends the statuses to the Event Handler (if that make sense)?

That would be here:

and here:

Awesome, thanks.
Once I finish this feature I'll start getting my head around the event handling.

Thanks again for the speedy help, feel free to consider all my questions as resolved.

1 Like