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
@@ -1,13 +1,13 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/common/ams.schema.json",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/common/ams/ams.schema.json",
"title": "AmsState",
"description": "Bambu's own naming has the outer container and the inner array both called `ams` - print.ams.ams, not a typo here, just what the printer actually sends.",
"type": "object",
"properties": {
"ams": {
"type": "array",
"items": { "$ref": "_ams_unit.schema.json" }
"items": { "$ref": "./ams_unit.schema.json" }
},
"ams_exists_bits": { "type": "string" },
"tray_exist_bits": { "type": "string" },
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/common/ams_tray.schema.json",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/common/ams/ams_tray.schema.json",
"title": "AmsTray",
"description": "A tray slot is either empty (just `id`) or loaded (the full field set) - two genuinely different shapes for the same slot, not one shape with optional fields. oneOf says the instance must match EXACTLY one of these. Note LoadedTray requires every field it lists, not just `id` - with only `id` required, a bare {\"id\":\"0\"} would validate against BOTH branches at once (it trivially satisfies Loaded's single requirement too) and oneOf would fail, since oneOf demands exactly one match. Verified this the hard way - see git history. The Rust equivalent is an untagged enum with #[serde(deny_unknown_fields)] on the Empty variant, for the same reason in reverse: without it, a loaded tray's extra fields wouldn't be rejected by Empty, and untagged enums try variants in order - see bambu_commands/print.rs. `drying_time` and `drying_temp` fields are only available for AMS 2 and AMS HT - AMS 1 doesn't have the drying option.",
"oneOf": [
@@ -15,13 +15,13 @@
},
{
"allOf": [
{ "$ref": "./_vt_tray.schema.json" },
{ "$ref": "../vt_tray.schema.json" },
{
"title": "LoadedTray",
"type": "object",
"properties": {
"state": { "type": "integer" },
"total_len": { "type": "number" },
"total_len": { "type": "number", "minimum": 0 },
"ctype": { "type": "integer" },
"cols": { "type": "array", "items": { "type": "string" } },
"drying_time": { "type": "string" },
@@ -1,13 +1,13 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/common/ams_unit.schema.json",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/common/ams/ams_unit.schema.json",
"title": "AmsUnit",
"description": "One physical AMS unit (Bambu's numbering starts at 0 via `id`).",
"type": "object",
"properties": {
"tray": {
"type": "array",
"items": { "$ref": "_ams_tray.schema.json" }
"items": { "$ref": "./ams_tray.schema.json" }
},
"chip_id": { "type": "string" },
"ams_id": { "type": "string" },
+3 -3
View File
@@ -1,8 +1,8 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/common/online.schema.json",
"title": "Online",
"description": "Printer online/offline status",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/common/hms.schema.json",
"title": "HMS",
"description": "HMS Error Report",
"type": "array",
"items": {
"type": "object",
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/report/print/_upgrade_state.schema.json",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/common/upgrade_state.schema.json",
"title": "UpgradeState",
"type": "object",
"properties": {
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/report/print/_upload.schema.json",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/common/upload.schema.json",
"title": "Upload",
"description": "File upload progress",
"oneOf": [
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/report/print/_vt_tray.schema.json",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/common/vt_tray.schema.json",
"title": "VtTray",
"description": "This schema is used as Virtual Tray (external spool) or as a base for AmsTray. When empty, all values are zeroed and `tray_color` field is set to \"FFFFFF00\".",
"type": "object",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/report/print/_xcam.schema.json",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/common/xcam.schema.json",
"title": "XcamSettings",
"description": "Camera-based AI print monitoring settings (spaghetti detection, first-layer inspection, etc.).",
"type": "object",
@@ -16,7 +16,7 @@
"net": { "$ref": "../../common/net.schema.json" },
"hms": { "$ref": "../../common/hms.schema.json" },
"online": { "$ref": "../../common/online.schema.json" },
"ams": { "$ref": "../../common/ams.schema.json" },
"ams": { "$ref": "../../common/ams/ams.schema.json" },
"vt_tray": { "$ref": "../../common/vt_tray.schema.json" },
"lights_report": { "$ref": "../../common/lights_report.schema.json" },
"xcam": { "$ref": "../../common/xcam.schema.json" },
@@ -37,7 +37,7 @@
"s_obj": { "type": "array", "items": {} },
"filam_bak": { "type": "array", "items": {} },
"stg": { "type": "array", "items": {} },
"stg": { "type": "array", "items": { "type": "number" } },
"mc_print_stage": { "type": "string" },
"mc_percent": { "type": "integer" },
@@ -51,7 +51,7 @@
"print_error": { "type": "integer" },
"lifecycle": { "type": "string", "enum": ["product"] },
"wifi_signal": { "type": "string", "pattern": "^-([0-9]{1,2}|100)dBm$" },
"gcode_state": { "type": "string", "enum": [ "idle", "IDLE" ] },
"gcode_state": { "type": "string", "enum": [ "idle", "IDLE", "finish", "FINISH" ] },
"gcode_file_prepare_percent": { "type": "string" },
"queue_number": { "type": "integer" },
"queue_total": { "type": "integer" },
@@ -64,7 +64,7 @@
"subtask_name": { "type": "string" },
"gcode_file": { "type": "string" },
"stg_cur": { "type": "integer" },
"print_type": { "type": "string", "enum": [ "idle", "IDLE" ] },
"print_type": { "type": "string", "enum": [ "", "idle", "IDLE" ] },
"home_flag": { "type": "integer" },
"mc_print_line_number": { "type": "string" },
"mc_print_sub_stage": { "type": "integer" },
@@ -0,0 +1,34 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/common/ams/ams.schema.json",
"title": "AmsState",
"description": "Bambu's own naming has the outer container and the inner array both called `ams` - print.ams.ams, not a typo here, just what the printer actually sends.",
"type": "object",
"properties": {
"ams": {
"type": "array",
"items": { "$ref": "./ams_unit.schema.json" }
},
"ams_exists_bits": { "type": "string" },
"ams_exist_bits_raw": { "type": "string" },
"cali_id": { "type": "integer" },
"cali_stat": { "type": "integer" },
"insert_flag": { "type": "boolean" },
"power_on_flag": { "type": "boolean" },
"tray_exist_bits": { "type": "string" },
"tray_is_bbl_bits": { "type": "string" },
"tray_now": { "type": "string" },
"tray_pre": { "type": "string" },
"tray_read_done_bits": { "type": "string" },
"tray_reading_bits": { "type": "string" },
"tray_tar": { "type": "string" },
"unbind_ams_stat": { "type": "integer" },
"version": { "type": "integer" }
},
"required": [
"ams", "ams_exists_bits", "ams_exist_bits_raw", "cali_id",
"cali_stat", "insert_flag", "power_on_flag", "tray_exist_bits",
"tray_is_bbl_bits", "tray_now", "tray_pre", "tray_read_done_bits",
"tray_reading_bits", "tray_tar", "unbind_ams_stat", "version"
]
}
@@ -0,0 +1,33 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/common/ams/ams_tray.schema.json",
"title": "AmsTray",
"description": "A tray slot is either empty (just `id`) or loaded (the full field set) - two genuinely different shapes for the same slot, not one shape with optional fields. oneOf says the instance must match EXACTLY one of these. Note LoadedTray requires every field it lists, not just `id` - with only `id` required, a bare {\"id\":\"0\"} would validate against BOTH branches at once (it trivially satisfies Loaded's single requirement too) and oneOf would fail, since oneOf demands exactly one match. Verified this the hard way - see git history. The Rust equivalent is an untagged enum with #[serde(deny_unknown_fields)] on the Empty variant, for the same reason in reverse: without it, a loaded tray's extra fields wouldn't be rejected by Empty, and untagged enums try variants in order - see bambu_commands/print.rs. `drying_time` and `drying_temp` fields are only available for AMS 2 and AMS HT - AMS 1 doesn't have the drying option.",
"oneOf": [
{
"title": "EmptyTray",
"type": "object",
"properties": {
"id": { "type": "string" },
"state": { "type": "integer" }
},
"required": ["id", "state"],
"additionalProperties": false
},
{
"allOf": [
{ "$ref": "../vt_tray.schema.json" },
{
"title": "LoadedTray",
"type": "object",
"properties": {
"state": { "type": "integer" }
},
"required": [
"state"
]
}
]
}
]
}
@@ -0,0 +1,20 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/common/ams/ams_unit.schema.json",
"title": "AmsUnit",
"description": "One physical AMS unit (Bambu's numbering starts at 0 via `id`).",
"type": "object",
"properties": {
"tray": {
"type": "array",
"items": { "$ref": "./ams_tray.schema.json" }
},
"dry_time": { "type": "integer" },
"humidity": { "type": "string" },
"humidity_raw": { "type": "string" },
"id": { "type": "string" },
"info": { "type": "string" },
"temp": { "type": "string" }
},
"required": ["humidity", "humidity_raw", "id", "info", "temp", "tray"]
}
@@ -0,0 +1,14 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/common/care.schema.json",
"title": "Care",
"description": "Printer online/offline status",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": { "type": "string", "pattern": "^[lhLH][sdrSDR]$" },
"info": { "type": "string" }
}
}
}
@@ -0,0 +1,33 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/common/device/airduct.schema.json",
"title": "DeviceAirduct",
"description": "Schema for details about the Airduct",
"type": "object",
"properties": {
"modeList": {
"type": "array",
"items": {
"$ref": "./airduct_mode.schema.json"
}
},
"parts": {
"type": "array",
"items": {
"$ref": "./airduct_part.schema.json"
}
},
"modeCur": { "type": "integer" },
"modeFunc": { "type": "integer" },
"modeVisable": { "type": "integer" },
"subFunc": { "type": "integer" },
"subMode": { "type": "integer" },
"subVisable": { "type": "integer" },
"version": { "type": "integer" }
},
"required": [
"modeCur", "modeFunc", "modeVisable",
"subFunc", "subMode", "subVisable",
"version", "modeList", "parts"
]
}
@@ -0,0 +1,13 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/common/device/airduct_mode.schema.json",
"title": "DeviceAirductMode",
"description": "Schema for available airduct modes",
"type": "object",
"properties": {
"ctrl": { "type": "array", "items": { "type": "integer", "multipleOf": 16 } },
"off": { "type": "array", "items": { "type": "integer", "multipleOf": 16 } },
"modeId": { "type": "integer" }
},
"required": ["ctrl", "off", "modeId"]
}
@@ -0,0 +1,14 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/common/device/airduct_part.schema.json",
"title": "DeviceAirductPart",
"description": "Schema for available airduct parts",
"type": "object",
"properties": {
"func": { "type": "integer" },
"id": { "type": "integer" },
"range": { "type": "integer" },
"state": { "type": "integer" },
"tar_state": { "type": "integer" }
}
}
@@ -0,0 +1,18 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/common/device/bed.schema.json",
"title": "DeviceBed",
"description": "Detailed info about Bed",
"type": "object",
"properties": {
"info": {
"type": "object",
"properties": {
"temp": { "type": "integer" }
},
"required": ["temp"]
},
"state": { "type": "integer" }
},
"required": ["info", "state"]
}
@@ -0,0 +1,19 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/common/device/cam.schema.json",
"title": "DeviceCamera",
"description": "Detailed info about Camera",
"type": "object",
"properties": {
"laser": {
"type": "object",
"properties": {
"cond": { "type": "integer" },
"state": { "type": "integer" }
},
"required": ["cond", "state"]
},
"timelapse_path": { "type": "string" }
},
"required": ["laser", "timelapse_path"]
}
@@ -0,0 +1,18 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/common/device/ctc.schema.json",
"title": "DeviceCTC",
"description": "Detailed info about CTC",
"type": "object",
"properties": {
"info": {
"type": "object",
"properties": {
"temp": { "type": "integer" }
},
"required": ["temp"]
},
"state": { "type": "integer" }
},
"required": ["info", "state"]
}
@@ -0,0 +1,29 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/common/device/device.schema.json",
"title": "DeviceBed",
"description": "Detailed info about all available devices",
"type": "object",
"properties": {
"airduct": { "$ref": "./airduct.schema.json" },
"bed": { "$ref": "./bed.schema.json`" },
"cam": { "$ref": "./cam.schema.json" },
"ctc": { "$ref": "./ctc.schema.json" },
"ext_tool": { "$ref": "./ext_tool.schema.json" },
"extruder": { "$ref": "./extruder.schema.json" },
"fire_ext": { "$ref": "./fire_ext.schema.json" },
"holder": { "$ref": "./holder.schema.json" },
"laser": { "$ref": "./laser.schema.json" },
"nozzle": { "$ref": "./nozzle.schema.json" },
"plate": { "$ref": "./plate.schema.json" },
"bed_temp": { "type": "integer" },
"fan": { "type": "integer" },
"type": { "type": "integer" }
},
"required": [
"airduct", "bed", "cam", "ctc",
"ext_tool", "extruder", "fire_ext", "holder",
"laser", "nozzle", "plate", "bed_temp",
"fan", "type"
]
}
@@ -0,0 +1,19 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/common/device/ext_tool.schema.json",
"title": "DeviceExternalTool",
"description": "Detailed info about External Tool",
"type": "object",
"properties": {
"calib": { "type": "integer" },
"low_prec": { "type": "boolean" },
"mount": { "type": "integer" },
"mount_3d": { "type": "integer" },
"th_temp": { "type": "integer" },
"type": { "type": "string" }
},
"required": [
"calib", "low_prec", "mount",
"mount_3d", "th_temp", "type"
]
}
@@ -0,0 +1,17 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/common/device/extruder.schema.json",
"title": "DeviceExtruder",
"description": "Detailed info about Extruders",
"type": "object",
"properties": {
"info": {
"type": "array",
"items": {
"$ref": "./extruder_item.schema.json"
}
},
"state": { "type": "integer" }
},
"required": ["info", "state"]
}
@@ -0,0 +1,29 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/common/device/extruder_item.schema.json",
"title": "DeviceExtruderItem",
"description": "Detailed info about specific Extruder",
"type": "object",
"properties": {
"filam_bak": {
"type": "array",
"items": { "type": "string" }
},
"hnow": { "type": "integer" },
"hpre": { "type": "integer" },
"htar": { "type": "integer" },
"id": { "type": "integer" },
"info": { "type": "integer" },
"snow": { "type": "integer" },
"spre": { "type": "integer" },
"star": { "type": "integer" },
"stat": { "type": "integer" },
"temp": { "type": "integer" }
},
"required": [
"filam_bak", "hnow", "hpre",
"htar", "id", "info",
"snow", "spre", "star",
"stat", "temp"
]
}
@@ -0,0 +1,25 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/common/device/fire_ext.schema.json",
"title": "DeviceFireExtinguisher",
"description": "Detailed info about Fire Extinguisher",
"type": "object",
"properties": {
"history": {
"type": "array"
},
"bot_err": { "type": "integer" },
"cd": { "type": "integer" },
"cd_init": { "type": "integer" },
"connect_flag": { "type": "integer" },
"drill_flag": { "type": "integer" },
"remain_time": { "type": "integer" },
"rm_init": { "type": "integer" },
"state": { "type": "integer" }
},
"required": [
"history", "bot_err", "cd",
"cd_init", "connect_flag", "drill_flag",
"remain_time", "rm_init", "state"
]
}
@@ -0,0 +1,18 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/common/device/holder.schema.json",
"title": "DeviceHolder",
"description": "Detailed info about Holder",
"type": "object",
"properties": {
"step": {
"type": "array",
"items": { "type": "integer" }
},
"info": { "type": "integer" },
"job": { "type": "integer" },
"pos": { "type": "integer" },
"stat": { "type": "integer" }
},
"required": ["step", "info", "job", "pos", "stat"]
}
@@ -0,0 +1,11 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/common/device/laser.schema.json",
"title": "DeviceLaser",
"description": "Detailed info about Laser",
"type": "object",
"properties": {
"power": { "type": "integer" }
},
"required": ["power"]
}
@@ -0,0 +1,18 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/common/device/nozzle.schema.json",
"title": "DeviceNozzle",
"description": "Detailed info about available Nozzles",
"type": "object",
"properties": {
"info": {
"type": "array",
"items": { "$ref": "./nozzle_item.schema.json" }
},
"exist": { "type": "integer" },
"src_id": { "type": "integer" },
"state": { "type": "integer" },
"tar_id": { "type": "integer" }
},
"required": [ "info", "exist", "src_id", "state", "tar_id" ]
}
@@ -0,0 +1,23 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/common/device/nozzle_item.schema.json",
"title": "DeviceNozzleItem",
"description": "Detailed info about specific Nozzle",
"type": "object",
"properties": {
"color_m": { "type": "string" },
"diameter": { "$ref": "../nozzle_diameter.schema.json" },
"fila_id": { "type": "integer" },
"id": { "type": "integer" },
"sn": { "type": "string" },
"stat": { "type": "integer" },
"tm": { "type": "integer" },
"type": { "$ref": "../nozzle_type.schema.json" },
"wear": { "type": "number" }
},
"required": [
"color_m", "diameter", "fila_id",
"id", "sn", "stat",
"tm", "type", "wear"
]
}
@@ -0,0 +1,21 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/common/device/bed.schema.json",
"title": "DevicePlate",
"description": "Detailed info about Plate",
"type": "object",
"properties": {
"base": {
"description": "NOTE: Just my guess, but for Textured PEI it was 6, for Engineering Plate it was 12",
"type": "integer"
},
"cali2d_id": { "type": "string" },
"cur_id": {
"description": "NOTE: Another guess - P0102 for Textured PEI, P0502 for Engineering Plate",
"type": "string"
},
"mat": { "type": "integer" },
"tar_id": { "type": "string" }
},
"required": ["base", "cali2d_id", "cur_id", "mat", "tar_id"]
}
@@ -0,0 +1,14 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/common/hms.schema.json",
"title": "HMS",
"description": "HMS Error Report",
"type": "array",
"items": {
"type": "object",
"properties": {
"attr": { "type": "integer" },
"code": { "type": "integer" }
}
}
}
@@ -0,0 +1,11 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/common/info.schema.json",
"title": "Info",
"description": "General info",
"type": "object",
"properties": {
"temp": { "type": "integer" }
},
"required": ["temp"]
}
@@ -0,0 +1,73 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/common/ipcam.schema.json",
"title": "Ipcam",
"description": "Report about the in-built IP camera",
"type": "object",
"properties": {
"agora_service": {
"type": "string",
"enum": [
"enable",
"disable",
"ENABLE",
"DISABLE"
]
},
"brtc_service": {
"type": "string",
"enum": [
"enable",
"disable",
"ENABLE",
"DISABLE"
]
},
"bs_state": { "type": "integer" },
"cap_pic_enable": {
"type": "string",
"enum": [
"enable",
"disable",
"invalid",
"ENABLE",
"DISABLE",
"INVALID"
]
},
"ipcam_dev": { "type": "string" },
"ipcam_record": {
"type": "string",
"enum": [
"enable",
"disable",
"ENABLE",
"DISABLE"
]
},
"laser_preview_res": { "type": "integer" },
"mode_bits": { "type": "integer", "minimum": 0 },
"resolution": { "type": "string" },
"rtsp_url": { "type": "string" },
"timelapse": {
"type": "string",
"enum": [
"enable",
"disable",
"ENABLE",
"DISABLE"
]
},
"tl_store_hpd_type": { "type": "integer" },
"tl_store_path_type": { "type": "integer" },
"tutk_server": {
"type": "string",
"enum": [
"enable",
"disable",
"ENABLE",
"DISABLE"
]
}
}
}
@@ -0,0 +1,24 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/common/job/job.schema.json",
"title": "Job",
"description": "Print job details",
"type": "object",
"properties": {
"cur_stage": {
"type": "object",
"properties": {
"idx": { "type": "number" },
"state": { "type": "number" }
},
"required": ["idx", "state"]
},
"stage": {
"type": "array",
"items": {
"$ref": "./stage.schema.json"
}
}
},
"required": ["cur_stage", "stage"]
}
@@ -0,0 +1,55 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/common/job/stage.schema.json",
"title": "Job",
"description": "Print job stage details",
"type": "object",
"properties": {
"clock_in": {
"type": "boolean"
},
"color": {
"type": "array",
"items": { "type": "string" }
},
"diameter": {
"type": "array",
"items": { "type": "number" }
},
"est_time": {
"type": "integer"
},
"heigh": {
"type": "number"
},
"idx": {
"type": "integer"
},
"platform": {
"type": "string"
},
"print_then": {
"type": "boolean"
},
"proc_list": {
"type": "array",
"items": { "type": "string" }
},
"tool": {
"type": "array",
"items": {
"description": "In case of 3D printing - look at `nozzle_type.schema.json`",
"type": "string"
}
},
"type": {
"type": "integer",
"minimum": 0
}
},
"required": [
"clock_in", "color", "diameter", "est_time",
"heigh", "idx", "platform", "print_then",
"proc_list", "tool", "type"
]
}
@@ -0,0 +1,29 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/common/lights_report.schema.json",
"title": "LightsReport",
"description": "Report status of printer lights",
"type": "array",
"items": {
"type": "object",
"properties": {
"mode": {
"type": "string",
"enum": [
"on",
"off",
"ON",
"OFF"
]
},
"node": {
"type": "string",
"enum": [
"chamber_light",
"work_light",
"chamber_light2"
]
}
}
}
}
@@ -0,0 +1,30 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/common/net.schema.json",
"title": "Net",
"description": "Network status",
"type": "object",
"properties": {
"conf": {
"type": "integer"
},
"info": {
"type": "array",
"items": {
"type": "object",
"properties": {
"ip": {
"type": "integer"
},
"mask": {
"type": "integer"
}
},
"required": [
"ip",
"mask"
]
}
}
}
}
@@ -1,8 +1,8 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/common/nozzle_type.schema.json",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/common/nozzle_type.schema.json",
"title": "NozzleType",
"description": "Common schema for nozzle type. HS00 - stainless steel, HS01 - hardened steel, HS05 - tungsten carbide, HH01 - high-flow hardened steel, HH05 - high-flow tungsten carbide",
"description": "Common schema for nozzle type. 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",
"enum": [
"HS00",
@@ -0,0 +1,18 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/common/online.schema.json",
"title": "Online",
"description": "Printer online/offline status",
"type": "object",
"properties": {
"ahb": {
"type": "boolean"
},
"rfid": {
"type": "boolean"
},
"version": {
"type": "integer"
}
}
}
@@ -0,0 +1,28 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/common/upgrade_state.schema.json",
"title": "UpgradeState",
"type": "object",
"properties": {
"ahb_new_version_number": { "type": "string" },
"ams_new_version_number": { "type": "string" },
"consistency_request": { "type": "boolean" },
"dis_state": { "type": "integer" },
"err_code": { "type": "integer" },
"ext_new_version_number": { "type": "string" },
"force_upgrade": { "type": "boolean" },
"idx": { "type": "integer" },
"idx2": { "type": "integer" },
"lower_limit": { "type": "string", "pattern": "..\\...\\...\\..." },
"message": { "type": "string" },
"module": { "type": "string" },
"new_version_state": { "type": "integer" },
"ota_new_version_number": { "type": "string" },
"progress": { "type": "string" },
"sequence_id": { "type": "integer" },
"sn": { "type": "string" },
"status": { "type": "string", "enum": ["idle", "IDLE"]},
"upgrade_fail_list": { "type": "array", "items": { "type": "string" } },
"upgrade_type": { "type": "string" }
}
}
@@ -0,0 +1,43 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/common/upload.schema.json",
"title": "Upload",
"description": "File upload progress",
"type": "object",
"properties": {
"file_size": {
"type": "integer"
},
"finish_size": {
"type": "integer"
},
"message": {
"type": "string"
},
"oss_url": {
"type": "string"
},
"progress": {
"type": "integer"
},
"speed": {
"type": "integer"
},
"status": {
"type": "string",
"enum": [
"idle",
"IDLE"
]
},
"task_id": {
"type": "string"
},
"time_remaining": {
"type": "integer"
},
"trouble_id": {
"type": "string"
}
}
}
@@ -0,0 +1,39 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/common/vt_tray.schema.json",
"title": "VtTray",
"description": "This schema is used as Virtual Tray (external spool) or as a base for AmsTray. When empty, all values are zeroed and `tray_color` field is set to \"FFFFFF00\".",
"type": "object",
"properties": {
"bed_temp": { "type": "string" },
"bed_temp_type": { "type": "string" },
"cali_idx": { "type": "number" },
"cols": { "type": "array", "items": { "type": "string" } },
"ctype": { "type": "integer" },
"drying_temp": { "type": "string" },
"drying_time": { "type": "string" },
"id": { "type": "string" },
"nozzle_temp_min": { "type": "string" },
"nozzle_temp_max": { "type": "string" },
"remain": { "type": "integer", "minimum": 0 },
"tag_uid": { "type": "string" },
"total_len": { "type": "integer" },
"tray_color": { "type": "string" },
"tray_diameter": { "type": "string" },
"tray_id_name": { "type": "string" },
"tray_info_idx": { "type": "string" },
"tray_sub_brands": { "type": "string" },
"tray_type": { "type": "string" },
"tray_uuid": { "type": "string" },
"tray_weight": { "type": "string" },
"xcam_info": { "type": "string" }
},
"required": [
"bed_temp", "bed_temp_type", "cali_idx", "cols",
"ctype", "drying_temp", "drying_time", "id",
"nozzle_temp_max", "nozzle_temp_min", "remain", "tag_uid",
"total_len", "tray_color", "tray_diameter", "tray_id_name",
"tray_info_idx", "tray_sub_brands", "tray_type", "tray_uuid",
"tray_weight", "xcam_info"
]
}
@@ -0,0 +1,21 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/common/xcam.schema.json",
"title": "XcamSettings",
"description": "Camera-based AI print monitoring settings (spaghetti detection, first-layer inspection, etc.).",
"type": "object",
"properties": {
"allow_skip_parts": { "type": "boolean" },
"buildplate_marker_detector": { "type": "boolean" },
"cfg": { "type": "integer" },
"first_layer_inspector": { "type": "boolean" },
"halt_print_sensitivity": { "type": "string" },
"print_halt": { "type": "boolean" },
"printing_monitor": { "type": "boolean" },
"spaghetti_detector": { "type": "boolean" }
},
"required": [
"allow_skip_parts", "buildplate_marker_detector", "first_layer_inspector", "cfg",
"halt_print_sensitivity", "print_halt", "printing_monitor", "spaghetti_detector"
]
}
@@ -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 } }
}
}
]
}