From 65e76aeec8c81481fdd587b046504d63dff52870 Mon Sep 17 00:00:00 2001 From: Eric Callahan Date: Sat, 26 Feb 2022 08:38:36 -0500 Subject: [PATCH] docs: document remote methods registered by machine The "reboot_machine" and "shutdown_machine" remote methods may be called from a Klipper gcode macro to accomplish their respective tasks. Signed-off-by: Eric Callahan --- docs/configuration.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/configuration.md b/docs/configuration.md index 5f0738c..a2e8837 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -119,6 +119,23 @@ provider: systemd_dbus Alternatively it may be possible to enable the `systemd-logind` service, consult with your distro's documentation. +#### Reboot / Shutdown from Klipper + +It is possible to call the `shutdown_machine` and `reboot_machine` +remote methods from a gcode macro in Klipper. For example: + +```ini +# printer.cfg + +[gcode_macro SHUTDOWN] +gcode: + {action_call_remote_method("shutdown_machine")} + +[gcode_macro REBOOT] +gcode: + {action_call_remote_method("reboot_machine")} +``` + ### `[database]` The `database` section provides configuration for Moonraker's lmdb database.