Commit Graph

127 Commits

Author SHA1 Message Date
Arksine d04a419a80 docs: Update documentation for 0.1 release
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-11 21:27:41 -04:00
Arksine e78a2e3e41 gcode_apis: handle restart exceptions
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>
2020-08-11 20:50:58 -04:00
Arksine 2c332a968f file_manager: require base paths be located within home directory
They however cannot be the home directory.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-11 20:34:20 -04:00
Arksine b3f02a73a4 extract_metadata: Improve error reporting
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-11 14:28:59 -04:00
Arksine 1d520310ac utils: update git describe arguments
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-11 14:28:59 -04:00
Arksine 7cd22804dd moonraker: replace legacy string interpolation with f-strings
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-11 14:28:41 -04:00
Arksine de1a79a7ca docs: update API documentation regarding file list notification
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-11 14:21:28 -04:00
Arksine 82fbee2bc0 test client: Update to handle new file list notification
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-11 14:21:27 -04:00
Arksine 7441da4b57 file_manager: refactor notify_filelist_changed()
This brings more consistency to the notification.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-11 14:21:27 -04:00
Arksine 6dc43f7e12 moonraker: replace "check_available" with "check_available_objects"
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>
2020-08-11 08:38:28 -04:00
Arksine 0775f3d0c6 moonraker: Connect to Klippy as a client
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-11 08:38:28 -04:00
Arksine e1addb16fd utils: remove unused SocketLoggingHandler
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-11 08:38:28 -04:00
Arksine 62e5f85473 moonraker: use tornado's iostream wrapper for klippy connection
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>
2020-08-11 08:38:28 -04:00
Arksine b92000dd46 moonraker: Use file_manager to update mutable endpoints
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-11 08:38:28 -04:00
Arksine a4638f6c21 moonraker: Improve connection error logging
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-11 08:38:28 -04:00
Arksine 0abfc76871 temperature_store: Add configparser support
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-11 08:38:28 -04:00
Arksine 470cc13b0e shell_command: Add configparser support
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-11 08:38:28 -04:00
Arksine 6b45c0c1d8 power: Add configparser support
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-11 08:38:28 -04:00
Arksine f114985dc6 paneldue: Add configparser support
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-11 08:38:28 -04:00
Arksine 52907155d2 machine: Add configparser support
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-11 08:38:28 -04:00
Arksine 5853f3f447 gcode_apis: Add configparser support
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-11 08:38:27 -04:00
Arksine 98b3c990e0 file_manager: Add configparser support
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-11 08:38:27 -04:00
Arksine e5cb27f5b7 authorization: Add configparser support
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-11 08:38:27 -04:00
Arksine de462b1d0f app: Add configparser support
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-11 08:38:27 -04:00
Arksine 7a94fb3a6b moonraker: Add configparser support
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>
2020-08-11 08:38:27 -04:00
Arksine e2850ee77e paneldue: fix incorrect default baudrate
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-05 21:10:30 -04:00
Arksine 9c76875896 file_manager: use print_stats to determine if an operation is safe
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-05 14:02:06 -04:00
Arksine d19737f4c5 moonraker: don't timeout requests to Klippy
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>
2020-08-05 11:20:26 -04:00
Arksine d235139e6b paneldue: use the new "print_stats" module to check printing state
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-05 11:20:26 -04:00
Arksine 4f97ebb28d test_client: Update to use new "print_stats" module
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-05 11:20:26 -04:00
Arksine f082d4dd44 paneldue: Update to fetch status from Klipper's print_stats object
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-05 11:20:26 -04:00
Arksine 89fa9ba47e gcode_apis: update "print start" API to use SDCARD_PRINT_FILE gcode
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-05 11:20:26 -04:00
Arksine 65d82a3fe8 docs: update config file APIs
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-05 11:17:17 -04:00
Arksine 43d54f078e file_manager: Restrict full access to "gcodes" and "config" paths
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-05 11:05:55 -04:00
Arksine 72bba79830 test client: update to reflect config file refactoring
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-05 11:05:55 -04:00
Arksine d572a13655 file_manager: refactor config file handling
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>
2020-08-05 11:05:00 -04:00
Arksine e93e4521a4 websockets: don't alter dictionary during iteration of "view"
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-04 11:32:42 -04:00
Arksine 6c69dbdca9 moonraker: fix load_plugin()
Respect the default parameter if a plugin's path is not found.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-04 11:32:42 -04:00
Arksine d768a30d47 temperature_store: remove stale temperature sensors from the "last_temps" dict
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-04 11:32:42 -04:00
Arksine 4191aac63f moonraker: remove unnecessary "check_ready" request.
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>
2020-08-01 08:28:35 -04:00
Arksine 0d29d0f811 docs: Add documentation for new file_management changes
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-01 06:05:19 -04:00
Arksine f0e388ccdc file_manager: Add support for config examples
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-01 06:05:19 -04:00
Arksine c14221a7c7 app: Add mimetype for .cfg files
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2020-08-01 06:05:19 -04:00
Arksine ad127ce2a9 test_client: modify for new fersion of "file_list_changed" notification
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-01 06:05:19 -04:00
Arksine b6f8ba775c file_manager: implement file_list_changed notifcation
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>
2020-08-01 06:05:19 -04:00
Arksine 829dd27aa2 test_client: add support for configuration file transfer
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-01 06:05:19 -04:00
Arksine e0fb261c12 file_manager: refactor upload logic
Break gcode and config file uploads into their own functions.  Add a 'primary_config' argument to config file uploads.  If set to true, the upload will overwrite printer.cfg.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-01 06:05:19 -04:00
Arksine 345229c928 test client: Add additional text box for Websocket API tests
Arguments are now specified in the secondary box, using JSON format without brackets.
2020-08-01 06:05:19 -04:00
Arksine 8b5c8786b4 file_manager: Verify that uploads are not written to folders outside of the "base" directory
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-01 06:05:19 -04:00
Arksine 9743772b45 file_manager: Add support for configuration files
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-01 06:05:19 -04:00