klipper-led_effect icon indicating copy to clipboard operation
klipper-led_effect copied to clipboard

How do I start with one effect then after a time, automatically switch to another?

Open Gliptopolis opened this issue 2 years ago • 6 comments

I see the FADETIME option but it seems that has to be tied to a macro? I'd like the machine to boot up with one effect then after a couple seconds switch to another one. Imagine a comet effect for a couple seconds then switching to a static color. Can I use the FADETIME as part of the effect description and make it autostart: true ?

Gliptopolis avatar Aug 09 '22 17:08 Gliptopolis

IMHO this is not an issue, because you can do that without any change to klipper-led_effect. Just use https://www.klipper3d.org/Config_Reference.html#idle_timeout

gdachs avatar Aug 09 '22 17:08 gdachs

That's assuming it's started as a gcode event correct? I'm asking how to use the autostart: true to have leds turn on automatically if that's possible. The fadetime thing should work but not sure how to use that outside of a gcode function

Gliptopolis avatar Aug 09 '22 18:08 Gliptopolis

You can set a gcode command in octoprint to initiate on the serial connection. If that helps.

burntcoinpurse avatar Aug 10 '22 00:08 burntcoinpurse

You can set a gcode command in octoprint to initiate on the serial connection. If that helps.

I'm using Mainsail so not sure if this carries over or not? I can't find any references to this in klipper docs

Gliptopolis avatar Aug 10 '22 11:08 Gliptopolis

Use delayed gcode for that. https://www.klipper3d.org/Config_Reference.html?#delayed_gcode

julianschill avatar Aug 14 '22 18:08 julianschill

I have a delayed gcode in my printer.cfg but it doesn't do anything as far as I can tell.

Gliptopolis avatar Aug 14 '22 21:08 Gliptopolis

Set autostart to true for the first effect and start the second effect with the delayed_gcode like this:

[delayed_gcode startup_effect]
initial_duration: 3
gcode:
  SET_LED_EFFECT EFFECT=first_effect STOP=1
  SET_LED_EFFECT EFFECT=second_effect

julianschill avatar Aug 31 '22 18:08 julianschill