Repository navigation
Add a Moonraker backend for Klipper printers - #2
Merged
Merged
Conversation
PyFlat-JR
force-pushed
the
feature/moonraker
branch
from
October 8, 2026 17:24
e2f7634 to
b65f231
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds a Moonraker backend, so Klipper printers running Mainsail or Fluidd work like OctoPrint ones.
/server/info, which OctoPrint does not answer (Moonraker answers OctoPrint's/api/version, so that alone would not tell them apart). No sign-in when this computer is one of Moonraker'strusted_clients, otherwise Moonraker's API key, stored as a secret. Without a name the printer takes the host name of the machine running Klipper.server.infoand thenotify_klippy_*notifications, the printer objects from a subscription that only sends changed fields (MoonrakerStatus.Merge).print_stats.statechanging.extruder,extruder1andheater_bed, and a chamber asheater_generic chamber(settable) ortemperature_sensor chamber(read only).printer.gcode.scriptonly returns once the G-code ran.power-<device>. They have no change notification, so they are read every 2 s while there are any.moonraker.FakeMoonrakeris a Kestrel fake of the HTTP info endpoints and the websocket, and the backend passes the sharedBackendContractplus its ownMoonrakerTests.Checklist
dotnet buildanddotnet testpass locally (0 warnings, 188 tests).Printer/server tested against (if applicable)
Not yet on a real Klipper printer here. Written against the documented API (https://moonraker.readthedocs.io) and the fake. It ships to a closed tester group with Klipper printers first, through the Creator Portal, before a public release.