Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Power on gcode #71

Closed
wormiedk opened this issue Jan 21, 2021 · 8 comments
Closed

Feature request: Power on gcode #71

wormiedk opened this issue Jan 21, 2021 · 8 comments

Comments

@wormiedk
Copy link

My printer uses UART communication with the drivers which means that klipper has to be restarted after a power cycle. Further the printer is not powered from USB so the port dissapears when the printer is off.

It would be great if this could be included in the startup code from my slicer, e.g. by using a macro. I tried the following macro:

[gcode_macro POWER_ON_PRINTER]
gcode:
{action_call_remote_method("set_device_power",
device="printer",
state="on")}
RESTART

However when I try issuing the command I get a response that moonraker cannot connect to klippy and therefrore neither fluid or moonsail allows me to issue the command.

@Arksine
Copy link
Owner

Arksine commented Jan 24, 2021

This isn't possible. Klipper cannot execute gcode macros when it is in the shutdown state, this is part of the reason why Moonraker has a "power" plugin. You will have to toggle power from Fluidd.

@wormiedk
Copy link
Author

Would it be possible for the power plug-in to issue a restart command after a short delay when the printer is powered on?

@Arksine
Copy link
Owner

Arksine commented Jan 24, 2021

It could perhaps be made an option. I'll look into it.

@wormiedk
Copy link
Author

That would be great. Maybe also a shutdown command :)

@Arksine
Copy link
Owner

Arksine commented Jan 24, 2021

Klipper will automatically enter shutdown when the mcu is disconnected

@dushyantahuja
Copy link

dushyantahuja commented Jan 25, 2021 via email

@Arksine
Copy link
Owner

Arksine commented Jan 27, 2021

It is now possible to configure a [power] device to perform a FIRMWARE_RESTART after power on. See the restart_klipper_when_powered and restart_delay options in configuration.md.

@Arksine Arksine closed this as completed Jan 27, 2021
@dushyantahuja
Copy link

dushyantahuja commented Jan 27, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants