Actions

For all actions, you can specify a target property to specify the device to send the action to.

target:
  device_id: a1b2c3d4e5f6g7h8i9j0

Send Command

actionbambu_lab.extrude_retractrequired

Sends arbitrary GCODE to the printer. Be careful as it does not check if the printer is running a job or not so before invoking this action, you should check the printer state to ensure it is not running a job.

action: bambu_lab.send_command
target:
  device_id: a1b2c3d4e5f6g7h8i9j0
data:
  command: M104 S200

The data object should contain the following properties:

commandstringrequired

The command to perform, e.g. M104 S200

Print 3MF project file

actionbambu_lab.print_project_filerequired

Prints 3MF file stored on SD card. 3MF file must be stored on SD card root and it must contain gcode (e.g., "Export sliced file" from slicer)

action: bambu_lab.print_project_file
target:
  device_id: a1b2c3d4e5f6g7h8i9j0
data:
  type: Extrude
  force: false

The data object should contain the following properties:

filepathstringrequired

Filename on SD card (e.g. test.3mf)

platenumberoptional

Plate number to print

timelapsebooleanoptional

Record timelapse of the print

bed_levelingbooleanoptional

Perform bed leveling before print

flow_calibooleanoptional

Perform flow calibration before print

vibration_calibooleanoptional

Perform vibration calibration (aka XY Mech Sweep) before print

layer_inspectbooleanoptional

Perform first layer inspection during print

use_amsbooleanoptional

Use AMS for print. Uses external spool otherwise

Extrude or Retract Filament

actionbambu_lab.extrude_retractrequired

Extude or retract filament.

action: bambu_lab.extrude_retract
target:
  device_id: a1b2c3d4e5f6g7h8i9j0
data:
  type: Extrude
  force: false

The data object should contain the following properties:

typestringrequired

The type of action to perform. Can be Extrude or Retract.

forcebooleanoptional

Perform extrusion or retraction if nozzle temperature is below 170ºC.

Load Filament

actionbambu_lab.load_filamentrequired

Extude or retract filament.

action: bambu_lab.load_filament
target:
  device_id: a1b2c3d4e5f6g7h8i9j0
data:
  tray: 1
  external_spool: 1
  temperature: 220

The data object should contain the following properties:

traynumberrequired

The tray number to load filament from.

external_spoolnumberoptional

Load filament from the external spool. Enabling the external spool will override the AMS tray value if also set.

temperaturenumberoptional

Target nozzle temperature once the filament is loaded. By default uses the midpoint between min and max temperature of the chosen filament.

Unload Filament

actionbambu_lab.load_filamentrequired

Unload filament from the nozzle.

action: bambu_lab.unload_filament
target:
  device_id: a1b2c3d4e5f6g7h8i9j0

Move Axis

actionbambu_lab.move_axisrequired

Move the printer axis.

action: bambu_lab.move_axis
target:
  device_id: a1b2c3d4e5f6g7h8i9j0
data:
  axis: X
  distance: 10

The data object should contain the following properties:

axisstringrequired

The axis to move. X1 and P1 devices, X and Y move the printhead, Z moves the bed. A1, Z moves the gantry, Y the bed, X the printhead.

distancenumberrequired

The distance (in mm) to move the axis A negative distance moves Z up, X left, Y forward.

Skip Objects

actionbambu_lab.move_axisrequired

Move the printer axis.

action: bambu_lab.skip_objects
target:
  device_id: a1b2c3d4e5f6g7h8i9j0
data:
  objects: 409,1463

The data object should contain the following properties:

objectsstringrequired

Object IDs are available from printable objects entity attributes