With only three weeks left in the term, and I am finally confident that we will be able to finish the plugin that we have been wrestling with. Yesterday we had a major breakthrough, WE WERE ABLE TO GET THE STATUS OF THE PRINTER VIA OUR PLUGIN. It was extremely satisfying.

This entire semester we have thought that we could not use the octoprint.printer library because we thought that all of the functions raised “NotImplemented Error”s (we thought this because it says it in github). However, yesterday Dawn found where someone had used some of the functions and it seemed to be working correctly. We then imported the library and tried out the is_printing() method, and IT WORKED. We tried it when we were unconnected to the printer, and it returned False. We tried it in the middle of a print, and it returned True.

The most exciting part of all is that the rest of the functions that we need in order to set the temperature are also in this library. This means that we have access to everything that we need in order to finish our plugin. What we have so far consists of :

  • the Timer() function that gets called after startup
  • when the Timer() function is up, the is_printing() function is called

I know that this seems like a petty amount compared to how long that e have been working on it, but it is actually a milestone for us. We have had to really understand the code in order to get this far. We have also learned a ton, and everything that we have implemented so far works. What we have left to do:

  • Hook the timer() function up to the amount entered by the user
  • Call it when they enter an amount rather than after server startup
  • When we get the printer state handle it appropriately:
    • If it is printing, reset the timer
    • If it is not, kill the temperature

This is the most exciting post that I have been able to write all semester, believe it or not (because there is hope on the horizon).