This allows users to specify a "confirmed_macros" that wil pop up a message box requiring confirmation before proceeding. Useful for restart and firmware_restart to prevent accidental execution.
Also do not raise an exception when Klippy disconnects after a restart or firmware_restart.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
The make_request() method is now awaitable and returns the result directly vs the previous behavior of returning a request that was awaited.
There is no longer a need to check the result to see if it is an error, exceptions are raised if an error is detected.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
It is expected that the Klippy will disconnect when a restart request is sent. Handle those exceptions so they return an acknowledgement.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
There "check_available" endpoint no longer exists in Klippy, so use "objects/list" instead. If Klippy is not properly configured Moonraker will log the result.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This reduces the amount of code needed to handle the connection and adds more robust error handling. This also prepares moonraker for the eventual transition of Klippy hosting the server socket.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Rather than receive its configuration from Klippy, moonraker will receive its configuration from a config file. By default this file is located at ~/moonraker.conf.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Klippy requests typically only timeout when the connection between Klippy and the Server is disconnected. Rather returning a timeout, send an error if there are any pending requests when a disconnection is detected.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Remove the "primary_config" option from the upload handler, as we no longer allow writes to printer.cfg unless it is located in the config path. We now assume that the config path is the main config, so all files there are located at /server/files/config/*.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
There is no longer a need for Moonraker to check in with Klippy's `moonraker/check_ready` request. It can now simply check in with the "info" request.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This notification is moved from moonraker.py. Instead of sending a filelist, it now updates the file list and sends all relevant information to the client.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>