This allows moonraker plugins to look up the stored info without needing to make an addition "info" request to Klippy.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Only load the plugin for each prefix section once. Plugins themselves will be responsible for parsing the configuration from each prefix section.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This allows clients to "unsubscribe"by sending an empty dict. Each client will receive updates only for subscribed objects.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This allows regsitered methods to be coroutines. Execution is done on the event loop to prevent a coroutine from blocking the incoming command queue.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This method provides basic server information, such as loaded plugins and the state of the UDS connection to Klippy.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Now that the file_manager directly handles DELETE file requests, it is not necessary have the HTTP file handler perform any checks. Thus it is no longer required to pass a "can_delete" parameter.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Attempt to reconnect every 250ms when disconnected. Once connected, attempt to initialize every 250ms.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Logging to a file has the potential to block a the main thread, a QueueLogger resolves this by forwarding logging request to a secondary thread.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This optimized version should initialize faster as it doesn't rely on an additional Periodic Callback when Klippy is detected as ready.
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>
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>
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>
This logging may be useful in helping users troubleshoot problems stemming from Klippy based errors.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Sensor information is no longer provided by the response to the "check_ready" remote procedure call. The temperature store now fetches the sensor data itself and sets up the subscription.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>