Open enz1ey opened 2 years ago
No, really. This needs to be a thing. My Prusa definitely does not like being aggressively shut down immediately when the tray is trying to set itself and fans aren't even spun down yet.
For now, I edit /home/pi/oprint/lib/python3.7/site-packages/octoprint_TpLinkAutoShutdown/init.py
added "import time" at the top
Add the following sleep statement:
if event == "PrintDone":
time.sleep(10)
self.plugHandler()
SO much better experience!
Just wanted to make a suggestion, I think adding a customizable/optional delay for auto shutdown would be useful. I have some cooling fans connected to my printer's PSU with a relay so they are triggered when a print completes and run for ten minutes to cool the bed down quicker. Obviously, when my TPLink plug is turned off upon print completion, the fan shuts off as well.