Over the past two days, the timer has come to fruition. It is basically a small python script that allows a user to enter a time, and it creates a countdown for them. Right now when the time is up, it just prints that it is checking the printer state (but it isn’t actually checking the printer state). There are several things that we need to do to the timer before implementing our next steps.

Above I mentioned that the script creates a countdown timer. It prints the time in minutes and seconds left to the screen upon server startup. However, the annoying thing is that it prints each countdown on a new line. I want it to print each updated time on the same line (overwriting the old time that was on that line). I have found a way to do this using the sys library in python. It basically clears the line and puts your cursor on that line. The problem is that it works when I run it alone. However, when I run OctoPrint, it doesn’t print anything at all. It still pauses for the amount of time, but the line that it is printing remains blank. I believe that this is because it is immediately clearing what it prints and not actually delaying for one second. However, it is very baffling because it works as a standalone script, just not when implemented with OctoPrint.


 

The Next Steps for the timer:

  • Instead of allowing the user to enter a time, to set it to the time entered in OctoPrint.
  • Instead of starting the timer immediately upon server startup, wait until the user sets the time in settings.
  • Once the timer is up actually grab the printing status and proceed from there.