Klipper Maintenance
Keep your 3D printer running smoothly
Features
Klipper Maintenance supports the following features:
- Maintenance reminders in the terminal
- Maintenance reminders on the printer display
- Print time thresholds
- Filament thresholds
- Time thresholds
Get Started
Follow Installation to get started with Klipper Maintenance.
Configuration
After installing KlipperMaintenance, follow Configuration to configure KlipperMaintenance.
Usage
To use KlipperMaintenance, follow G-Codes.
Installation
Follow this guide to install or update KlipperMaintenance.
Install
To install KlipperMaintenance, run in your terminal:
cd ~
git clone https://github.com/3DCoded/KlipperMaintenance
cd KlipperMaintenance
sh install.sh
sudo service klipper restart
Add to your moonraker.conf
:
# KlipperMaintenance Update Manager
[update_manager KlipperMaintenance]
type: git_repo
path: ~/KlipperMaintenance
origin: https://github.com/3DCoded/KlipperMaintenance.git
primary_branch: main
is_system_service: False
install_script: install.sh
Update
To update KlipperMaintenance, update via Moonraker's update manager, then run in your terminal:
cd KlipperMaintenance
sh install.sh
sudo service klipper restart
Configuration
After installing KlipperMaintenance, follow this guide to configure it.
Main Section
First, a main [maintain]
section must be configured. This has two main purposes:
- Check periodically if maintenance needs to be done
- Provide the
MAINTAIN_STATUS
command
To configure it, add to your printer.cfg
:
[maintain]
interval: 60 # optional, time (in seconds) between checking if maintenance needs to be done (default is 60)
Maintenance Sections
Next, for each maintenance object, a [maintain xxx]
config section should be configured. In this example, three maintenance objects will be configured (note the times here are purely for demonstration and are probably not ideal):
- Lubricate XY rods (250 hours print time)
- Replace air filter (500 hours time)
- Clean and tighten extruder screws (700m filament)
For each [maintain xxx]
section, there are four options that must be set:
label
text that will be displayed when referring to this maintenance objecttrigger
type of event that triggers this maintenance. Currently three options:print_time
print time, in hoursfilament
extruded filament, in meters (330m is roughly 1kg of PLA)time
time, in hours
threshold
how often maintenance needs to be done. Forprint_time
andtime
, this is in hours. Forfilament
, this is in metersmessage
message that will be displayed when maintenance needs to be doneexpired_gcode
GCode to run after maintenance expires. Not required
Example:
# Lubricate XY rods
[maintain xyrods]
label: XY smooth rods
trigger: print_time
threshold: 250
message: Lubricate XY smooth rods
# Replace air filter
[maintain airfilter]
label: Air filter
trigger: time
threshold: 500
message: Replace HEPA and charcoal filters
# Extruder maintenance
[maintain extruder]
label: Extruder maintenance
trigger: filament
threshold: 700
message: Clean extruder gears and tighten extruder bolts
G-Codes
KlipperMaintenance provides a few helper GCodes to manage your maintenance. Follow this guide to learn how to use them.
MAINTAIN_STATUS
Shows the current status of maintenance. Accepts no parameters. Using the example from Configuration and assuming air filter is expired, here is an example:
MAINTAIN_STATUS
XY smooth rods: 200h remaining
Maintenance "Air filter" Expired!
Replace HEPA and charcoal filters
Extruder maintenance: 400m remaining
CHECK_MAINTENANCE
Shows the current status of provided maintenance. Example:
CHECK_MAINTENANCE NAME=xyrods
Maintenance xyrods Status:
Next maintenance in 200h
Maintenance message: Lubricate XY smooth rods
UPDATE_MAINTENANCE
Marks the provided maintenance as complete. Example:
UPDATE_MAINTENANCE NAME=xyrods
This resets the maintenance timer for the xyrods
maintenance.
You can also pass a HOURS
parameter to set the current amount of working hours. Example:
Your threshold
for xyrods
is set to 350
print hours. You have printed for 100
hours so far.
Run the following command:
UPDATE_MAINTENANCE NAME=xyrods HOURS=100
This will ensure that KlipperMaintenance reminds you to lubricate your XY rods after 250
hours, not 350
.