Skip to content

Addon to Julianschill's klipper-effect_led library to allow addressing of multiple toolheads.

License

Notifications You must be signed in to change notification settings

AcrimoniousMirth/multitool_leds

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multi toolhead LED effect control for Klipper

Description

This is an add-on for julianschill/klipper-led_effects that allows defining and controlling LED chains across multiple toolheads. It provides tool-specific mapping and targeting (Active tool, Inactive tools, All tools, or Specific tools).

Disclaimer

This is work in progress and currently in "beta" state. I don't take any responsibility for any damage that happens while using this software.

Support

If you found a bug or you want to file a feature request open an issue.

Installation

Automatic installation

The module can be installed into an existing Klipper installation with an install script.

cd ~
git clone https://github.com/AcrimoniousMirth/multitool_leds.git
cd multitool_leds
./install-multitool_leds.sh

If your directory structure differs from the usual setup you can configure the installation script with parameters:

./install-multitool_leds.sh [-k <klipper path>] [-s <klipper service name>] [-c <configuration path>]

Manual installation

  1. Clone the repository: cd ~ git clone https://github.com/AcrimoniousMirth/multitool_leds.git
  2. Stop Klipper: sudo systemctl stop klipper
  3. Link the file (adjust paths as needed): ln -sf ~/multitool_leds/src/multitool_leds.py ~/klipper/klippy/extras/multitool_leds.py
  4. Start Klipper: sudo systemctl start klipper

Configuration

1. Define Tool LED Mappings

Define which LEDs belong to which tool using [multitool_leds] sections.

[multitool_leds tool_0]
tool: T0                    # The tool name (case-insensitive)
leds: neopixel:sb_leds_t0   # The physical LED chain
logo: 1                     # Group name: list of 1-indexed LED positions
nozzle: 2,3                 # Group name: list of 1-indexed LED positions

2. Define LED Effects

In your [led_effect] sections, reference the tool groups using the multitool_leds prefix followed by the group name and an optional targeting mode.

Targeting Modes (Case-Insensitive):

  • multitool_leds:group_name: Targets all tools (default).
  • multitool_leds:group_name:Active: Targets only the currently active tool.
  • multitool_leds:group_name:Inactive: Targets all tools except the active one.
  • multitool_leds:group_name:All: Explicitly targets all tools.
  • multitool_leds:group_name:T0: Targets a specific tool (e.g., T0).
  • multitool_leds:group_name:Selection: Dynamic target controlled by command.
[led_effect logo_printing]
leds:
    multitool_leds:logo:Active
layers:
    static 1 1 top (1,1,1)

3. Dynamic Selection Control

Use the SET_TOOL_LED_SELECTION command to change what the :Selection suffix targets at runtime.

SET_TOOL_LED_SELECTION GROUP=logo MODE=Active  # Future effects using :Selection target active tool
SET_TOOL_LED_SELECTION GROUP=logo MODE=T0      # Future effects using :Selection target T0

4. Recommended Macro Pattern

To simplify your macros, use a helper macro to set the selection for all groups at once.

[gcode_macro _SET_LEDS_TOOL]
gcode:
    SET_TOOL_LED_SELECTION GROUP=logo MODE={params.TOOL|default("Active")}
    SET_TOOL_LED_SELECTION GROUP=nozzle MODE={params.TOOL|default("Active")}

[gcode_macro STATUS_PRINTING]
gcode:
    _SET_LEDS_TOOL TOOL={params.TOOL|default("Active")}
    SET_LED_EFFECT EFFECT=sb_logo_printing

Uninstall

Remove all relevant definitions in your Klipper configuration and the updater section in the Moonraker configuration. Then run the script to remove the link: cd ~/multitool_leds ./install-multitool_leds.sh -u

If your directory structure differs from the usual setup you can configure the installation script with parameters:

./install-multitool_leds.sh -u [-k <klipper path>] [-s <klipper service name>] [-c <configuration path>]

If that fails, you can delete the link in Klipper manually:

rm ~/klipper/klippy/extras/multitool_leds.py

Delete the repository (optional):

cd ~
rm -rf multitool_leds

About

Addon to Julianschill's klipper-effect_led library to allow addressing of multiple toolheads.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages