Giter VIP home page Giter VIP logo

kiauh's Introduction

KIAUH logo

Klipper Installation And Update Helper

A handy installation script that makes installing Klipper (and more) a breeze!



πŸ“„οΈ Instructions πŸ“„

πŸ“‹ Prerequisites

KIAUH is a script that assists you in installing Klipper on a Linux operating system that has already been flashed to your Raspberry Pi's (or other SBC's) SD card. As a result, you must ensure that you have a functional Linux system on hand. Raspberry Pi OS Lite (either 32bit or 64bit) is a recommended Linux image if you are using a Raspberry Pi. The official Raspberry Pi Imager is the simplest way to flash an image like this to an SD card.

  • Once you have downloaded, installed and launched the Raspberry Pi Imager, select Choose OS -> Raspberry Pi OS (other): \

KIAUH logo

  • Then select Raspberry Pi OS Lite (32bit) (or 64bit if you want to use that instead):

KIAUH logo

  • Back in the Raspberry Pi Imager's main menu, select the corresponding SD card to which you want to flash the image.

  • Make sure to go into the Advanced Option (the cog icon in the lower left corner of the main menu) and enable SSH and configure Wi-Fi.

  • If you need more help for using the Raspberry Pi Imager, please visit the official documentation.

These steps only apply if you are actually using a Raspberry Pi. In case you want to use a different SBC (like an Orange Pi or any other Pi derivates), please look up on how to get an appropriate Linux image flashed to the SD card before proceeding further (usually done with Balena Etcher in those cases). Also make sure that KIAUH will be able to run and operate on the Linux Distribution you are going to flash. You likely will have the most success with distributions based on Debian 11 Bullseye. Read the notes further down below in this document.

πŸ’Ύ Download and use KIAUH

πŸ“’ Disclaimer: Usage of this script happens at your own risk!

  • Step 1:
    To download this script, it is necessary to have git installed. If you don't have git already installed, or if you are unsure, run the following command:
sudo apt-get update && sudo apt-get install git -y
  • Step 2:
    Once git is installed, use the following command to download KIAUH into your home-directory:
cd ~ && git clone https://github.com/dw-0/kiauh.git
  • Step 3:
    Finally, start KIAUH by running the next command:
./kiauh/kiauh.sh
  • Step 4:
    You should now find yourself in the main menu of KIAUH. You will see several actions to choose from depending on what you want to do. To choose an action, simply type the corresponding number into the "Perform action" prompt and confirm by hitting ENTER.

❗ Notes ❗

πŸ“‹ Please see the Changelog for possible important changes!

  • Mainly tested on Raspberry Pi OS Lite (Debian 10 Buster / Debian 11 Bullseye)
    • Other Debian based distributions (like Ubuntu 20 to 22) likely work too
    • Reported to work on Armbian as well but not tested in detail
  • During the use of this script you will be asked for your sudo password. There are several functions involved which need sudo privileges.

🌐 Sources & Further Information

Klipper Logo Arksine avatar Mainsail Logo
by KevinOConnor by Arksine by mainsail-crew
Fluidd Logo jordanruthe avatar OctoPrint Logo
by fluidd-core by jordanruthe by OctoPrint
nlef avatar Kragrathea avatar Obico logo
by nlef by Kragrathea by Obico

OctoEverywhere Logo OctoEverywhere Logo OctoApp Logo
by Patrick Schmidt by Quinn Damerell by Christian WΓΌrthner

✨ Credits ✨

  • A big thank you to lixxbox for that awesome KIAUH-Logo!
  • Also, a big thank you to everyone who supported my work with a Ko-fi !
  • Last but not least: Thank you to all contributors and members of the Klipper Community who like and share this project!

A special thank you to JetBrains for sponsoring this project with their incredible software!

JetBrains Logo (Main) logo.

kiauh's People

Contributors

b3tuning avatar bistory avatar clon1998 avatar cobyn avatar coderus avatar cravl-dev avatar cron410 avatar dw-0 avatar jneilliii avatar jookia avatar jordanruthe avatar kennethjiang avatar kwadfan avatar leifbladt avatar marbocub avatar mbravorus avatar megapro17 avatar meteyou avatar pedrolamas avatar phizev avatar piotrb avatar plloppii avatar quinndamerell avatar richardjm avatar s-kybound avatar shavrin777 avatar sineos avatar tumbleweedlabs avatar whattheflukz avatar ykomatsu 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar

