moggieuk / ERCF-Software-V3

New software driver for ERCF control under Klipper
GNU General Public License v3.0
298 stars 63 forks source link

Multiple Klipper Installations on One Pi #81

Open AustinTylerDean opened 1 year ago

AustinTylerDean commented 1 year ago

Hi there,

Sorry for the Sesame Street post, but I've searched around the best I could for an answer, AND spent some quality time trying to figure it out, alas the install.sh isn't working for me.

I have two instances of klipper/moonraker installed via KIAUH. Only one is active at the moment. I believe the service I have active is not "klipper.service" but "klipper-1.service".

Although this isn't very common, I can see some people having trouble with this in the future if they want to use the install script. I'm used to manually setting up all my config files, but the "gear stepper stealing the selector end switch" option just blew my brains out, so I'm going a conventional route.

Outside of someone fixing this via a PR, could anyone guide me through as to how many places I need to change this in the install.sh?

Thanks

Surion79 commented 1 year ago

Isn't it enough to run the install script with the -c and/or -k parameter as described on the repo readme? Or what is exactly your issue? The other part is copying the py files in the extras folder in the klipper folder.

AustinTylerDean commented 1 year ago

No, as your script looks for a klipper service that does not exist with a multiple printer installation. Change it to klipper*.service and I think that will work.

On Thu, Jul 6, 2023 at 8:30 AM Surion79 @.***> wrote:

Isn't it enough to run the install script with the -c and/or -k parameter as described on the repo readme?

— Reply to this email directly, view it on GitHub https://github.com/moggieuk/ERCF-Software-V3/issues/81#issuecomment-1623883574, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJI3DDYM2ZWXA3BSHPJACRLXO3KZRANCNFSM6AAAAAAZ7YU474 . You are receiving this because you authored the thread.Message ID: @.***>

AustinTylerDean commented 1 year ago

I would love to contribute but lack the confidence and skills to do so. The best I can do is summarize which details that need to be changed.

In install.sh change the following: KLIPPER_CONFIG_HOME="${HOME}/printer_data/config" needs to accommodate "printer_n_data" where n = an integer that Kiauh uses to designate multiple printer installations.

also

if [ "$(sudo systemctl list-units --full -all -t service --no-legend | grep -F "klipper.service")" ]; then needs to change to "klipper*.service" or equivalent to accommodate multiple printer installations as the services are numbered with the corresponding integer as mentioned previously. For example, my service is called "Klipper1.service"

I also lack the skills to understand why my installation procedure allowed the Happy Hare installation to assign the ownership of the directory to root instead of the user (perhaps I used sudo when I didn't need to?) If anyone struggles with the update_manager coming back as invalid, see my associated closed issue.

AustinTylerDean commented 1 year ago

If anyone is struggling with multiple Klipper installations, all you have to do is go to ~/ERCF-Software-V3 and edit install.sh with the above changes I have mentioned. You can also fork the installation on Github, make those changes, and then make sure to swap your name with Moggie's in the url under update_manager and you won't have to deal with a "dirty" installation. I'm pretty sure changing that install.sh will do it.

Good Luck!

moggieuk commented 1 year ago

If you can submit a PR for the suggested fix I can take a look. You are welcome to fork but then will run into problems getting update / bug fixes..

Actually, sorry, I read that you are not comfortable with PR's. No problem I'll take a look at incorporating this in the future. Definitely going into Happy Hare v2 now..

Thanks.

moggieuk commented 1 year ago

Question: what is the moonraker service names when you have multiple?

Is this just klipper and moonraker?

Perhaps you can run these commands and attach results: systemctl list-units --type=service | grep klipper

systemctl list-units --type=service | grep moonraker

AustinTylerDean commented 1 year ago

Question: what is the moonraker service names when you have multiple?

Is this just klipper and moonraker?

Perhaps you can run these commands and attach results: systemctl list-units --type=service | grep klipper

systemctl list-units --type=service | grep moonraker

image

below are the data folders for the printers FYI image

moggieuk commented 1 year ago

Thanks for the additional info. I will take a look when I get a chance but I will add to Happy Hare v2 rather than this release...