Skip to content

printer: macro passthrough and per-model alias commands (U1, K1 SE, Klipper) #718

Closed

Description

@alex-mextner

What

Add macro list/run (identifier-only names, access, idle and trusted-list gates, dry-run) and a registry-driven alias layer. U1 macro facts come from the u1-klipper firmware config (lava/fluidd.cfg); the creality-stock adapter has no G-code channel; Bambu and Prusa have no adapters, out of scope.

Why (motivation)

Driving macros and typical operations on the U1 and K1 SE needs hand-written HTTP today; the printer command has no passthrough or shortcuts

User impact

The owner can home, level, load filament, preheat or park the Snapmaker U1 and the K1 SE with one short command instead of opening the web UI, and cannot accidentally send a move to a printer that is mid-print.

Cost of inaction

Macro calls stay ad-hoc curl or Fluidd clicks that bypass the access and busy-printer safety rules

Acceptance criteria

  • 3d printer macro list and macro run work against a fake Moonraker: discovery, params, dry-run, refusals (offline, read-only, busy, injection) — forced: tests/test_printer_macros.py + tests/e2e/test_printer_macros_workflows.py: macro list/run against fake Moonraker: discovery, params, dry-run, refusals (offline, read-only, busy, injection); PR feat(printer): macro passthrough and per-model alias commands #721 CI green
  • alias subcommands resolve per adapter, model and per-printer aliases, and say clearly when an alias is unsupported on a model — forced: tests/test_printer_macros.py: aliases resolve per adapter, model and per-printer table, unsupported alias on a model says so (e2e aliases listing/help); CI green
  • help text and docs/commands/printer.md are in sync; ruff, mypy and pytest pass — forced: docs/commands/printer.md and 3d printer --help carry macro/aliases; ruff, mypy and full pytest green in the commit hook and CI

Screenshots

(none)

Deploy

Deployed: no

Links

Skipped gates

  • links: plain-text names, no URLs
  • screenshots: CLI only, no UI

Activity

  1. alex-mextner commented on Nov 5, 2026

    @alex-mextner
    OwnerAuthor

    Shipped: merged via #721.
    Merge commit: e04da56
    This does NOT close the ticket — acceptance still needs proof. Run task read #718 for the outstanding criteria, then task check/task done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions