Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disconnect after printing from SD card fails #1226

hcomet opened this issue Feb 15, 2016 · 2 comments


None yet
2 participants
Copy link

commented Feb 15, 2016

What were you doing?

I am developing a plugin that automatically powers off a printer after a print completes.
It runs on a Raspberry Pi and controls the power through GPIOs connected to relays. I
noticed that OctoPrint does not close the connection after the printer is powered down so
I added a call to self._printer.disconnect() to disconnect before powing off the printer.
This works fine in OctoPrint 1.2.8. After upgrading to 1.2.9 the first call to
_print.disconnect() after printing an SD stored file never returns.

I also tried this scenario without the plugin and only using the web UI to see if it was a
problem with my plugin. The problem is also present without any plugin interaction. If you
follow these steps:
1 - Connect to a printer
2 - select a gcode file on the printer's SD clear_status_LED
3 - printe the selected filter
4 - wait until print complete
5 - Try to disconnect through the UI. Click Disconnect. Connection state not updated.
6 - After waiting click the Disconnect button a second time. Connection state not updated.

The disconnect does not happen properly and the connection status is not updated. An
exception shows up in the octoprint_log at this point. (link below)

Also did a mp4 screen capture of the steps on the terminal tab. (link below)

Branch & Commit or Version of OctoPrint

Version 1.2.9 (master branch)
running on Raspbian wheezy. Pi 2.

Printer model & used firmware incl. version

Rostock Max V2
Repetier 0.91.5
RAMBO board

Browser and Version of Browser, Operating System running Browser

Chrome Version 48.0.2564.109 m

Link to octoprint.log

Log with debug enabled for the UI based issue:

I also created a debug log with my plugin calling the disconnect:

There was no exception shown in the log but there was one in the console.
Here is the console session:

Screenshot(s) showing the problem:

Video of the issue in the UI:

Video of the issue using my pliugin:

@foosel foosel modified the milestone: 1.2.10 Feb 15, 2016


This comment has been minimized.

Copy link

commented Feb 15, 2016

Thanks for remembering me of that... I saw that in a different bug report, but of course forgot about it again.


This comment has been minimized.

Copy link

commented Feb 16, 2016

Solved on the maintenance branch, will be released with 1.2.10 within the next days.

@foosel foosel closed this in d267a75 Mar 16, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.