Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Auto reconnect after turning the printer off and on. #1388
What were you doing?
When a print on my Lulzbot Mini is finished I take it off the built plate and turn off the printer. The Raspberry Pi (Running OctoPrint) remains on. If I want to print something new, I turn on the printer, and open OctoPrint in my browser. OctoPrint then still thinks it's connected, but the communication with the printer doesn't work until I click "Disconnect" and reconnect after disconnecting using the "Connect" button.
What did you expect to happen?
I expect OctoPrint to automatically try to reconnect with the printer if it stops responding. As soon as I turn on the printer, the connection should be reestablished.
What happened instead?
OctoPrint says it's connected, but all commands fail. The printer does not respond until reconnecting.
Branch & Commit or Version of OctoPrint
Version: 1.2.13 (master branch)
Printer model & used firmware incl. version
Lulzbot Mini. (Firmware unknown, will look into this after my print finishes.)
Browser and Version of Browser, Operating System running Browser
Safari 9.1.1 (But the browser has no influence on this.)
Link to octoprint.log
Link to contents of terminal tab or serial.log
Screenshot(s) showing the problem:
It looks like there is some information missing from your bug report that will be needed in order to solve the problem. Please take a look at the Contribution Guidelines which will provide you with a template to fill out here so that your bug report is ready to be investigated (I promise I'll go away then too!).
If you did not intend to report a bug, please take special note of the title format to use as described in the Contribution Guidelines.
I'm marking this one now as needing some more information. Please understand that if you do not provide that information within the next two weeks (until 2016-07-07 14:00) I'll close this ticket so it doesn't clutter the bug tracker. This is nothing personal, so please just be considerate and help the maintainers solve this problem quickly by following the guidelines linked above. Remember, the less time the devs have to spend running after information on tickets, the more time they have to actually solve problems and add awesome new features. Thank you!
PS: I'm just an automated script, not a human being, so don't expect any replies from me :) Your ticket is read by humans too, I'm just not one of them.
Bot complained because you didn't copy the template completely...
Telling it to step down but marking the ticket as "awaiting information" since this a problem that definitely needs a
I have found that more recent OctoPrint versions need a fake ack after
On 23 June 2016 at 15:53, Gina Häußge firstname.lastname@example.org wrote:
That looks like immediately after turning the printer back on you directly started printing - is there something missing from the log or is that really what happened here?
Or am I simply misreading that log annotations by you?
It also looks a bit like while powering off the printer lead to the firmware not replying anymore, the serial connection was nevertheless still kept open. Is that indeed the case?
@bolsoncerrado huh, that works just fine here, both with a real printer and the virtual printer, on master (1.2.13) and maintenance branch (1.2.14.dev).
The issue described by @MichMich rather seems to be caused by the fact that OctoPrint never picks up on the printer being AWOL since the serial connection never drops on its own but instead just stops responding with
Been trying to fix this today but ran into some odd deadlock issues I don't fully understand so far.
It's "solved" now in the way that at least OctoPrint will now again detect printers that just go AWOL with any life sign, but still keep the serial line (which they don't reply on anymore) open. I've added a tracking of consecutive communication timeouts, once a certain limit is reached (individually configurable - via
That means you will have to reconnect though, which is better than having to press semi-hidden buttons or disconnect AND reconnect however, and it better mirrors the actual state of the connection - the printer is no longer really connected when it doesn't respond on serial anymore.