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.send_commandrequired

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
data:
  device_id: a1b2c3d4e5f6g7h8i9j0
  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
data:
  device_id: a1b2c3d4e5f6g7h8i9j0
  filepath: cache/filename.3mf
  plate: 1
  timelapse: true
  bed_leveling: false
  flow_cali: false
  vibration_cali: false
  layer_inspect: false
  use_ams: true
  ams_mapping: -1,-1,2,-1

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

Extrude or retract filament.

action: bambu_lab.extrude_retract
data:
  device_id: a1b2c3d4e5f6g7h8i9j0
  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

Load filament into the extruder from an AMS tray or external spool.

action: bambu_lab.load_filament
data:
  entity_id: a1b2c3d4e5f6g7h8i9j0
  temperature: 220

The data object should contain the following properties:

temperaturenumberoptional

Target nozzle temperature once the filament is loaded. If not set, uses the midpoint between min and max temperature of the current filament.

Retry loading filament from external spool

actionbambu_lab.retry_load_filamentrequired

Retry loading filament from external spool.

action: bambu_lab.retry_load_filament
data:
  device_id: a1b2c3d4e5f6g7h8i9j0

Finish loading filament from external spool

actionbambu_lab.done_load_filamentrequired

Once loading filemant from external spool is finished, use this action to tell the printer you are done. Otherwise it will go into error mode.

action: bambu_lab.done_load_filament
data:
  device_id: a1b2c3d4e5f6g7h8i9j0

Unload Filament

actionbambu_lab.unload_filamentrequired

Unload filament from the nozzle.

action: bambu_lab.unload_filament
data:
  device_id: a1b2c3d4e5f6g7h8i9j0

Set Filament

actionbambu_lab.set_filamentrequired

Sets 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_idxstringrequired

Bambu's filament ID. E.g. GFL96 is Generic PLA Silk

tray_colorstringrequired

RGBA value for the color. E.g. FF0000FF is opaque red.

tray_typestringrequired

Type of filament. E.g. 'PLA' or 'PETG'

nozzle_temp_minnumberrequired

The minimum temperature that it is recommended to print this filament at.

nozzle_temp_maxnumberrequired

The maximum temperature that it is recommended to print this filament at.

Get Filament Data

actionbambu_lab.get_filament_datarequired

Gets a json string with details about all known filaments

action: bambu_lab.get_filament_data
data:
  device_id: a1b2c3d4e5f6g7h8i9j0

Move Axis

actionbambu_lab.move_axisrequired

Move the printer axis.

action: bambu_lab.move_axis
data:
  device_id: a1b2c3d4e5f6g7h8i9j0
  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.skip_objectsrequired

Skip objects currently being printed.

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

The data object should contain the following properties:

objectsstringrequired

Object IDs are available from printable objects entity attributes

Read AMS RFID target

actionbambu_lab.read_rfidrequired

Read 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.read_rfid
data:
  entity_id: a1b2c3d4e5f6g7h8i9j0

Start the AMS filament drying

actionbambu_lab.start_filament_dryingrequired

Starts 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:

tempnumberrequired

Heating temperature. AMS 2 max is 65C. AMS HT max is 85C.

rotate_traybooleanrequired

Rotate tray while drying

durationnumberrequired

Drying time in hours.

Stops the AMS filament drying

actionbambu_lab.stop_filament_dryingrequired

Stops AMS filament drying.

action: bambu_lab.stop_filament_drying
data:
  device_id: a1b2c3d4e5f6g7h8i9j0