GithubHelp home page GithubHelp logo

plr-klipper's Introduction

A simple print recovery system for Klipper

Klipper config:

To install, add these files somewhere that klipper can access them. ~/. should be a fine choice, if you have no idea. You must then add an [include] directive in order to add the contents of plr.cfg to your printer.cfg, or just paste it in if you don't like [include] directives.
plr.sh must be marked executable. Also, plr.cfg and plr.sh must be modified to reflect the location of your virtual sdcard in Klipper.

In addition, the Kiauh Gcode Shell Command extenstion must be added to Klipper. You don't need to have Kiuah installed, but you must add gcode_shell_command.py to the contents of your klipper/klippy/extras directory (The extension can be downloaded here: https://github.com/th33xitus/kiauh/blob/master/resources/gcode_shell_command.py )

Finally, this must be added to the end of your start gcode (either macro or slicer): SAVE_VARIABLE VARIABLE=was_interrupted VALUE=True

and this must be added to the beginning of your end gcode (either macro or slicer): SAVE_VARIABLE VARIABLE=was_interrupted VALUE=False

Slicer config: It is necessary to call the Klipper LOG_Z macro from your slicer at every layer change. You don't need to get fancy and specify any parameters. Klipper will figure out the current Z, once the macro is invoked. In Cura, you use the Insert At Layer Change post processor, select the Before option, and then type 'LOG_Z' (without the quotes) into the gcode to insert field. The config for other slicers should be similar

Notes: This tool tries to figure out the temperature of the print prior to failure, proceeding from least to most accurate. It first adds a call to START_TEMPS (It is advised to add a macro called START_TEMPS that heats up your printer to sane values). It then scans the gcode for all temperature gcodes up to the time the print failed, and adds them in that order. Finally, in the case of Cura, it scans the end gcode for the Cura print settings, and adds the temperatures from the Cura print settings.

I do believe the main reason Kevin has not offered a native implementation of Power Loss Recovery is in large part due to conerns regarding SD card life, since Klipper is often run from an SD card on an RPI. If this is a concern for you, it is recommended to mount the virtual sd card directory on a separate, disposable SD card to save wear on the main card used for the Klipper distribution, and then to configure the Klipper saved variables section to use the virtual sd card directory

Operation:

If a power loss occurrs, raise the print head and clean/cut off any blobs that may have rsulted from the failure. Wait for the hotend to cool, clean the nozzle tip, and then place the nozzle tip on the highest point of the print. Use a light touch - the gantry should still be able to move across the print, but scrape slightly. Then navigate to the gcode file in the SD Card menu, and select the file. Then back out of the SD Card menu and re-enter it (no idea how to refresh the menu otherwise). The menu should now contain a "Recover Failed" option to recover the failed print. Select the option. The printer should home axes, wait to heat up, and then resume the print.

More savvy users can take advantage of the RESUME_INTERRUPTED macro, and specify the GCODE_FILE parameter with the filename (along with fully qualified path) to achieve the same thing. The most advanced users can use this macro to resume prints that failed due to filament runout, heat creep, etc. Measure the height of the failure, and then use the RESUME_INTERRUPTED macro, also specifying the parameter Z_HEIGHT to reflect the measured height.

plr-klipper's People

Contributors

the--captain avatar vxcvxcvxc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

plr-klipper's Issues

Disable/Uninstall feature

I had to reflash my system when I accidentally bricked it via update, long story, but the short version is that the new image had this PLR installed whereas I do not want to use the feature. Is there a way to disable/deactivate it?

My main issue is that this timelapse function I'm trying to use causes the console to spit out the following two errors every time it captures a frame:
Unknown command:"PRINT_START"
Unknown command:"SAVE_LAST_FILE"

I realize I can make the messages go away by including the plr.cfg into the main config, but I would rather disable/remove the PLR entirely.

BTT UPS

Hi, I was looking for a PLR solution for klipper and find your script. I was wondering how to hack it to work with BTT UPS Module.

Instead of LOG_Z when layer change, I was thinking in LOG_Z only in case of powerloss event. The UPS gives me 30 seconds to log zed info and park the nozzle of print.

What to you think about it? Do you see any possible problem on this approach?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.