Stop printer if temperatue is to hot in eclosure

Hi,

i bought an enclosure and want to stop the printer, if the temperature get's to hot.

I will build a fan controller to keep the temperature at 30 °C. But if the fan get's broken or something else happens i want to stop the printer, if the temperature get's hotter than xxx °C.

I can't find any plugin, that will stop the printer. Does anyone know a solution for that?

I'm using a prusa mk3s. Is there any possibility to stop the printer with the firmware itself?

Thank's for helping

Hello @theblackraven !

Challenging quest - but what has this to do with Docker?

IMHO, I would take one of these (or similar):

sorry, i selected the wrong forum. I already ordered such an device.
But i think, the best way is to stop the printer with octoprint or with the firmware of the printer, and at a higher temperature with the thermostat powerplug.