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

Power device: add option to run custom gcode on on/off action #860

Open
PhilippMolitor opened this issue May 21, 2024 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@PhilippMolitor
Copy link

Is your feature request related to a problem? Please describe

When I power my device up or down (in my case, the 24V supply for motors and heaters), I want to have an option to run custom gcode before shutting off, and after turning on.

Describe the solution you'd like

Add the following options to any power device:

# macro block to execute after turning on the power device
on_gcode_gcode:
  MY_CUSTOM_OFF_MACRO
  M83
# run this macro 3 seconds after turning on
on_gcode_delay: 3
# macro block to execute after turning off the power device
on_gcode_gcode:
  MY_CUSTOM_ON_MACRO
  SOME_OTHER_MACRO
# run this macro 3 seconds before turning off
on_gcode_delay: 3

Describe alternatives you've considered

Adding a second power device for klipper does not seem reasonable, as I have to switch on two different devices then in the correct order.

Additional information

No response

@PhilippMolitor PhilippMolitor added the enhancement New feature or request label May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant