Add control_print to the edge command set
Pause, resume and stop, as one variant carrying a verb rather than three near-identical ones - matching the gateway's `PrintControl`, which exists so there is one method across four vendor implementations instead of three. Confirmed live on a P1P (2026-10-11), which is also where the two warnings in the description come from. A stop is a cancel and is not undoable: the printer reports the cancelled print as FAILED. And `result: "success"` from the printer means the command was accepted, not that anything changed - all three verbs answered success while it sat IDLE with nothing to pause - so a caller that needs to know the state changed has to read telemetry back. The enum is `pause|resume|stop` and deliberately not `cancel`, even though `cancel` is Moonraker's word and the Klipper implementation behind this does send a cancel. A verb only one vendor recognises must not validate on the wire. The "no start a print variant" note stays, with its reason corrected: starting an uploaded file has now been confirmed by hand, so what is missing is the path around it - nothing uploads a sliced file to a gateway and nothing decides which printer runs which job.
This commit is contained in:
@@ -72,6 +72,23 @@ export const PrinterCommandSchema = Type.Union([
|
||||
*/
|
||||
percent: Type.Integer({ minimum: 0, maximum: 100 }),
|
||||
}),
|
||||
Type.Object({
|
||||
action: Type.Literal("control_print"),
|
||||
/**
|
||||
* Confirmed live on a P1P (2026-10-11). Beware what the printer's
|
||||
* acceptance means: all three answered `success` while it was IDLE with
|
||||
* nothing to pause, so confirmation that the state actually changed has
|
||||
* to come from telemetry, not from the command result.
|
||||
*
|
||||
* `stop` is a cancel and cannot be undone - a Bambu reports the
|
||||
* cancelled print as `FAILED`.
|
||||
*/
|
||||
control: Type.Union([
|
||||
Type.Literal("pause"),
|
||||
Type.Literal("resume"),
|
||||
Type.Literal("stop"),
|
||||
]),
|
||||
}),
|
||||
Type.Object({
|
||||
action: Type.Literal("send_gcode_line"),
|
||||
/** The most powerful variant by far; be careful about exposing it to a UI. */
|
||||
|
||||
Reference in New Issue
Block a user