I searched around a bit and although there are some MQTT plugins, I didn't find anything like what I'm thinking here. Pretty much all I found was related to controlling or monitoring OctoPrint using MQTT.
The Marlin firmware, and I assume OctoPrint, have safeties built in to detect and stop thermal runaway, such as say the temp sensor falls away from the bed or fails - this way it doesn't keep the heater cranked to the max trying to hit its target, but it'll never know that it reached and passed it and is now running away because the sensor has fallen away or failed, so obviously, if the firmware is commanding heat and it's not seeing the temp increase like it should, out of safety, it assumes something's gone wrong and it'll shut down.
This is great for cases like that, but where no firmware solution can help directly is if a MOSFET or TRIAC were to fail closed, which I gather they often do when they fail. The problem is in that case, there's nothing the firmware can do to stop it. It can command the heat off (or just plain halt the controller, effectively shutting it all down), but if the MOSFET or TRIAC is melted closed, it'll never shut off - You need to remove the power.
Enter my thought. I have a ZWave network set up in my home and I run my printer through a ZWave switch so that when I run out while a print is running, I can jump in and check on it from time to time, and if I see something's gone sideways, I can cut power to the printer remotely. But obviously, I can't be watching all the time.
So what I'm thinking is a plugin that can send MQTT messages based on defined parameters - such as the bed temperature has hit 150c (In my case, there's no reason it would ever need to get over 100c, so if it does, there's a problem). This way I could configure it so that in the event of a problem like the bed or hot end reaching a temp well above what it should, it'll send a MQTT message to my home automation controller to cut power to the printer.
Does anyone have any thoughts on that? Is there anyone that might be able to create such a thing?