mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-05-09 00:08:34 +02:00
[GH-ISSUE #1139] [Feature]: Macros and Terminal view #819
Labels
No labels
A1
automated
automated
bug
bug
Closed due to inactivity
contrib
dependencies
dependencies
duplicate
enhancement
feedback
hold
invalid
Notes
P1S
pull-request
security
ThumbsUp
user-report
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/bambuddy-maziggy-1#819
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Keybored02 on GitHub (Apr 26, 2026).
Original GitHub issue: https://github.com/maziggy/bambuddy/issues/1139
Originally assigned to: @Keybored02 on GitHub.
Problem or Use Case
I have been experimenting with ways to include a Klipper-inspired macro support, with a dedicated terminal view. I would like to report back on few aspects and gather some feedback before continuing. I'm going to focus on the workflow aspect more than the technical one.
Proposed Solution
Macros
Currently, macros are implemented on top of the Jinja2 language, similarly to what Klipper does. This allow logic handling that goes beyond simple Gcode commands:

Macros are not all defined in dedicated file, but instead are all saved in DB directly. This is mostly due to the fact that unlike Klipper, Bambuddy does not have a strong file-based flow, but relies mostly on DB instead.
The current UI shows a dedicated item per each macro. Item name is the macro name, which is also the function call name. It has to be unique.
Each Macro can be expanded to show a code editor, specific settings, and a run history of that macro.
A macro that includes sub-macros would need all the child functions to be defined individually. This works fine for small setups with quickly falls off for more complex functions. I would probably rework this aspect
Should definitions be moved to a .cfg file and parsed/handled in the UI like Klipper does? This means:
Macros can be triggered from multiple points:
; MACRO: namecomment lines. Any macros found are triggered after archiving completes)What other sources would be handy to have?
Terminal
A Terminal page allows to quickly run commands and macros. It allows target machine selection with @printer_name, or global with @ all. When set on a single printer, it shows the progress of macros running for that machine.
A dedicated Terminal page isn't really the best option. It would make sense to relegate it to an icon at the top of Printers to access a global terminal, and a second button on each printer card to launch a terminal aimed at that printer.
Thoughts on this?
Parameters
Commands can be:
AMS_DRYING,NOTIFY,WAIT, etc.)The built-in system commands are essentially API wrappers for existing BB functions. This could still use some polishing and a better auto-import flow. I'm still not sure how to integrate this aspect of macro execution with the current backend. This will need a dedicated discussion.
Additional considerations
These are probably the most important questions:
I'm glossing over a lot on how commands are parsed, gcodes whitelisted, sent, errors collected, and how everything integrates with the backend for scheduling and execution. This is mostly due to the already huge scope of the feature.
I would like to hear feedbacks on the concept before I move forward.
Alternatives Considered
No response
Feature Category
Other
Priority
Would improve my workflow
Mockups or Examples
No response
Contribution
Checklist