Resuming from Repetier-Server after pausing from action:paused

I am using Klipper and it pauses the host by sending action:paused.  This seems to stop Repetier from streaming GCODE correctly.  However, when I resume the print using the resume "play" button on the Repetier-Server web app, it starts streaming GCODE again, however it doesn't run the "Run on continue" GCODE first.  Is this because it was paused using action:paused (and not action:pause)? Is there a standard or documentation for this behaviour? states action:paused should only be used if the print is under the control of the printer, which isn't the case when the host is streaming GCODE...


  • If you read the docs more exactly you see there are to pause and paused. The version with d is when firmware is handling the pause while the other version is asking the server to pause. Only the later runs scripts since first version is handled by printer firmware by definition. In install_dir/firmwares/klipper.xml

        <response type="requestPauseNoScript" string="true">//\s*action:paused\b\s*(.*)</response>
        <response type="continuePauseNoScript">//\s*action:resumed\b</response>
        <response type="requestPause" string="true">//\s*action:pause\b\s*(.*)</response>
        <response type="continuePause">//\s*action:resume\b</response>

    The first version is when firmware wants to keep control e.g. for changing filament. I wonder if klipper does not make this distinction. Then we could change the xml file that both variants have type requestPause/continuePause so server scripts would run. Can you execute moves during such a pause? That would be a sign that server still has control and could run codes. Because that is why it differs. Some firmwares like marlin block in that case and can not execute any commands at all until the reason is fixed.

    What did you do to pause klipper and is there a way to continue it with klipper? My test printer has no feature causing it to pause at all so hard for me to test the correct behaviour here.
  • Thanks, that makes more sense to me. AFAIK, There are three ways Klipper can be "paused":
    1. Press pause button in Repetier-Server.  Repetier-Server no longer streams GCODE. Klipper is not notified that the print has been paused, it transitions to idle after a timeout.
    2. Select pause from the Printer LCD.  // action:pause is sent to Repetier-Server which stops streaming GCODE.  Klipper is not notified that the print has been paused, it transitions to idle after a timeout.
    3. Filament runout.  // action:paused is sent to Repetier-Server which stops streaming GCODE.  Klipper is aware of the pause and saves current printer state (and runs additional GCODE, if defined, e.g. to park).
    It appears Klipper does not distinguish between pause and paused, and yes you still have complete control of the printer from Repetier while printing is paused.  I can move all axes and extrude from Repetier while in pause.

    Which isn't an issue so long as the printer state is saved on pause, and restored on resume.  So my fundamental issue is that there there is no special GCODE command from Repetier (or any other host sw AFAIK) to Klipper to tell it that printing has been resumed and to restore its state before resuming the print.  I have tried to work around this issue by providing "Run on pause" and Run on continue" GCODE commands in Repetier to ensure that GCODE commands are always sent to Klipper to save/restore printer state on pause/resume respectively.  Which leads to the issue at hand, when the filament runs out // action:paused is sent to Repetier and Klipper saves the printer state.  However upon using resume (play) button in Repetier, the print restarts, however the "Run on continue" GCODE is not run to restore state.  I agree the change you suggested in klipper.xml should be made to make both variants use requestPause/continuePause.

    To answer your last question, my previous comments should address how Klipper was paused.  You can "resume" Klipper by simply streaming GCODE to it.  You can do this with the resume (play) button in Repetier, or with the Printer LCD resume (sends // action:resume to Repetier), or by manually sending the RESUME GCODE cmd in the console (restores printer state and sends // action:resumed to Repetier).  My workaround has been applied in this case as well so should work correctly with the klipper.xml changes.

  • 1) and 2) are ok. Here it is server doing the pause and he can continue.
    3) is a problem. When klipper runs extra commands the server is not aware of this. This is supposed to be possible in paused since printer has control. And printer also is responsible for restoring last position and then it should send // action:resumed and server would see that and continue. So there should be a button on printer lcd to do just that.

    it seems there might be a RESUME command for 3) that restores position. Would that work correctly if being send from server? It seems that this is the intended way to do it.
  • Yes the RESUME command will do it, but its not as convenient as using the resume button on Repetier.
    Updating klipper.xml allows the resume button on Repetier to be used.
  • Idea is to send RESUME instead of just continue so firmware adjusts as well. So a special command sequence for continue in case it is action:paused  and action:pause is active.
Sign In or Register to comment.