Repository navigation
Bridge voronFDM to Moonraker only once Moonraker has identified Klipper - #126
Merged
Merged
Conversation
Between "Websocket Opened" and the end of its Klippy handshake Moonraker has not registered the printer.* methods yet and answers them with "Method not found". That window is milliseconds on an idle host and seconds on a loaded one, and voronFDM, refused on its subscribe and its first gcode, answers with printer.firmware_restart. Measured 2026-09-05 on the dev printer during a boot with the post-update setup running in the background: Moonraker listening at 64 s, voronFDM's requests refused at 65-66 s, two FIRMWARE_RESTARTs at 66.7 s and 66.9 s (the second one an internal error inside the first), Klipper back at 82 s, the panel some 40 s later than it needed to be. No kit script and no KAOS macro sends that command; the request strings are in the display binary. The relay now polls /server/info and makes the bridge only once klippy_state is ready, error or shutdown -- an error is exactly what the panel must be allowed to show. Past UP_WAIT (now 120 s) it bridges regardless, so a Klipper that never comes up still cannot take the display with it. voronFDM is held, not refused, as before: it never retries a refused connection. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
Symptom: on a loaded boot the display comes up some 40 s late because Klipper restarts once, unasked.
Measured 2026-09-05 on the dev printer (boot with the post-update setup running in the background): Moonraker listening at 64 s; voronFDM's
printer.objects.subscribeand its firstprinter.gcode.scriptrefused with Method not found at 65–66 s, because Moonraker had not finished identifying Klipper and had not registered theprinter.*methods yet; twoFIRMWARE_RESTARTs at 66.7 s and 66.9 s (the second an internal error inside the first); Klipper back at 82 s. No kit script and no KAOS macro sends that command; the request strings are in the display binary.Change:
scripts/wsrelay/relay.pypolls/server/infoand makes the bridge only onceklippy_stateisready,errororshutdown(an error is exactly what the panel must be allowed to show). PastUP_WAIT, now 120 s, it bridges regardless, so a Klipper that never comes up cannot take the display with it. voronFDM is held, not refused, as before.Delivery:
optimize-boot.shalready refreshes~/wsrelay/relay.pyfrom the kit when it differs, active after the next boot.Checks:
py_compileclean; the readiness poll is exception-safe (any failure keeps waiting, the cap ends the wait).🤖 Generated with Claude Code