Actions
For all actions the target device or entity is passed as a data field. In actions involving an AMS or external spool tray, this must be the tray entity id. In all other cases a device id.
data:
device_id: a1b2c3d4e5f6g7h8i9j0
data:
entity_id: a1b2c3d4e5f6g7h8i9j0
Send Command
actionbambu_lab.extrude_retractrequiredSends 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
data:
device_id: a1b2c3d4e5f6g7h8i9j0
command: M104 S200
The data object should contain the following properties:
commandstringrequiredThe command to perform, e.g. M104 S200
Print 3MF project file
actionbambu_lab.print_project_filerequiredPrints 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
data:
device_id: a1b2c3d4e5f6g7h8i9j0
filepath: cache/filename.3mf
plate: 1
timelapse: true
bed_leveling: false
flow_cali: false
vibration_cali: false
layer_inspect: false
ues_ams: true
ams_mapping: -1,-1,2,-1
The data object should contain the following properties:
filepathstringrequiredFilename on SD card (e.g. test.3mf)
platenumberoptionalPlate number to print
timelapsebooleanoptionalRecord timelapse of the print
bed_levelingbooleanoptionalPerform bed leveling before print
flow_calibooleanoptionalPerform flow calibration before print
vibration_calibooleanoptionalPerform vibration calibration (aka XY Mech Sweep) before print
layer_inspectbooleanoptionalPerform first layer inspection during print
use_amsbooleanoptionalUse AMS for print. Uses external spool otherwise
ams_mappingbooleanoptionalExtrude or Retract Filament
actionbambu_lab.extrude_retractrequiredExtude or retract filament.
action: bambu_lab.extrude_retract
data:
device_id: a1b2c3d4e5f6g7h8i9j0
type: Extrude
force: false
The data object should contain the following properties:
typestringrequiredThe type of action to perform. Can be Extrude or Retract.
forcebooleanoptionalPerform extrusion or retraction if nozzle temperature is below 170ºC.
Load Filament
actionbambu_lab.load_filamentrequiredExtude or retract filament.
action: bambu_lab.load_filament
data:
entity_id: a1b2c3d4e5f6g7h8i9j0
temperature: 220
The data object should contain the following properties:
temperaturenumberoptionalTarget nozzle temperature once the filament is loaded. If not set, uses the midpoint between min and max temperature of the current filament.
Unload Filament
actionbambu_lab.load_filamentrequiredUnload filament from the nozzle.
action: bambu_lab.unload_filament
data:
device_id: a1b2c3d4e5f6g7h8i9j0
Set Filament
actionbambu_lab.set_filamentrequiredSets filament type and other data for an AMS tray or the external spool tray.
action: bambu_lab.set_filament
data:
entity_id: a1b2c3d4e5f6g7h8i9j0
tray_info_idx: GFL96
tray_color: FF00FF00
tray_type: PLA
nozzle_temp_min: 190
nozzle_temp_max: 240
The data object should contain the following properties:
tray_info_idxstringrequiredBambu's filament ID. E.g. GFL96 is Generic PLA Silk
tray_colorstringrequiredRGBA value for the color. E.g. FF0000FF is opaque red.
tray_typestringrequiredType of filament. E.g. 'PLA' or 'PETG'
nozzle_temp_minnumberrequiredThe minimum temperature that it is recommended to print this filament at.
nozzle_temp_maxnumberrequiredThe maximum temperature that it is recommended to print this filament at.
Get Filament Data
actionbambu_lab.get_filament_datarequiredGets a json string with details about all known filaments
action: bambu_lab.get_filament_data
data:
device_id: a1b2c3d4e5f6g7h8i9j0
Move Axis
actionbambu_lab.move_axisrequiredMove the printer axis.
action: bambu_lab.move_axis
data:
device_id: a1b2c3d4e5f6g7h8i9j0
axis: X
distance: 10
The data object should contain the following properties:
axisstringrequiredThe 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.
distancenumberrequiredThe distance (in mm) to move the axis A negative distance moves Z up, X left, Y forward.
Skip Objects
actionbambu_lab.move_axisrequiredMove the printer axis.
action: bambu_lab.skip_objects
data:
device_id: a1b2c3d4e5f6g7h8i9j0
objects: 409,1463
The data object should contain the following properties:
objectsstringrequiredObject IDs are available from printable objects entity attributes
Read AMS RFID target
actionbambu_lab.read_rfidrequiredRead the RFID tag on a Bambu spool Triggers the AMS to attempt to re-read the RFID tag on the current spool. You must provide the AMS tray entity.
action: bambu_lab.ams_read_rfid
data:
entity_id: a1b2c3d4e5f6g7h8i9j0
Start the AMS filament drying
actionbambu_lab.start_filament_dryingrequiredStarts AMS filament drying.
action: bambu_lab.start_filament_drying
data:
device_id: a1b2c3d4e5f6g7h8i9j0
temp: 65
rotate_tray: false
duration: 12
The data object should contain the following properties:
tempnumberrequiredHeating temperature. AMS 2 max is 65C. AMS HT max is 85C.
rotate_traybooleanrequiredRotate tray while drying
durationnumberrequiredDrying time in hours.