preflight_check
Run pre-print safety checks to confirm the printer is connected, idle, error-free, and within safe temperature limits. Optionally validate material and file readiness.
Instructions
Run pre-print safety checks to verify the printer is ready.
Checks performed:
- Printer is connected and operational
- Printer is not currently printing
- No error flags are set
- Temperatures are within safe limits
- (Optional) Material loaded matches expected material
- (Optional) Local G-code file is valid and readable
- (Optional) Remote file exists on the printer
Args:
file_path: Optional path to a local G-code file to validate before
upload. If omitted, only printer-state checks are performed.
expected_material: Optional material type (e.g. "PLA", "ABS", "PETG").
If provided and a material is loaded, checks for a mismatch.
remote_file: Optional filename to verify exists on the printer.
If provided, checks the printer's file list for a matching file.
accept_paused: When ``True``, the ``printer_idle`` check accepts
the ``paused`` state in addition to ``idle``. Used by
``start_print(resume_from_paused=True)`` for mid-print
resume 3MFs (which start from a paused-state printer).
Default ``False`` — only ``idle`` is accepted.
Call this before ``start_print()`` to catch problems early. The result
includes a ``ready`` boolean and detailed per-check breakdowns.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | No | ||
| remote_file | No | ||
| accept_paused | No | ||
| expected_material | No |