# Problems switching on the printer with moonraker

**URL:** <https://klipper.discourse.group/t/problems-switching-on-the-printer-with-moonraker/21271>\
**Category:** General Discussion\
**Created:** [January 10, 2025, 2:48pm UTC](https://klipper.discourse.group/t/problems-switching-on-the-printer-with-moonraker/21271 "2025-01-10T14:48:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ruesti](https://avatars.discourse-cdn.com/v4/letter/r/b38774/32.png) [@Ruesti](https://klipper.discourse.group/u/Ruesti)\
**Post date:** [January 10, 2025, 2:48pm UTC](https://klipper.discourse.group/t/problems-switching-on-the-printer-with-moonraker/21271/1 "2025-01-10T14:48:00Z")

</div>

Hi  
I am new to the Klipper world and i´m curious to find out more. I have installed Klipper on a Creality Ender3 S1 PRO. Mainsail OS and moonraker are on a raspberry pi 4. This combination worked fine from the beginning. Now I want to control a Relay from my raspberryPi to switch the PSU from my Printer on and off. With a bit effort I got this running. The only thing whats left ist to switch off the PSU after printing via GCode. I´m sure this is a common procedure but I can´t find any suitable informations. I also asked the all Mighty ChatGPT and he also dont´t know a solution ;-).  
What I have in moonraker.conf:  
[power printer]  
type: gpio  
pin: gpiochip0/gpio21 # Der gewünschte GPIO-Pin  
active\_high: true # Wenn true, schaltet 1 den Pin ein  
initial\_state: off  
name: PSU  
gave me an option in the “Power Section” in right upper corner to switch my PSU on and off. Strabgely the Name of my PSU in the list ist not PSU but instead printer. I tried out so many things that I found in the Internet but none of them worked for me. As soon as I write something in the printer.conf my PSU Button stops working or Klipper reports a problem or… Has someone a hint for me what to do.

Uli  
[klippy.zip](https://klipper.discourse.group/uploads/short-url/4lRPBr2nNp9bteLRMD7iANitXow.zip) (2.1 MB)

---

<div class="post-metadata">

**Author:** ![Sineos](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/sineos/32/18_2.png) [@Sineos](https://klipper.discourse.group/u/Sineos)\
**Post date:** [January 10, 2025, 3:32pm UTC](https://klipper.discourse.group/t/problems-switching-on-the-printer-with-moonraker/21271/2 "2025-01-10T15:32:45Z")

</div>

See [Configuration - Moonraker](https://moonraker.readthedocs.io/en/latest/configuration/#power)

You will need to use a “smart plug”, such as TP-Link, Shelly, or Tasmota, that can cut the mains power to the PSU.

---

<div class="post-metadata">

**Author:** ![Ruesti](https://avatars.discourse-cdn.com/v4/letter/r/b38774/32.png) [@Ruesti](https://klipper.discourse.group/u/Ruesti)\
**Post date:** [January 10, 2025, 4:30pm UTC](https://klipper.discourse.group/t/problems-switching-on-the-printer-with-moonraker/21271/3 "2025-01-10T16:30:34Z")

</div>

As said… This is already funktionable. I have an SSR on GPIO pin 21 of the raspberry pi

---

<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 11, 2025, 4:31pm UTC](https://klipper.discourse.group/t/problems-switching-on-the-printer-with-moonraker/21271/4 "2025-03-11T16:31:33Z")

</div>

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