Files
kiauh/README.md
2020-09-12 09:45:22 +02:00

6.3 KiB

KIAUH - Klipper Installation And Update Helper

( This script is always work in progress! )

main_menu


Disclaimer: Usage of this script happens at your own risk!

This script is "only" a helping hand for you to get set up in a fast and most comfortable way.

This does not mean, it will relieve you of using brain.exe!

Feel free to give it a try if you want. If you have suggestions or encounter any problems, please report them.


Instructions:

For downloading this script it is best to have git installed on your machine or Raspberry Pi. If you haven't, please run sudo apt-get install git -y to install git first. You will need it anyways!

After git is installed, use the following commands in the given order to download and execute the script.

cd ~
git clone https://github.com/th33xitus/kiauh.git
cd kiauh
chmod +x kiauh.sh scripts/*
./kiauh.sh

Notes:

  • Tested only on Raspbian Buster Lite
  • During the use of this script you will be asked for your sudo password. There are several functions involved which need sudo privileges.
  • Prevent simultaneous use of DWC2 and OctoPrint if possible. There have been reports that DWC2 does strange things while the OctoPrint service is running while using the DWC2 webinterface. The script disables an existing OctoPrint service when installing DWC2. However, the service can also be reactivated with the script!
  • If you used Mainsail v0.0.12 before and you want to upgrade to v0.1.0 or later, you have to reinstall Moonraker as well! Mainsail v0.1.0 will not work with the old Moonraker service. Don't worry, the script can handle the proper removal of the old version.

For more information or instructions, please check out the appropriate repositories listed below:

Klipper mainline by KevinOConnor :

Klipper S-Curve fork by dmbutyugin :

Moonraker and Klipper fork by Arksine :

Mainsail Webinterface by meteyou :

Duet Web Control by Duet3D :

DWC2-for-Klipper-Socket by Stephan3 :

OctoPrint Webinterface by OctoPrint :


Functions and Features:

Core Functions:

  • Install: Klipper Firmware, dwc2-for-klipper-socket + Duet Web Control, Moonraker + Mainsail, OctoPrint
  • Update: Klipper Firmware, dwc2-for-klipper-socket + Duet Web Control, Moonraker + Mainsail
  • Backup: Klipper Firmware, dwc2-for-klipper-socket + Duet Web Control, Moonraker + Mainsail, OctoPrint
  • Remove: Klipper Firmware, dwc2-for-klipper-socket + Duet Web Control, Moonraker + Mainsail, OctoPrint
  • Build Klipper Firmware
  • Flash MCU
  • Read ID of the currently connected printer (only one at the time)
  • Write several entries to your printer.cfg, some of them customizable right in the console
    • Before writing to an existing printer.cfg the script will create a backup! (better safe than sorry!)

Features:

  • Automatic dependency check:

    • If packages are missing on your machine but needed for the asked task, the script will automatically install them
  • Switch between Klipper Forks:

  • Toggle auto-create backups before updating:

    • When enabled, a backup of the installation you want to update is made prior updating
  • Preconfigure OctoPrint:

    • When installing OctoPrint, a config is created which preconfigures your installation to be used with Klipper
      • adding the restart/shutdown commands for OctoPrint
      • adding the serial port /tmp/printer
      • set the behavior to "Cancel any ongoing prints but stay connected to the printer"
  • Enable/Disable OctoPrint Service:

    • Usefull when using DWC2/Mainsail and OctoPrint at the same time to prevent them interfering with each other
  • Set up reverse proxy for DWC2, Mainsail and OctoPrint and changing the hostname:

    • The script can install and configure Nginx for the selected webinterface. This will allow you to make your webinterface reachable over an URL like <hostname>.local
    • Example: If you name the host "mainsail" and set up a reverse proxy, type mainsail.local in your webbrowser to open the Mainsail webinterface

    to be continued...

What this script can't do:

  • Updating OctoPrint -> Use OctoPrint for updating!

  • Setting up webcam related stuff:

    • If you want to use a webcam you have to install the dependencies and configurations yourself. I can't test this stuff sufficient enough due to me not having/using a webcam and therefore it's just too much work for me to set up an installation script which works, at best, with the first try.

      There are install instructions (at least in case of OctoPrint) available: Setting up OctoPrint on a Raspberry Pi running Raspbian (look for "Optional: Webcam")

Q&A

Q: Can i install octoprint with this script?

A: Soon™ Yes :)

Q: Can i use this script to install multiple instancec of Klipper on the same Pi? (Multisession?)

A: No, and at the moment i don't plan to implement this function. For multisession installations take a look at this script manu7irl created: https://github.com/manu7irl/klipper-DWC2-installer . Keep in mind that klipper-DWC2-installer and KIAUH are NOT compatible with each other.