First about my setup. I have a uninterruptible power supply (UPS) in front of my printer. Also I have a relay board to control the power of my printer (like this)
What is the problem?
What it should do (and sometimes does) is to move away from the print at the end, wait for a certain temperatur to cool down and turn off. It always prints until the end, but in some cases the print just stops before moving away from the finished part. Seems like it send the print done event to early.
This ruins the surface of the print because the hot nozzle is in contact with the part.
Already tried a few things to figure this out, but I don't find the connection. For example I unplugged the power connection to the UPS (so the UPS is the only PowerSupply for the printer in that case) to see if it stops the printer. This works totally fine.
There are gcode files where it is unpredictable if it stops at the print or not (but I always use the same file/slicer/end-gcode). But now there is one gcodefile where I can reproduce the issue. So it will always stop at the surface.
Wwith this file I'm know able to narrow down the issue. So I connected the printer without the UPS to see if that helps and yes without it I don't have that issue. Still strange that it works fine when it's connected while printing. The thing is I still would like to keep the UPS, but currently it ruins way more that it saves.
This is the action which I use to turn off the printer
events:
enabled: true
subscriptions:
- command:
- printer_off.sh
event: PrintDone
type: system
This is the end of the gcode file:
G0 F12120 X69.986 Y29.291
G1 F1920 X70.136 Y29.141 E1140.41092
M107
G1 F4200 E1135.41092
G1 Z10.300
G0 F12120 X70.136 Y29.141 Z15.000
#End Gcode
T0
M104 S0
M140 S0
G91
G1 Z10 F1000
G90
G0 X20
G0 Y230
M109 R120
And this from the octoprint.log
2020-02-28 11:00:33,732 - octoprint.server.heartbeat - INFO - Server heartbeat <3
2020-02-28 11:02:34,956 - octoprint.util.comm - INFO - Finished in 1762.310 s.
2020-02-28 11:02:34,964 - octoprint.util.comm - INFO - Changing monitoring state from "Printing" to "Finishing"
2020-02-28 11:02:34,973 - octoprint.printer.standard.job - INFO - Print job done - origin: local, path: print2.gcode, owner: myuser
2020-02-28 11:02:34,982 - octoprint.plugins.DisplayLayerProgress - INFO - Printing stopped. Detailed progress stopped.
2020-02-28 11:02:34,983 - octoprint.events - INFO - Executing a system command
2020-02-28 11:02:35,053 - octoprint.events - INFO - Executing a system command
2020-02-28 11:02:35,295 - octoprint.util.comm - ERROR - Unexpected error while reading from serial port
Traceback (most recent call last):
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/util/comm.py", line 2793, in _readline
ret = self._serial.readline()
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/util/comm.py", line 4932, in readline
c = self.read(1)
File "/home/pi/oprint/local/lib/python2.7/site-packages/serial/serialposix.py", line 501, in read
'device reports readiness to read but returned no data '
SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?)
2020-02-28 11:02:35,296 - octoprint.util.comm - ERROR - Please see https://faq.octoprint.org/serialerror for possible reasons of this.
2020-02-28 11:02:35,308 - octoprint.util.comm - INFO - Changing monitoring state from "Finishing" to "Offline (Error: SerialException: 'device reports readiness to read but returned no data (device disconnected or multiple access on port?)' @ comm.py:_readline:2793)"
The errors seem expected to me because the printer is off at this time.
So my guess is that the event PrintDone
is sent to early for some reason. Any ideas/suggestions?
EDIT: Probably not the best theory, because it works find without the UPS. As I mentioned, I don't see the connection.
OctoPrint version 1.3.12
OctoPi version 0.17.0
Hephestos i3
Marlin 1.1