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
action
bambu_lab.extrude_retract
required
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:
command
string
required
The command to perform, e.g. M104 S200
Print 3MF project file
action
bambu_lab.print_project_file
required
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:
filepath
string
required
Filename on SD card (e.g. test.3mf
)
plate
number
optional
Plate number to print
timelapse
boolean
optional
Record timelapse of the print
bed_leveling
boolean
optional
Perform bed leveling before print
flow_cali
boolean
optional
Perform flow calibration before print
vibration_cali
boolean
optional
Perform vibration calibration (aka XY Mech Sweep) before print
layer_inspect
boolean
optional
Perform first layer inspection during print
use_ams
boolean
optional
Use AMS for print. Uses external spool otherwise
ams_mapping
boolean
optional
Extrude or Retract Filament
action
bambu_lab.extrude_retract
required
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:
type
string
required
The type of action to perform. Can be Extrude
or Retract
.
force
boolean
optional
Perform extrusion or retraction if nozzle temperature is below 170ºC.
Load Filament
action
bambu_lab.load_filament
required
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:
tray
number
required
The tray number to load filament from.
external_spool
number
optional
Load filament from the external spool. Enabling the external spool will override the AMS tray value if also set.
temperature
number
optional
Target nozzle temperature once the filament is loaded. By default uses the midpoint between min and max temperature of the chosen filament.
Unload Filament
action
bambu_lab.load_filament
required
Unload filament from the nozzle.
action: bambu_lab.unload_filament
target:
device_id: a1b2c3d4e5f6g7h8i9j0
Move Axis
action
bambu_lab.move_axis
required
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:
axis
string
required
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.
distance
number
required
The distance (in mm) to move the axis A negative distance moves Z up, X left, Y forward.
Skip Objects
action
bambu_lab.move_axis
required
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:
objects
string
required
Object IDs are available from printable objects entity attributes