# Turning off the LEDs when I turn off the printer

**URL:** <https://klipper.discourse.group/t/turning-off-the-leds-when-i-turn-off-the-printer/21589>\
**Category:** General Discussion\
**Created:** [January 23, 2025, 9:54pm UTC](https://klipper.discourse.group/t/turning-off-the-leds-when-i-turn-off-the-printer/21589 "2025-01-23T21:54:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![chomikolew](https://avatars.discourse-cdn.com/v4/letter/c/9de053/32.png) [@chomikolew](https://klipper.discourse.group/u/chomikolew)\
**Post date:** [January 23, 2025, 9:54pm UTC](https://klipper.discourse.group/t/turning-off-the-leds-when-i-turn-off-the-printer/21589/1 "2025-01-23T21:54:20Z")

</div>

### Basic Information:

Printer Model: Voron 2.4  
 MCU / Printerboard: Spider 2.2  
 Host / SBC: RPI5  
 klippy.log

### Describe your issue:

When I turn off the printer, the LEDs remain lit. This happens because turning off the printer disconnects the 24V power supply to the main board that controls the LEDs, but the LEDs are powered by a separate power supply. Is it possible to run a macro to turn off the LEDs before shutting down the printer?

[klippy.log](https://klipper.discourse.group/uploads/short-url/yzlgqIVyQqvWVYYJEnZo4nSKjtY.log) (81.6 KB)

---

<div class="post-metadata">

**Author:** ![mykepredko](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/mykepredko/32/2085_2.png) [@mykepredko](https://klipper.discourse.group/u/mykepredko)\
**Post date:** [January 24, 2025, 1:49am UTC](https://klipper.discourse.group/t/turning-off-the-leds-when-i-turn-off-the-printer/21589/2 "2025-01-24T01:49:39Z")

</div>

Could you explain (ideally with a diagram) how the “LEDs” are wired into the printer?

I put “LEDs” in quotes because it would be helpful to understand what the LEDs are being used for (are they printer/toolhead illumination) and what are they (ie NeoPixels or LED strips).

---

<div class="post-metadata">

**Author:** ![chomikolew](https://avatars.discourse-cdn.com/v4/letter/c/9de053/32.png) [@chomikolew](https://klipper.discourse.group/u/chomikolew)\
**Post date:** [January 24, 2025, 3:04am UTC](https://klipper.discourse.group/t/turning-off-the-leds-when-i-turn-off-the-printer/21589/3 "2025-01-24T03:04:24Z")

</div>

![obraz](https://global.discourse-cdn.com/free1/uploads/klipper/original/3X/b/4/b4b09717e50212f5075f2b25c348984e289fa86e.png)  
LEDs are for chamber lights

---

<div class="post-metadata">

**Author:** ![mykepredko](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/mykepredko/32/2085_2.png) [@mykepredko](https://klipper.discourse.group/u/mykepredko)\
**Post date:** [January 24, 2025, 4:11am UTC](https://klipper.discourse.group/t/turning-off-the-leds-when-i-turn-off-the-printer/21589/4 "2025-01-24T04:11:48Z")

</div>

First off, there should be a control that allows you to change your LEDs state - no programming work but a few mouse clicks.

I think a macro that would simply turn everything off would be (using the information in your `klippy.log`):

```auto
[gcode_macro LIGHTS_OUT]
description: Turn off my_neopixel
gcode:
  SET_LED LED="my_neopixel" RED=0 GREEN=0 BLUE=0 SYNC=0 TRANSMIT=1

```

---

<div class="post-metadata">

**Author:** ![chomikolew](https://avatars.discourse-cdn.com/v4/letter/c/9de053/32.png) [@chomikolew](https://klipper.discourse.group/u/chomikolew)\
**Post date:** [January 24, 2025, 4:35am UTC](https://klipper.discourse.group/t/turning-off-the-leds-when-i-turn-off-the-printer/21589/5 "2025-01-24T04:35:11Z")

</div>

Yes, but i can run this macro only when klipper is in ready state, which means that i need to run it before i shutdown the printer. I’m using Moonreaker Power Device which doesn’t have the option to attach a macro to the process. So im looking for a way to turn lights out and shutdown printer with one click.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/klipper/original/1X/64419bf2aac6639e6ef5cef200dcd456b0a01ac3.png) [@system](https://klipper.discourse.group/u/system)\
**Post date:** [March 25, 2025, 4:35am UTC](https://klipper.discourse.group/t/turning-off-the-leds-when-i-turn-off-the-printer/21589/6 "2025-03-25T04:35:53Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
