feat: push_status report for Bambu MQTT v2

This commit is contained in:
2026-08-31 13:41:56 +00:00
parent 20ecc1e8bd
commit 1b23c58eb6
46 changed files with 1060 additions and 20 deletions
@@ -0,0 +1,72 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/report/print/_2d_report.schema.json",
"title": "2DReport",
"description": "Details about current 2D job",
"type": "object",
"properties": {
"bs": {
"type": "object",
"properties": {
"bi": {
"type": "array",
"items": {
"type": "object",
"properties": {
"clock_in": { "type": "boolean" },
"est_time": { "type": "integer" },
"idx": { "type": "integer" },
"print_then": { "type": "boolean" },
"proc_list": { "type": "array", "items": { "type": "object" } },
"step_type": { "type": "integer" },
"tool_info": {
"type": "object",
"properties": {
"color": { "type": "string" },
"diameter": { "type": "number", "minimum": 0 },
"id": { "type": "integer" }
},
"required": ["color", "diameter", "id"]
},
"type": { "type": "integer" }
},
"required": [
"clock_in", "est_time", "idx", "print_then",
"proc_list", "step_type", "tool_info", "type"
]
}
},
"total_time": { "type": "integer" }
},
"required": ["bi", "total_time"]
},
"cond": { "type": "integer" },
"cur_stage": {
"type": "object",
"properties": {
"clock_in_time": { "type": "integer" },
"idx": { "type": "integer" },
"left_time": { "type": "integer" },
"process": { "type": "integer" },
"state": { "type": "integer" }
},
"required": ["clock_in_time", "idx", "left_time", "process", "state"]
},
"first_confirm": { "type": "boolean" },
"makeable": { "type": "boolean" },
"material": {
"type": "object",
"properties": {
"cur_id_list": { "type": "array", "items": { "type": "object" } },
"state": { "type": "integer" },
"tar_id": { "type": "string" },
"tar_name": { "type": "string" }
},
"required": ["cur_id_list", "state", "tar_id", "tar_name"]
},
"pm": { "type": "integer" }
},
"required": [
"layer_num", "print_cali_option", "total_layer_num"
]
}
@@ -0,0 +1,15 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/report/print/_3d_report.schema.json",
"title": "3DReport",
"description": "Details about current print status",
"type": "object",
"properties": {
"layer_num": { "type": "integer" },
"print_cali_option": { "type": "integer" },
"total_layer_num": { "type": "integer" }
},
"required": [
"layer_num", "print_cali_option", "total_layer_num"
]
}
@@ -0,0 +1,8 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/report/print/_nozzle_type.schema.json",
"title": "PrintReportNozzleType",
"description": "Schema for nozzle type, used only by PrintReport schema. HS00 - stainless steel, HS01 - hardened steel, HS05 - tungsten carbide, HH01 - high-flow hardened steel, HH05 - high-flow tungsten carbide. NOTE: format is possibly as follows: [H,X][H,S]0[0,1,5] - first character for printer series (H - H-series, possibly A-series too; X - X-series, namely X1C. Or maybe H is for hot-swap?); second character is for flow rate (S - standard; H - high-flow); third character is left as 0; fourth character is for nozzle material (0 - stainless steel; 1 - hardened steel; 5 - tungsten carbide)",
"type": "string",
"pattern": "^([HX][HS]0[015])-(0\\.[2468])$"
}
@@ -0,0 +1,134 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/report/print/print.schema.json",
"title": "PrintReport",
"description": "The ongoing print-state push (root key \"print\") - NOT a direct reply to the pushall request (that goes to \"pushing\", see request/pushing/pushall.schema.json). Sending pushall makes the printer start/refresh this stream; it isn't itself request/response, which is also why this is its own category folder rather than sitting under pushing/ - a category here is 'what root key does this arrive under', not 'what triggered it'.",
"allOf": [
{ "$ref": "../../../common/envelope.schema.json" },
{
"type": "object",
"properties": {
"command": { "const": "push_status" },
"2D": { "$ref": "./_2d_report.schema.json" },
"3D": { "$ref": "./_3d_report.schema.json" },
"ams": { "$ref": "../../common/ams.schema.json" },
"hms": { "$ref": "../../common/hms.schema.json" },
"lights_report": { "$ref": "../../common/lights_report.schema.json" },
"upgrade_state": { "$ref": "../../common/upgrade_state.schema.json" },
"info": { "$ref": "../../common/info.schema.json" },
"ipcam": { "$ref": "../../common/ipcam.schema.json" },
"online": { "$ref": "../../common/online.schema.json" },
"net": { "$ref": "../../common/net.schema.json" },
"xcam": { "$ref": "../../common/xcam.schema.json" },
"care": { "$ref": "../../common/care.schema.json" },
"upload": { "$ref": "../../common/upload.schema.json" },
"job": { "$ref": "../../common/job/job.schema.json" },
"device": { "$ref": "../../common/device/device.schema.json" },
"vir_slot": {
"type": "array",
"items": {
"$ref": "../../common/vt_tray.schema.json"
}
},
"ams_status": { "type": "integer" },
"ams_rfid_status": { "type": "integer" },
"ap_err": { "type": "integer" },
"aux": { "type": "string" },
"aux_part_fan": { "type": "boolean" },
"batch_id": { "type": "integer" },
"cali_version": { "type": "integer" },
"canvas_id": { "type": "integer" },
"cfg": { "type": "string" },
"design_id": { "type": "string" },
"nozzle_diameter": { "$ref": "../../common/nozzle_diameter.schema.json" },
"nozzle_type": { "$ref": "./_nozzle_type.schema.json" },
"nozzle_temper": { "type": "number" },
"nozzle_target_temper": { "type": "number" },
"bed_temper": { "type": "number" },
"bed_target_temper": { "type": "number" },
"fan_gear": { "type": "integer" },
"heatbreak_fan_speed": { "type": "string" },
"cooling_fan_speed": { "type": "string" },
"big_fan1_speed": { "type": "string" },
"big_fan2_speed": { "type": "string" },
"err": { "type": "string" },
"fail_reason": { "type": "string" },
"file": { "type": "string" },
"gcode_file": { "type": "string" },
"gcode_state": { "type": "string", "enum": [ "idle", "IDLE", "finish", "FINISH" ] },
"gcode_file_prepare_percent": { "type": "string" },
"force_upgrade": { "type": "boolean" },
"fun": { "type": "string" },
"fun2": { "type": "string" },
"home_flag": { "type": "integer" },
"hw_switch_state": { "type": "integer" },
"job_attr": { "type": "integer" },
"job_id": { "type": "string" },
"lan_task_id": { "type": "string" },
"layer_num": { "type": "integer" },
"mc_action": { "type": "integer" },
"mc_err": { "type": "integer" },
"mc_percent": { "type": "integer" },
"mc_print_error_code": { "type": "string" },
"mc_print_stage": { "type": "string" },
"mc_print_sub_stage": { "type": "integer" },
"mc_remaining_time": { "type": "integer" },
"mc_stage": { "type": "integer" },
"model_id": { "type": "string" },
"msg": { "type": "integer" },
"percent": { "type": "integer" },
"plate_cnt": { "type": "integer" },
"plate_id": { "type": "integer" },
"plate_idx": { "type": "integer" },
"prepare_per": { "type": "integer" },
"print_error": { "type": "integer" },
"print_gcode_action": { "type": "integer" },
"print_real_action": { "type": "integer" },
"print_type": { "type": "string", "enum": [ "", "idle", "IDLE" ] },
"profile_id": { "type": "string" },
"project_id": { "type": "string" },
"queue": { "type": "integer" },
"queue_est": { "type": "integer" },
"queue_number": { "type": "integer" },
"queue_sts": { "type": "integer" },
"queue_total": { "type": "integer" },
"remain_time": { "type": "integer" },
"s_obj": { "type": "array", "items": {} },
"sdcard": { "type": "boolean" },
"sequence_id": { "type": "string" },
"spd_lvl": { "type": "integer", "minimum": 1, "maximum": 4 },
"spd_mag": { "type": "integer", "minimum": 0, "maximum": 100 },
"stat": { "type": "string" },
"state": { "type": "integer" },
"stg": { "type": "array", "items": { "type": "number" } },
"stg_cur": { "type": "integer" },
"subtask_id": { "type": "string" },
"subtask_name": { "type": "string" },
"task_id": { "type": "string" },
"total_layer_num": { "type": "integer", "minimum": 0 },
"ver": { "type": "string" },
"wifi_signal": { "type": "string", "pattern": "^-([0-9]{1,2}|100)dBm$" },
"xcam_status": { "type": "string" },
"mapping": { "type": "array", "items": { "type": "number", "minimum": 0 } }
}
}
]
}