While it’s intended mostly for the pre-packaged gcode files (unload, load, calibration etc), here is the format:
{
"print": {
"sequence_id": "0",
"command": "gcode_file",
"param": "/filename.gcode" // Filename on the printer's filesystem to print
}
}
Could be useful if you want to run say a specific routine or something as well.
I will say it’s likely a much better idea to print directly using the 3mf file instead if not doing some basic routine.
{
"print": {
"sequence_id": "0",
"command": "project_file",
"param": "Metadata/plate_X.gcode", // X being a number, this represents which plate in a 3mf file to print
"project_id": "0", // Always 0 for local prints
"profile_id": "0", // Always 0 for local prints
"task_id": "0", // Always 0 for local prints
"subtask_id": "0", // Always 0 for local prints
"subtask_name": "",
"file": "", // Filename to print, not needed when "url" is specified with filepath
"url": "file:///mnt/sdcard", // URL to print. Root path, protocol can vary. E.g., if sd card, "ftp:///myfile.3mf", "ftp:///cache/myotherfile.3mf"
"md5": "",
"timelapse": true,
"bed_type": "auto", // Always "auto" for local prints
"bed_levelling": true,
"flow_cali": true,
"vibration_cali": true,
"layer_inspect": true,
"ams_mapping": "",
"use_ams": false
}
}
Note: This project-file printing payload for 3mf files is actually from a slightly older firmware, now there is also an ams_mapping array/field which should let you map AMS trays to filament orders in a print. Without it, it will do it in order it exists is use_ams is true. I haven’t figured out the ams_mapping part yet as I haven’t had the time for it, nor the need yet.
If you want to see current, I’d suggest listening in to the “request” topic and then starting a print from the slicer to the printer. It should trigger the message and if you log it, you can figure it out from there 