Files
OrcaSlicer/src/libslic3r
packerlschupfer a529f8c473 Print Host: add Moonraker (Klipper) host type (#13991)
OrcaSlicer currently ships an "Octo/Klipper" host type that maps to the
OctoPrint REST endpoints (api/version, api/files/local). It works for
Klipper setups that run Moonraker with the OctoPrint-emulation plugin,
but native Moonraker — and Moonraker-compatible firmwares like the
Prusa-Firmware-Buddy buddy-klipper fork — speak a different shape:
distinct paths, JSON body for /printer/print/start, {"result":...}
envelope. There's no host type for that today.

Add a new Moonraker class deriving from PrintHost. Endpoints used,
matching the Moonraker spec:

- GET  /server/info                      — connection test, reads
                                            result.klippy_state
- GET  /server/files/roots               — storage-picker dropdown
                                            (returns roots with 'w'
                                            permission); gracefully
                                            degrades if absent
- POST /server/files/upload (multipart)  — upload (form fields:
                                            file, root)
- POST /printer/print/start (json)       — {"filename":"<path>"}; the
                                            filename is whatever the
                                            upload response returned
                                            in result.item.path, so any
                                            server-side rename
                                            (collision suffix etc.) is
                                            respected. JSON body is
                                            built via property_tree
                                            write_json so exotic
                                            characters in the path are
                                            properly escaped.

Auth: X-Api-Key header, only when printhost_apikey is non-empty
(Moonraker can be configured to require it but doesn't by default).
HTTP Basic / Digest are not part of the Moonraker spec and are not
sent.

Storage root is read from upload_data.storage with "gcodes" as the
fallback default, so the existing storage-picker plumbing in
PrintHostDialogs lights up automatically once enumerable roots are
returned.

UI: registers as the "Moonraker (Klipper)" entry under host_type;
selectable via the existing Physical Printer dialog (sidebar's
connection button on the printer card).

Verified against a Prusa-Firmware-Buddy buddy-klipper fork (firmware
identifies as moonraker_version "0.8.0-prusalink-shim"): /server/info
test, multipart upload to /server/files/upload, and JSON
/printer/print/start all work end-to-end. The existing "Octo/Klipper"
entry is left untouched so users currently relying on Moonraker's
OctoPrint-emulation plugin keep working.
2026-06-06 11:12:42 +08:00
..
2026-06-03 10:19:04 -03:00
2024-10-05 21:53:16 +03:00
2026-05-10 02:21:13 +08:00
2026-03-24 09:18:38 -07:00
2026-03-13 02:12:10 -07:00
2026-03-13 02:12:10 -07:00
2023-12-01 10:42:45 +00:00
2024-08-22 10:13:45 +03:00
2025-06-14 21:05:25 +08:00
2026-04-23 00:21:19 +08:00
2025-10-28 15:29:47 +08:00
2026-03-24 09:18:38 -07:00
2026-03-24 09:18:38 -07:00
2024-01-26 20:18:10 +08:00
2023-12-01 10:42:45 +00:00
2024-05-12 23:35:41 +08:00
2025-10-28 15:29:55 +08:00
2026-03-24 09:18:38 -07:00
2025-09-18 17:08:18 +08:00
2025-09-18 17:08:18 +08:00
2025-12-08 22:42:11 +08:00
2026-03-13 01:56:51 -07:00
2026-03-13 01:56:51 -07:00
2024-01-26 20:18:10 +08:00
2026-03-13 01:56:51 -07:00
2026-03-24 09:18:38 -07:00
2026-05-04 15:52:34 +08:00
2026-03-13 01:56:51 -07:00
2026-03-13 01:56:51 -07:00
2025-12-08 22:42:11 +08:00
2026-05-10 02:21:13 +08:00
2023-11-04 11:41:03 +08:00
2025-11-18 19:50:48 -05:00
2026-01-29 19:19:37 +08:00
2026-01-23 17:05:56 +08:00
2025-12-08 22:42:11 +08:00
2025-12-08 22:42:11 +08:00
2026-05-04 20:33:13 +08:00