kiauh's Issues

After Reboot of the Pi, KlipperScreen isn't showing up

I reinstalled KlipperScreen with the "pi" User with your script after I deleted the systemd service that was installed with the root user (don't know if that was neccessary).

After a reboot, the screen now only shows the shell login screen instead of KlipperScreen

Install fails if "dbus" is not installed.

Hello!
I would suggest to add "dbus" between the requirements to install using apt since on DietPi the install has been failing since by default it misses dbus.

The error i get is "Failed to create bus connection: No such file or directory" whenever the scripts wants to check if the services exist.

Mainsail install failure

This install fails immediately with it complaining about a disable error.

I'm not sure what this code does in install_mainsail.sh, but I had to delete it and then Mainsail installed just fine

for service in "${disable_service[@]}"
do
if [[ $(dpkg-query -f'${Status}' --show $service 2>/dev/null) = *\ installed ]]; then
status_msg "Disabling $service service ..."
sudo apt-get disable $service
ok_msg "$service service disabled!"
fi
done

USB Webcam not working

Hi, could you include installation of service/drivers for USB webcams, I have Logitech Webcam C920 but most usb webcams should be the same.
Used "2020-08-20-raspios-buster-armhf-lite.img" on SD card.
In Octopi I normally enter
/webcam/?action=stream
http://127.0.0.1:8080/?action=snapshot
/usr/bin/ffmpeg
and it works perfectly, but with this installation of octopi webcam does not work.

With the octopi-buster-lite-0.17 image MJPG-Streamer is included.
Would be helpful for inexperienced like me - thanks

Mainsail macros throw an error as installed.

The KIAUH script installs the following default Mainsail macros:
`[gcode_macro CANCEL_PRINT]
rename_existing: BASE_CANCEL_PRINT
default_parameter_X: 230
default_parameter_Y: 230
default_parameter_Z: 10
gcode:
M104 S0
M140 S0
M141 S0
M106 S0
CLEAR_PAUSE
SDCARD_RESET_FILE
BASE_CANCEL_PRINT

[gcode_macro PAUSE]
rename_existing: BASE_PAUSE
default_parameter_X: 230
default_parameter_Y: 230
default_parameter_Z: 10
gcode:
SAVE_GCODE_STATE NAME=PAUSE_state
BASE_PAUSE
G91
G1 E-1.7 F2100
G1 Z{Z}
G90
G1 X{X} Y{Y} F6000
#G91

[gcode_macro RESUME]
rename_existing: BASE_RESUME
gcode:
G91
G1 E1.7 F2100
G91
RESTORE_GCODE_STATE NAME=PAUSE_state MOVE=1
BASE_RESUME`

Loading Mainsail with these macros as-installed produces the following error:

"Existing command 'CANCEL_PRINT' not found in gcode_macro rename
Once the underlying issue is corrected, use the "RESTART"
command to reload the config and restart the host software.
Printer is halted"

When comparing to the example macros in the Mainsail documentation they are prefixed with [pause_resume].

`[pause_resume]

[gcode_macro CANCEL_PRINT]
rename_existing: BASE_CANCEL_PRINT
default_parameter_X: 230
default_parameter_Y: 230
default_parameter_Z: 10
gcode:
M104 S0
M140 S0
M141 S0
M106 S0
CLEAR_PAUSE
SDCARD_RESET_FILE
BASE_CANCEL_PRINT

[gcode_macro PAUSE]
rename_existing: BASE_PAUSE
default_parameter_X: 230
default_parameter_Y: 230
default_parameter_Z: 10
gcode:
SAVE_GCODE_STATE NAME=PAUSE_state
BASE_PAUSE
G91
G1 E-1.7 F2100
G1 Z{Z}
G90
G1 X{X} Y{Y} F6000
G91

[gcode_macro RESUME]
rename_existing: BASE_RESUME
gcode:
G91
G1 E1.7 F2100
G91
RESTORE_GCODE_STATE NAME=PAUSE_state MOVE=1
BASE_RESUME`

Inserting this extra bit into the KIAUH macros solves the issue.

dwc timeout

when i install dwc i can see connection established. when i try and connect the printer i get a timeout error. using the standard ip address with port ending in 4750. i am using a bigtreetech gtr v1.0 motherboard, could this be why im not able to connect to dwc?
image

failure on Installing packages.

Linux orangepizero 5.9.14-sunxi #20.11.3 SMP Fri Dec 11 20:31:12 CET 2020 armv7l armv7l armv7l GNU/Linux

When installing klipper:

###### Installing packages...
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'python-dev-is-python2' instead of 'python-dev'
Note, selecting 'libusb-1.0-0' for regex 'libusb-1.0'
Note, selecting 'libusb-1.0-0-dev' for regex 'libusb-1.0'
Note, selecting 'libusb-1.0-doc' for regex 'libusb-1.0'
Package python-virtualenv is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'python-virtualenv' has no installation candidate

Feature request: option to upload logs

Adding an option to upload logs and provide the url would make things much easier for users.

Many pastebin services allow you to use curl to upload some data, for example

curl -s --data 'Hello World!' 'http://paste.c-net.org/'

returns an url when run

http://paste.c-net.org/SaucersBonjour

A warning should be given to the users that logs may contain network information and other private data ( file paths, file names, etc) and be asked to confirm uploading the logs.

I think there are 2 viable options:

  1. upload only the last X lines of each file concatenated in a single upload, where X could be set once and remembered or as a hardcoded value initially ( last 1000 lines, for example )
  2. upload each file individually ( to try to avoid having a too big upload)

Updating KIAUH Script fails

Heya just noticed that you updated the KIAUH script and I should type "update" in the menu to update it.

/=======================================================\
|     ~~~~~~~~~~~~~~~~~ [ KIAUH ] ~~~~~~~~~~~~~~~~~     |
|        Klipper Installation And Update Helper         |
|     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     |
\=======================================================/

###### Updating KIAUH ...
Updating 43a724b..bb0eb69
error: Your local changes to the following files would be overwritten by merge:
        scripts/install_klipperscreen.sh
Please commit your changes or stash them before you merge.
Aborting

Leaded to this.

Adding additional hosts script in Moonraker install doesn't append to moonraker.conf

Tested with both IPV6 and IPV4 addresses. Neither were appended to moonraker.conf. Example photos can be seen here: https://imgur.com/a/MAMrWcr

Expected behavior: The script indicates as many IP addresses as desired may be added and when finished, type done. Then the IP addresses should be appended to the moonraker.conf file.

Exhibited behavior: Entering one IP address and striking return continues the script with no option to add more. IP address entered is not appended.

Can Octopi be installed along with the other options?

Looking at the installation I can't tell if I can still install Octoprint even if my main setup it Moonraker/Mainsail/Fluid/KlipperScreen? I'm asking because I would like to occasionally plug the PI to a different printer and monitor a run and send some g-code commands. Since the UI allows me to install it I can't tell if they are mutually exclusive or can run independently from one another?

Issue listing files on pi zero w / raspbian lite

Issue is on line 507 of kiauh.sh

This produces zero file list

for script in ${SRCDIR}/kiauh/scripts/*; do . $script; done

This works

for script in "${SRCDIR}/kiauh/scripts/"*; do . $script; done

Raspbery pi zero, rasbian lite latest version today with all packages updated.
bash version

root@raspberrypi:~/kiauh# bash --version
GNU bash, version 5.0.3(1)-release (arm-unknown-linux-gnueabihf)

Crash when finding printer ID when no printers attached

I selected the option to get printer id with nothing attached

/=======================================================\
|     ~~~~~~~~~~~~~~~~~ [ KIAUH ] ~~~~~~~~~~~~~~~~~     |
|        Klipper Installation And Update Helper         |
|     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     |
\=======================================================/
<!!!!> Make sure your printer is the only USB device connected!

###### Press any key to continue ...


###### Identifying the correct USB port ...
ls: cannot access '/dev/serial/by-id/*': No such file or directory

Issue is at line https://github.com/th33xitus/kiauh/blob/b6c07fc3572fba3b9bfa82323c3f59be965123d0/scripts/functions.sh#L153

It needs to be something like

if  [ -e /dev/serial/by-id/* ]; then 
  if [ -e /dev/serial/by-id/* ]; then
      status_msg "The ID of your printer is:"
      title_msg "$USB_ID"
    else
      warn_msg "Could not retrieve ID!"
      return 1
    fi
else
   warn_msg "Printer not plugged in or not detectable by serial id!"
   return 1
fi

nginx has only default config

Hi,

Since I was moving away from DWC2 I decided to install klipper and everything related from scratch. Since I used this script in the past with great success I also installed it from git.
The klipper installation went fine, but moonraker/mainsail not so much:

###### Creating klippy.log symlink ...
Symlink created!

Creating moonraker.log symlink ...
Symlink created!

Restarting Moonraker Service ...
Moonraker Service restarted!

Restarting Klipper Service ...
Klipper Service restarted!

Testing API ...

Please wait ...

###### API response from http://192.168.178.244:7125/printer/info :
{"result": {"state_message": "Printer is ready", "klipper_path": "/home/dietpi/klipper", "config_file": "/home/dietpi/klipper_config/printer.cfg", "software_version": "v0.8.0-843-gf8cb1e30", "hostname": "any-klipper", "cpu_info": "4 core ARMv7 Processor rev 5 (v7l)", "state": "ready", "python_path": "/home/dietpi/klippy-env/bin/python", "log_file": "/tmp/klippy.log"}}

Klipper API is working correctly!

Testing Nginx ...

Please wait ...

###### API response from http://192.168.178.244/printer/info :
<html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
<center><h1>404 Not Found</h1></center>
<hr><center>nginx/1.14.2</center>
</body>
</html>

<!!!!> Nginx is not working correctly!`

I poked around a bit, the configs for moonraker are getting installed, but sites-available has only the default and not the mainsail_nginx.cfg out of resources copied and a grep comes back with only one line for DEFAULT_PORT but no sudo cp.

Advanced options fails to add printer ID into printer.cfg

When someone just installs and doesn't have a printer installed and tries to flash or set the printer with the advanced option later, it fails because there is no backup directory at that point in time.
`## Identifying the correct USB port ...
Make sure your printer is the only USB device connected!

The ID of your printer is:

/dev/serial/by-id/usb-marlinfw.org_Marlin_USB_Device_08FFE001AF3E08845CB50E97F50020C7-if00

Do you want to write this ID to your printer.cfg now? (Y/n):
cp: cannot create regular file '/home/pi/backup/printer.cfg.2020-05-25_140045.backup': No such file or directory`

Issue with python check

I'm using an older install of an RPi 3 with Raspbian 9.13 stretch, but I think this should not be related to that?

I get this error every time I try to install Moonraker:
Python 3.7 or above required! Please upgrade your Python version first.

I installed Python 3.9 and if I run python3 --version on command line, I get "Python 3.9.0" as a result:
$ python3 --version
$ Python 3.9.0
Shouldn't the script recognize that the version is above 3.7? Or is the result on buster printed differently (I have no device to test right now)?

Might be a stupid question but...

So does this actually update and flash my board when doing the update feature? Or do I still need to build and manually flash the board via "make flash FLASH_DEVICE=/dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0"?

Fail when running update option from main menu

Fresh install of kiauh, so it is already up-to-date. Selecting update (2) from the main kiauh menu results in the following error:

fatal: '4718f39b2f8ef326dc671aa936c509e98fd6cf9f' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Let me know if you need more info or logs.

Use of sed when handling paths causes unwanted behaviour

This issue is in reference to this line
https://github.com/th33xitus/kiauh/blob/0339f3f4f57ea93d1119a76ea82ac7b684b6ec26/scripts/functions.sh#L300
The user that I'm installing klipper and co to is called printeruser, which is then renamed to kiauhuser, causing the script to fail.

If the goal is to put the file besides printer.cfg then it's better to extract the dirname from $PRINTER_CFG. Something like this:

KIAUH_CFG="$(dirname $PRINTER_CFG)/kiauh.cfg"

cannot install in another folder

looks like it cannot change to another folder than home directory.
is there any hard coded home path besides in kiauh.sh?

i try to install in folder "installer" cause it will make my folder clean and not make confused.

System update support

It would be useful to allow Kiauh to have an option to updated the system also. Fluidd supports this option and allows the user to updated the system. A similar functionality would be useful since I often use Kiauh to make sure my setup is up to date.

KlipperScreen Installation nothing happens?

Heya, I installed KlipperScreen with root before.
Now I removed the service and tryed to install it with your script.

Nothing more than this is happening/showing to me ?

image

constantly reconnection

Hi. Did according to your instructions, when loading the web interface I constantly get a reconnection (reason 500: internal server error)

Update SKR-boards using programmer, to avoid SD cards

Hey! Thank you so much for maintaining this awesome tool! It's the perfect addition to klipper, that help newbies to easily install things and get started!

I find it very annoying to swap SDs cards around, when upgrading klipper on the MCU of my SKR 1.4 Pro. I saw, that it's possible to use an programmer (instead of bootloader) for flashing the MCU. I was wondering if that could be integrated into this tool?

Board Chip
SKR V1.3 LPC1768
SKR V1.4 LPC1768
SKR V1.4 Turbo LPC1769
SKR Mini E3 STM32F103RCT6
SKR Pro STM32F407ZGT6

I know it needs a lot of testing, but I wanted to share my idea here. It would require people to hook-up their boards using the corresponding programmer beforehand, but eliminates the future SD-card swapping and this warning:

image

Problems updating scurve-shaping branch

Get this when trying to update scurve-shaping branch:

Checking out dmbutyugin

error: pathspec 'dmbutyugin' did not match any file(s) known to git

Installed Klipper, Moonraker & Fluidd with Kiahu, switched also from master to scurve-shaping, but now I cannot update with Kiahu.

Manual update is working:

git fetch dmbutyugin
git checkout dmbutyugin/scurve-shaping

install moonraker incomplete

I’m install moonraker on my thinkclient under debian 10 and the api test failed

see the traceback

Traceback (most recent call last): File "/home/octo/moonraker-env/lib/python3.7/site-packages/tornado/web.py", line 1680, in _execute result = self.prepare() File "/home/octo/moonraker-env/lib/python3.7/site-packages/tornado/web.py", line 2435, in prepare raise HTTPError(self._status_code) tornado.web.HTTPError: HTTP 404: Not Found <!!!!> Klipper API not working correctly!

thk’s for your help.

Error with python virtual-env when reinstall dwc2

Fisrt I have installed Moonraker and DWC2 but dwc2 stopped working, so I installed Fluidd and it works, then install dwc2 again and broke moonraker and fail.

Here is the log

###### Running apt-get update...
Hit:1 http://raspbian.raspberrypi.org/raspbian buster InRelease
Hit:2 http://archive.raspberrypi.org/debian buster InRelease
Reading package lists... Done


###### Installing packages...
Reading package lists... Done
Building dependency tree
Reading state information... Done
libopenjp2-7 is already the newest version (2.3.0-2+deb10u1).
nginx is already the newest version (1.14.2-2+deb10u3).
python3-dev is already the newest version (3.7.3-1).
python3-libgpiod is already the newest version (1.2-3+rpi1).
python3-virtualenv is already the newest version (15.1.0+ds-2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


###### Installing python virtual environment...
Already using interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in /home/pi/moonraker-env/bin/python3
Also creating executable in /home/pi/moonraker-env/bin/python
Installing setuptools, pkg_resources, pip, wheel...
  Complete output from command /home/pi/moonraker-env/bin/python3 - setuptools pkg_resources pip wheel:
  Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Looking in links: /usr/lib/python3/dist-packages, /usr/share/python-wheels/
Collecting setuptools
Exception:
Traceback (most recent call last):
  File "/usr/share/python-wheels/pip-18.1-py2.py3-none-any.whl/pip/_internal/cli/base_command.py", line 143, in main
    status = self.run(options, args)
  File "/usr/share/python-wheels/pip-18.1-py2.py3-none-any.whl/pip/_internal/commands/install.py", line 338, in run
    resolver.resolve(requirement_set)
  File "/usr/share/python-wheels/pip-18.1-py2.py3-none-any.whl/pip/_internal/resolve.py", line 102, in resolve
    self._resolve_one(requirement_set, req)
  File "/usr/share/python-wheels/pip-18.1-py2.py3-none-any.whl/pip/_internal/resolve.py", line 256, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "/usr/share/python-wheels/pip-18.1-py2.py3-none-any.whl/pip/_internal/resolve.py", line 209, in _get_abstract_dist_for
    self.require_hashes
  File "/usr/share/python-wheels/pip-18.1-py2.py3-none-any.whl/pip/_internal/operations/prepare.py", line 218, in prepare_linked_requirement
    req.populate_link(finder, upgrade_allowed, require_hashes)
  File "/usr/share/python-wheels/pip-18.1-py2.py3-none-any.whl/pip/_internal/req/req_install.py", line 164, in populate_link
    self.link = finder.find_requirement(self, upgrade)
  File "/usr/share/python-wheels/pip-18.1-py2.py3-none-any.whl/pip/_internal/index.py", line 572, in find_requirement
    all_candidates = self.find_all_candidates(req.name)
  File "/usr/share/python-wheels/pip-18.1-py2.py3-none-any.whl/pip/_internal/index.py", line 530, in find_all_candidates
    for page in self._get_pages(url_locations, project_name):
  File "/usr/share/python-wheels/pip-18.1-py2.py3-none-any.whl/pip/_internal/index.py", line 675, in _get_pages
    page = self._get_page(location)
  File "/usr/share/python-wheels/pip-18.1-py2.py3-none-any.whl/pip/_internal/index.py", line 793, in _get_page
    return _get_html_page(link, session=self.session)
  File "/usr/share/python-wheels/pip-18.1-py2.py3-none-any.whl/pip/_internal/index.py", line 144, in _get_html_page
    "Cache-Control": "max-age=0",
  File "/home/pi/moonraker-env/share/python-wheels/requests-2.21.0-py2.py3-none-any.whl/requests/sessions.py", line 546, in get
    return self.request('GET', url, **kwargs)
  File "/usr/share/python-wheels/pip-18.1-py2.py3-none-any.whl/pip/_internal/download.py", line 396, in request
    return super(PipSession, self).request(method, url, *args, **kwargs)
  File "/home/pi/moonraker-env/share/python-wheels/requests-2.21.0-py2.py3-none-any.whl/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/pi/moonraker-env/share/python-wheels/requests-2.21.0-py2.py3-none-any.whl/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/home/pi/moonraker-env/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/adapter.py", line 37, in send
    cached_response = self.controller.cached_request(request)
  File "/home/pi/moonraker-env/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/controller.py", line 111, in cached_request
    resp = self.serializer.loads(request, cache_data)
  File "/home/pi/moonraker-env/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/serialize.py", line 114, in loads
    return getattr(self, "_loads_v{0}".format(ver))(request, data)
  File "/home/pi/moonraker-env/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/serialize.py", line 176, in _loads_v2
    cached = json.loads(zlib.decompress(data).decode("utf8"))
zlib.error: Error -5 while decompressing data: incomplete or truncated stream
----------------------------------------
...Installing setuptools, pkg_resources, pip, wheel...done.
Traceback (most recent call last):
  File "/usr/bin/virtualenv", line 11, in <module>
    load_entry_point('virtualenv==15.1.0', 'console_scripts', 'virtualenv')()
  File "/usr/lib/python3/dist-packages/virtualenv.py", line 724, in main
    symlink=options.symlink)
  File "/usr/lib/python3/dist-packages/virtualenv.py", line 996, in create_environment
    download=download,
  File "/usr/lib/python3/dist-packages/virtualenv.py", line 926, in install_wheel
    call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT)
  File "/usr/lib/python3/dist-packages/virtualenv.py", line 817, in call_subprocess
    % (cmd_desc, proc.returncode))
OSError: Command /home/pi/moonraker-env/bin/python3 - setuptools pkg_resources pip wheel failed with error code 2

Installing Mainsail/Fluidd before Moonraker creates NGINX error

If a moonraker depending webinterface is installed before moonraker itself, the service restart of nginx will cause an error due to the missing upstreams.conf file which only gets created during the install of moonraker.

###### Creating Nginx configuration for mainsail ...
>>>>>> Nginx configuration for mainsail was set!
>>>>>> mainsail listening on def-port !

###### Restarting Nginx Service ...
[....] Restarting nginx (via systemctl): nginx.serviceJob for nginx.service failed because the control process exited with error code.
See "systemctl status nginx.service" and "journalctl -xe" for details.
 failed!
pi@Klipper:~/kiauh $ systemctl status nginx.service
● nginx.service - A high performance web server and a reverse proxy server
   Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Thu 2020-10-08 07:31:16 CDT; 35s ago
     Docs: man:nginx(8)
  Process: 3734 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)

Oct 08 07:31:16 Klipper systemd[1]: Starting A high performance web server and a reverse proxy server...
Oct 08 07:31:16 Klipper nginx[3734]: nginx: [emerg] host not found in upstream "apiserver" in /etc/nginx/sites-enabled/fluidd:34
Oct 08 07:31:16 Klipper nginx[3734]: nginx: configuration file /etc/nginx/nginx.conf test failed
Oct 08 07:31:16 Klipper systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
Oct 08 07:31:16 Klipper systemd[1]: nginx.service: Failed with result 'exit-code'.
Oct 08 07:31:16 Klipper systemd[1]: Failed to start A high performance web server and a reverse proxy server.

possible fix:
decline installation of an interface if moonraker is not installed. the interfaces relais on moonraker, therefore there is no real need to have them installed before having a valid moonraker installation available.

After installation user pi has no authorization to /dev/ttyUSB0.

Hello

many thanks for the installation script.

I installed Mainsail on an Orangepi Lite.

Installed with the user pi. pi is entered as sudoer.

After the installation there is no printer.cfg in /home/pi. I had to copy them via winscp.
is the problem that I'm not using a Raspberry Pi or is it possible to change the script so that a printer.cfg is always available?
After the installation, the user pi has no authorization to /dev/ttyUSB0. The printer is not found.
If I adjust the rights, the printer will be found.

Thank you Andre

unable to access 'https://github.com/th33xitus/kiauh.git/': server certificate verification failed

Hi,

I have an issue with accessing Kiauh on rpi4. It had been working fine for weeks, however when I tried to connect today to check for updates, it comes up with the following error :

$ git clone https://github.com/th33xitus/kiauh.git Cloning into 'kiauh'... fatal: unable to access 'https://github.com/th33xitus/kiauh.git/': server certificate verification failed. CAfile: none CRLfile: none

I attempted to re-instal Kiauh and it comes up with same error message. I checked to make sure git was up to date. Any advice on what's causing this?

Many thanks

Dwc2

Hello. I have a slight issue. Dwc2 is not working. When I install and open in browser I get internal error 500. The connection resets and tries to start again over and over. I have no idea how to get the klippy log from the ui

kiauh updates with changes to kiauh ini will fail due to merge conflict

Need to find a solution on how to update the kiauh.ini file while preserving the current values of valid entries and not creating merge conflicts during updates. Merge conflicts prevent kiauh from updating automatically due to local modifications (which happen when updating klipper caused by the rollback function).

Trusted clients does not include 10.x.y.z

Not sure if 10.x.y.z/? should be included by default (some routers use that as public ip on some ISPs), but at least a warning in the readme should be added that if your network uses 10.x.y.z you should add it manually in trusted clients.

Mainsail using port 80

Hello. Please excuse my ignorance on the topic. I am trying to install and use fluidd. I already have mainsail installed and running. When I use kiuah to install fluidd it tells me main sail is using port 80 and u need to pick another port. I picked 81. How do I log into fluidd to use the ui

Feature request: Enable/disable tmpfs on /tmp and /var/log

An option to disable and enable this would be very useful for most users.

These should be added on /etc/fstab to prevent wear on sd card

tmpfs           /tmp            tmpfs   defaults,noatime,nodev,nosuid,size=50M 0 0
tmpfs           /var/log        tmpfs   defaults,noatime,nodev,nosuid,size=50M 0 0

G-Code Shell Command Extension not work without connection to MCU

Hi. Im use sonoff for control power of PSU my printer.
To turnoff and turnon printer im try use G-Code Shell Command Extension.

[gcode_shell_command TURN_ON]
command: curl -X POST http://sonoff_pow.local/switch/sonoff_pow_switch/turn_on
timeout: 2.
verbose: True

[gcode_shell_command TURN_OFF]
command: curl -X POST http://sonoff_pow.local/switch/sonoff_pow_switch/turn_off
timeout: 2.
verbose: True

TURN_OFF command work perfectly. But TURN_ON not, becaurse klipper not connected to MCU.

What i can to do?

Error message:
{'message': 'Lost communication with MCU 'mcu'\nOnce the underlying issue is corrected, use the\n"FIRMWARE_RESTART" command to reset the firmware, reload the\nconfig, and restart the host software.\nPrinter is shutdown\n', 'error': 'WebRequestError'}

update RPi OS

Why not add the an update section for the RPi OS software ?

something like:

sudo apt update
sudo apt full-upgrade

After uninstalling nginx + remove fluidd + reinstalling fluidd => nginx wont work

As the title says the installation in the order of the title nginx won't start anymore.

Output of systemctl status is like this:

● nginx.service - A high performance web server and a reverse proxy server
   Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sun 2021-02-21 21:46:40 GMT; 21s ago
     Docs: man:nginx(8)
  Process: 1427 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)

Feb 21 21:46:40 fluiddpi systemd[1]: Starting A high performance web server and a reverse proxy server...
Feb 21 21:46:40 fluiddpi nginx[1427]: nginx: [emerg] host not found in upstream "apiserver" in /etc/nginx/sites-enabled/fluidd:38
Feb 21 21:46:40 fluiddpi nginx[1427]: nginx: configuration file /etc/nginx/nginx.conf test failed
Feb 21 21:46:40 fluiddpi systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
Feb 21 21:46:40 fluiddpi systemd[1]: nginx.service: Failed with result 'exit-code'.
Feb 21 21:46:40 fluiddpi systemd[1]: Failed to start A high performance web server and a reverse proxy server.

And this is what the nginx.conf looks like

pi@fluiddpi:~ $ cat /etc/nginx/nginx.conf
user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;

events {
        worker_connections 768;
        # multi_accept on;
}

http {

        ##
        # Basic Settings
        ##

        sendfile on;
        tcp_nopush on;
        tcp_nodelay on;
        keepalive_timeout 65;
        types_hash_max_size 2048;
        # server_tokens off;

        # server_names_hash_bucket_size 64;
        # server_name_in_redirect off;

        include /etc/nginx/mime.types;
        default_type application/octet-stream;

        ##
        # SSL Settings
        ##

        ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
        ssl_prefer_server_ciphers on;

        ##
        # Logging Settings
        ##

        access_log /var/log/nginx/access.log;
        error_log /var/log/nginx/error.log;

        ##
        # Gzip Settings
        ##

        gzip on;

        # gzip_vary on;
        # gzip_proxied any;
        # gzip_comp_level 6;
        # gzip_buffers 16 8k;
        # gzip_http_version 1.1;
        # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

        ##
        # Virtual Host Configs
        ##

        include /etc/nginx/conf.d/*.conf;
        include /etc/nginx/sites-enabled/*;
}


#mail {
#       # See sample authentication script at:
#       # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
#
#       # auth_http localhost/auth.php;
#       # pop3_capabilities "TOP" "USER";
#       # imap_capabilities "IMAP4rev1" "UIDPLUS";
#
#       server {
#               listen     localhost:110;
#               protocol   pop3;
#               proxy      on;
#       }
#
#       server {
#               listen     localhost:143;
#               protocol   imap;
#               proxy      on;
#       }
#}

KIAUH breaks config if appending after a SAVE_CONFIG block

if there is an auto generated SAVE_CONFIG block at the end of the printer.cfg (for example after creating a bed mesh) and KIAUH is appending some config entries to that, the config will break and klipper throws a parsing error.

needs a fix where the printer.cfg is first checked for such lines and if there is one, KIAUH won't append to that, instead insert the config entries above that block.

Multi instance support

Hello,

might be an interesting feature for the future: Multi Instance Support

It's possible to run multiple instances of Klipper/Octoprint/etc on the same Raspberry/etc. to manage more than one connected printer. But it's difficult to setup, different ports, different config-files, different init.d-scripts.
Maybe Kiahu is extended to manage this from a single point?

Self update option?

Any thoughts for the ability to self update kiauh along with the other stuff in the update menu?

Remove branding

So since the remove branding is now gone, I figured out I would do it myself because I really don't like the image in the background of the menu. I changed it to a 50% gray image with the same name as the other and simply replaced the image in /home/pi/mainsail/img folder. It gi

Attached is the blank background image I'm now using.
bg-navi 519d7209

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.