Informational state types


#1

I have a home automation system (Home Assistant) that can read the operational state of Octoprint. This will allow me to control a power switch with will turn off the printer after printing or an error, etc....

My question is, does anyone know what all the condition states octoprint reports. So far I have "Printing" and "Operational" and "Unknown". thx.


#2

Here's the documentation.

And this is the code, jump down to line 660 through 691.


#3

Excellent, that was exactly what I was looking for.

Would , you happen to know what state will be reported in case of a thermal runway?? Im assuming "Error" but I hate to assume. thx!


#4

Never mind, I forced a thermal run away, the octoprint status is "Offline".


#5

Are you getting thermal runaways normally?


#6

No, just thought it would be a great idea to have Home Assistant monitor the printer and turn it off after a print or error. I've figured out how to turn the printer off after printing, but not so much after the printer goes offline. When the printer goes "Offline", Home Assistant shows "Unknown ". Home Assistant also shows "Unknown" sometimes during normal printing, so I can't trigger on that...

It would be great if Octoprint had a built in mqtt client that could send out messages.


#7

Not sure if you could tweak the MGTT Publish one to fulfill your needs.


#8

Looks promising, THX!