How to config two different operation modes of a machine in one host

Basic Information:

Printer Model: Custom
MCU / Printerboard: Custom
Host / SBC Custom
klippy.log

Fill out above information and in all cases attach your klippy.log file (use zip to compress it, if too big). Pasting your printer.cfg is not needed
Be sure to check our “Knowledge Base” Category first. Most relevant items, e.g. error messages, are covered there

Well, i’m creating a prototype of printer which can operate in two fully different modes.
Instead of having two hosts and turning on the corresponding, i have thought about creating two fully separated configurations in my config files, so i just have to switch between them.

(I dont want to configure two printers in my host, that’s completely different)

These modes not only change the printer.cfg but also some klipper files, klipperscreen… So i must have them in total diferent directories, for example:
Mode 1 → home/pi/mode1 → klipper,klipperscreen,printer_data…
Mode 2 → home/pi/mode2 → klipper,klipperscreen,printer_data…

I’m trying to guess how to change between these modes and i have thought in two ways. One is quite slow but works, and i have doubt in other one.

The first one is slower and is to basically run a script wich copies the desired mode files to the normal location of these (home/pi) and restart the system. I guess it will work.

The second one is the one i’d like to try as i guess is faster and consist in having the files in the location i have said (home/pi/mode1/2) and configure klipper and all services to run in that location instead of the normal one. And the change would be something like stopping the current service, and starting the one located in the other mode.

I dunno if i have explained correctly, but if any has some ideas about how to make this, just let me know.

Thanks!!

Your information is a bit scarce to provide meaningful support.

  • Do you need just a new configuration, while reusing existing directories, such as ~/printer_data?
  • Do you require a second Klipper host setup? If so, what is the reason?
  • What exactly has changed and why?
  • Does this affect components like KlipperScreen, Moonraker, etc.? If so, why and how?

Essentially, there are multiple approaches possible:

  1. Switch folders
  2. Only switch configurations
  3. Switch environment and service files, either by copying or deactivating the old and activating the new
  4. A combination of 1 to 3
1 Like

I think i need a combination of all haha😅

Basically i configure the “same” machine in different ways, afecting components such as kinematics, UI, and maybe API (in the future).

I send you more info.