Toolchnagers - run with some toolheads missing

Hi, so I have been running 6 toolheads on my Voron. And from time to time I take one toolhead off for maintaintenance/upgrades. This is really painful to reconfigure klipper to handle this however:

  • All reated config needs to be deleted. I keep each tooleahd config in a separate file so that is not a huge pain. I have been thinking how to automate this, and the simplest solution seem to be conditional includes - something like:
[include tool4.cfg]
 when_serial: /dev/serial/by-id/usb-Klipper_stm32g0b1xx_1000190012504B4633373520-if00
 when_canbus_uuid: 35f0bfb4d8c3
  • Klipper expects strictly incremental extruder numbering, I have a small patch to work around that.

What do you think? Is this something that would be useful for general Klipper?

I’m guessing that this would only run at system boot (to avoid hot plugging the toolheads). I’m guessing you would run something like ~/Katapult/scripts/flashtool.py -i can0 -q parse the results to get the current UUID and then use it for your “when” comparison.

I guess this is okay when each toolhead has the same controller type but what happens if you have a different controller? The three types that I have worked with (and I believe are the most popular) are the EBB36/42, FLY SHT36/42 and SB2040 and each one has different IO pin definitions. How would you work with that?

More like call the relevant code direclty from klippy, IE this.

In my case I have a separate configuration file for each toolhead, each configuring the appropriate toolboard. Parametrizeable configuration files is an interesting idea, but a way more complex task.