-
-
Notifications
You must be signed in to change notification settings - Fork 169
How To Install It
This page covers automatic installation, manual installation, Moonraker update manager setup, and uninstalling for Klipper and Kalico.
Clone the repository and run the installer:
cd ~
git clone https://github.com/protoloft/klipper_z_calibration.git
./klipper_z_calibration/install.shRun the script as your normal printer user, not as root.
The installer:
- Links
z_calibration.pyinto Klipper'sklippy/extrasdirectory, or into Kalico'sklippy/pluginsdirectory when a Kalico plugin directory is present. - Adds this repository to Moonraker's update manager if the section is not already present.
- Adds
channel: stableto new Moonraker update manager sections and to existing no-channel sections when the installer is rerun. - Restarts Moonraker when it adds the update manager section.
- Restarts Klipper or the configured Klipper service instances.
Only z_calibration.py is linked into Klipper or Kalico. Supporting Python modules are loaded from this repository checkout through the symlink target, so keep the cloned repository in place.
Warning: Kalico users must enable plugin overrides before loading the plugin:
[danger_options] allow_plugin_override: True
It is safe to run the installer multiple times.
If Klipper is not installed in ~/klipper, or if moonraker.conf is not in ~/printer_data/config/, pass the paths explicitly:
./klipper_z_calibration/install.sh -k /my-home/my-klipper-directory -m /my-home/my-config/moonraker.confThe installer also falls back to ~/klipper_config/moonraker.conf when ~/printer_data/config/moonraker.conf does not exist.
If you run multiple Klipper services, pass the number of instances:
./klipper_z_calibration/install.sh -n 2The installer expects services named klipper-1, klipper-2, and so on.
The -n option affects the service checks and Klipper restarts performed by the installer. The Moonraker update manager block written by the installer still uses managed_services: klipper; adjust that line manually if your Moonraker setup needs differently named Klipper services.
For manual installation on Klipper, link z_calibration.py from this repository into Klipper's klippy/extras directory:
ln -sf ~/klipper_z_calibration/z_calibration.py ~/klipper/klippy/extras/z_calibration.pyFor manual installation on Kalico, link z_calibration.py into Kalico's klippy/plugins directory and enable plugin overrides:
ln -sf ~/klipper_z_calibration/z_calibration.py ~/klipper/klippy/plugins/z_calibration.pyWarning: Do not copy only
z_calibration.pyunless the helper moduleklipper_compat.pyis also available from the copied file's real path. The installer uses a symlink so helper modules load from the repository checkout.
Then restart Klipper or Kalico, not the printer firmware:
sudo systemctl restart klipperThe automatic installer adds this section for you. If you install manually and want Moonraker to update the plugin, add this block to moonraker.conf:
[update_manager z_calibration]
type: git_repo
channel: stable
path: ~/klipper_z_calibration
origin: https://github.com/protoloft/klipper_z_calibration.git
managed_services: klipper
This assumes the repository was cloned into the home directory:
git clone https://github.com/protoloft/klipper_z_calibration.gitIt also assumes the plugin file is linked into Klipper or Kalico. See Manual Installation for the correct link target.
The installer preserves existing explicit stable, beta, or dev channels. New installer-created sections use channel: stable.
If an existing [update_manager z_calibration] section has no channel, rerunning install.sh adds channel: stable.
Action required: Normal Moonraker updates do not rerun
install.sh. Existing no-channel update manager sections remain on Moonraker's implicitdevchannel until you rerun the installer or manually addchannel: stabletomoonraker.confand restart Moonraker.
Moonraker supports additional update manager options and service-management settings. Keep the block above unless your Moonraker setup requires those options.
Run the installer with -u:
~/klipper_z_calibration/install.sh -uThen remove the remaining configuration:
- Remove the
[z_calibration]section from your Klipper configuration. - Remove the
[update_manager z_calibration]block frommoonraker.conf. - Delete the cloned repository when you no longer need it:
rm -r ~/klipper_z_calibrationAfter installation, continue with Configuration.