julianschill / klipper-led_effect

LED effects plugin for klipper
GNU General Public License v3.0
696 stars 116 forks source link

Install on multi instance klipper setup #139

Closed jakobwowy closed 4 months ago

jakobwowy commented 1 year ago

I tried to install it on my rapi where I have 4 klipper instances running. The install script failed because no klipper instance was found: "Klipper service not found, please install Klipper first"

Is there a way to install it for multiple instances?

The naming of the services is:

klipper-1.service loaded active running Klipper 3D Printer Firmware SV1 klipper-2.service loaded active running Klipper 3D Printer Firmware SV1 klipper-3.service loaded active running Klipper 3D Printer Firmware SV1 klipper-4.service loaded active running Klipper 3D Printer Firmware SV1

julianschill commented 1 year ago

Just put a softlink to led-effect.py in the klipper/extras directories. You can also add an updater section to your moonraker.conf. That's all the script does.

cdw2929 commented 1 year ago

would you mind giving a hint as what to do googling how to make a softlink and trying to figure out where the location of both the led-effect.py and the klipper/extras location would the location be klipper/klippy/extras? if so I have plenty of .py files but not one led-effect.py

I think the problem is is that if you have multiple instances on one machine it doesnt install

I renamed the if condition in the install script to find the service but when it installs and tries to start the service it doesnt use the amended name

the installer stops klipper and tries to restart it but cant because the services instances are named different than just klipper.service

how do we change that

I sure this is an easy fix for someone that knows the language if you dont mind showing some of us that dont so we dont have to spend days googling

julianschill commented 1 year ago

run

cd klipper-led_effect
ln -s led_effect.py ~/klipper/klippy/extras

This will create the link.

Then add this to the moonraker.conf of one of your instances for the updater:

[update_manager led_effect]
type: git_repo
path: ~/klipper-led_effect
origin: https://github.com/julianschill/klipper-led_effect.git
julianschill commented 1 year ago

I keep this issue open to remind me of improving the script one day.

julianschill commented 4 months ago

I added the manual installation method to the README. Also you can specify the name of the klipper service for the script with the -s parameter.