Wait for the printer
wait_for_printerWait until the printer reaches a point in a print, checking every 5 seconds. Returns as soon as it happens (met: true), or at the timeout with the latest status (met: false).
Instructions
Wait until the printer reaches a point in a print, checking every 5 seconds. Returns as soon as it happens (met: true), or at the timeout with the latest status (met: false). It also returns early, with stopped_early saying why, when the printer reports a fault, when the job ends before the point it waits for (a cancelled print, say), or after losing contact ("Lost contact with the printer"). A job that completes successfully while the wait is for 'printing' or 'first_layer_done' counts as met (a one-layer print passes both at once). A met result can carry stopped_early too, for example a job that finished with an error. Waiting for 'finished' when nothing is printing returns at once with the note 'nothing is printing'. Read-only: it never sends commands.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| until | Yes | What to wait for. 'heated': every heater with a target is within 3 °C of it. 'printing': extrusion has started. OctoPrint reports no extrusion, so there it means the job is running with the heaters at temperature. 'first_layer_done': the second layer has begun (Klipper only); without layer info from the slicer it is judged from the nozzle height, so it is approximate. 'finished': the job completed, was cancelled or errored. | |
| timeout_s | No | Seconds to wait before returning the latest status. Default 300, at most 1800. Call again to keep waiting. |