From 6381c27c48cdf76e5f924e2844258453023e6419 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iwo=20Strzebo=C5=84ski?= Date: Wed, 2 Sep 2026 18:05:49 +0000 Subject: [PATCH] feat: most of the schemas done --- schemas/bambulab/common/color_hex.schema.json | 8 +++ schemas/bambulab/common/file_url.schema.json | 8 +++ schemas/bambulab/common/http_url.schema.json | 8 +++ schemas/bambulab/common/url.schema.json | 7 ++- .../v1/common/ams/ams_mapping.schema.json | 8 +++ .../bambulab/v1/common/bed_type.schema.json | 10 ++++ .../bambulab/v1/common/led_node.schema.json | 11 ++++ .../v1/common/lights_report.schema.json | 13 ++--- .../bambulab/v1/common/vt_tray.schema.json | 2 +- schemas/bambulab/v1/report.schema.json | 2 +- .../print/ams_change_filament.schema.json | 31 ++++++++++ .../v1/report/print/ams_control.schema.json | 17 ++++++ .../print/ams_filament_setting.schema.json | 26 +++++++++ .../v1/report/print/ams_get_rfid.schema.json | 18 ++++++ .../report/print/ams_user_setting.schema.json | 19 ++++++ .../v1/report/print/print_option.schema.json | 16 +++++ .../v1/report/print/project_file.schema.json | 58 +++++++++++++++++++ ...nt.schema.json => push_status.schema.json} | 6 +- .../bambulab/v1/report/print/stop.schema.json | 4 +- .../v1/report/system/ledctrl.schema.json | 50 ++++++++++++++++ .../print/ams_change_filament.schema.json | 31 ++++++++++ .../v1/request/print/ams_control.schema.json | 17 ++++++ .../print/ams_filament_setting.schema.json | 26 +++++++++ .../v1/request/print/ams_get_rfid.schema.json | 18 ++++++ .../print/ams_user_setting.schema.json | 19 ++++++ .../v1/request/print/print_option.schema.json | 16 +++++ .../v1/request/print/project_file.schema.json | 58 +++++++++++++++++++ .../v1/request/print/skip_objects.schema.json | 21 +++++++ .../v1/request/print/stop.schema.json | 4 +- .../v1/request/system/ledctrl.schema.json | 50 ++++++++++++++++ .../v2/common/ams/ams_mapping.schema.json | 8 +++ .../bambulab/v2/common/bed_type.schema.json | 10 ++++ .../bambulab/v2/common/job/stage.schema.json | 2 +- .../bambulab/v2/common/led_node.schema.json | 11 ++++ .../v2/common/lights_report.schema.json | 13 ++--- .../bambulab/v2/common/vt_tray.schema.json | 2 +- schemas/bambulab/v2/report.schema.json | 2 +- .../v2/report/print/_2d_report.schema.json | 2 +- .../print/ams_change_filament.schema.json | 31 ++++++++++ .../v2/report/print/ams_control.schema.json | 17 ++++++ .../print/ams_filament_setting.schema.json | 26 +++++++++ .../v2/report/print/ams_get_rfid.schema.json | 18 ++++++ .../report/print/ams_user_setting.schema.json | 19 ++++++ .../v2/report/print/pause.schema.json | 2 +- .../v2/report/print/print_option.schema.json | 16 +++++ .../v2/report/print/project_file.schema.json | 58 +++++++++++++++++++ ...nt.schema.json => push_status.schema.json} | 6 +- .../v2/report/print/resume.schema.json | 2 +- .../bambulab/v2/report/print/stop.schema.json | 4 +- .../v2/report/system/ledctrl.schema.json | 50 ++++++++++++++++ .../print/ams_change_filament.schema.json | 31 ++++++++++ .../v2/request/print/ams_control.schema.json | 17 ++++++ .../print/ams_filament_setting.schema.json | 26 +++++++++ .../v2/request/print/ams_get_rfid.schema.json | 18 ++++++ .../print/ams_user_setting.schema.json | 19 ++++++ .../v2/request/print/pause.schema.json | 4 +- .../v2/request/print/print_option.schema.json | 16 +++++ .../v2/request/print/project_file.schema.json | 58 +++++++++++++++++++ .../v2/request/print/resume.schema.json | 4 +- .../v2/request/print/skip_objects.schema.json | 21 +++++++ .../v2/request/print/stop.schema.json | 2 +- .../v2/request/system/ledctrl.schema.json | 50 ++++++++++++++++ 62 files changed, 1101 insertions(+), 46 deletions(-) create mode 100644 schemas/bambulab/common/color_hex.schema.json create mode 100644 schemas/bambulab/common/file_url.schema.json create mode 100644 schemas/bambulab/common/http_url.schema.json create mode 100644 schemas/bambulab/v1/common/ams/ams_mapping.schema.json create mode 100644 schemas/bambulab/v1/common/bed_type.schema.json create mode 100644 schemas/bambulab/v1/common/led_node.schema.json create mode 100644 schemas/bambulab/v1/report/print/ams_change_filament.schema.json create mode 100644 schemas/bambulab/v1/report/print/ams_control.schema.json create mode 100644 schemas/bambulab/v1/report/print/ams_filament_setting.schema.json create mode 100644 schemas/bambulab/v1/report/print/ams_get_rfid.schema.json create mode 100644 schemas/bambulab/v1/report/print/ams_user_setting.schema.json create mode 100644 schemas/bambulab/v1/report/print/print_option.schema.json create mode 100644 schemas/bambulab/v1/report/print/project_file.schema.json rename schemas/bambulab/v1/report/print/{print.schema.json => push_status.schema.json} (95%) create mode 100644 schemas/bambulab/v1/report/system/ledctrl.schema.json create mode 100644 schemas/bambulab/v1/request/print/ams_change_filament.schema.json create mode 100644 schemas/bambulab/v1/request/print/ams_control.schema.json create mode 100644 schemas/bambulab/v1/request/print/ams_filament_setting.schema.json create mode 100644 schemas/bambulab/v1/request/print/ams_get_rfid.schema.json create mode 100644 schemas/bambulab/v1/request/print/ams_user_setting.schema.json create mode 100644 schemas/bambulab/v1/request/print/print_option.schema.json create mode 100644 schemas/bambulab/v1/request/print/project_file.schema.json create mode 100644 schemas/bambulab/v1/request/print/skip_objects.schema.json create mode 100644 schemas/bambulab/v1/request/system/ledctrl.schema.json create mode 100644 schemas/bambulab/v2/common/ams/ams_mapping.schema.json create mode 100644 schemas/bambulab/v2/common/bed_type.schema.json create mode 100644 schemas/bambulab/v2/common/led_node.schema.json create mode 100644 schemas/bambulab/v2/report/print/ams_change_filament.schema.json create mode 100644 schemas/bambulab/v2/report/print/ams_control.schema.json create mode 100644 schemas/bambulab/v2/report/print/ams_filament_setting.schema.json create mode 100644 schemas/bambulab/v2/report/print/ams_get_rfid.schema.json create mode 100644 schemas/bambulab/v2/report/print/ams_user_setting.schema.json create mode 100644 schemas/bambulab/v2/report/print/print_option.schema.json create mode 100644 schemas/bambulab/v2/report/print/project_file.schema.json rename schemas/bambulab/v2/report/print/{print.schema.json => push_status.schema.json} (97%) create mode 100644 schemas/bambulab/v2/report/system/ledctrl.schema.json create mode 100644 schemas/bambulab/v2/request/print/ams_change_filament.schema.json create mode 100644 schemas/bambulab/v2/request/print/ams_control.schema.json create mode 100644 schemas/bambulab/v2/request/print/ams_filament_setting.schema.json create mode 100644 schemas/bambulab/v2/request/print/ams_get_rfid.schema.json create mode 100644 schemas/bambulab/v2/request/print/ams_user_setting.schema.json create mode 100644 schemas/bambulab/v2/request/print/print_option.schema.json create mode 100644 schemas/bambulab/v2/request/print/project_file.schema.json create mode 100644 schemas/bambulab/v2/request/print/skip_objects.schema.json create mode 100644 schemas/bambulab/v2/request/system/ledctrl.schema.json diff --git a/schemas/bambulab/common/color_hex.schema.json b/schemas/bambulab/common/color_hex.schema.json new file mode 100644 index 0000000..51e1825 --- /dev/null +++ b/schemas/bambulab/common/color_hex.schema.json @@ -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/common/color_hex.schema.json", + "title": "CommonColorHexSchema", + "description": "Schema for hex color. Technically alpha (last two chars) should be always FF, but...", + "type": "string", + "pattern": "^[0-9a-fA-F]{8}$" +} diff --git a/schemas/bambulab/common/file_url.schema.json b/schemas/bambulab/common/file_url.schema.json new file mode 100644 index 0000000..24db7b0 --- /dev/null +++ b/schemas/bambulab/common/file_url.schema.json @@ -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/common/file_url.schema.json", + "title": "CommonFileUrlSchema", + "type": "string", + "format": "uri", + "pattern": "^(?:file|ftp):\/\/" +} diff --git a/schemas/bambulab/common/http_url.schema.json b/schemas/bambulab/common/http_url.schema.json new file mode 100644 index 0000000..99eab9b --- /dev/null +++ b/schemas/bambulab/common/http_url.schema.json @@ -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/common/http_url.schema.json", + "title": "CommonHttpUrlSchema", + "type": "string", + "format": "uri", + "pattern": "^https?:\/\/" +} diff --git a/schemas/bambulab/common/url.schema.json b/schemas/bambulab/common/url.schema.json index fe68793..e959a57 100644 --- a/schemas/bambulab/common/url.schema.json +++ b/schemas/bambulab/common/url.schema.json @@ -2,7 +2,8 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/common/url.schema.json", "title": "CommonUrlSchema", - "type": "string", - "format": "uri", - "pattern": "^https?://" + "oneOf": [ + { "$ref": "./http_url.schema.json" }, + { "$ref": "./file_url.schema.json" } + ] } diff --git a/schemas/bambulab/v1/common/ams/ams_mapping.schema.json b/schemas/bambulab/v1/common/ams/ams_mapping.schema.json new file mode 100644 index 0000000..2436642 --- /dev/null +++ b/schemas/bambulab/v1/common/ams/ams_mapping.schema.json @@ -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/v1/common/ams/ams_mapping.schema.json", + "title": "AmsMapping", + "description": "AMS Mapping is a God forsaken hell. And it's CRUCIAL for multi-color. LOL. The ams_mapping array uses a reverse indexing system where:\n- Array positions represent color indices in your print file (starting from 0)\n- Array values represent AMS slot numbers (0-3 for typical 4-slot AMS)\n- -1 indicates unused color slots. ALWAYS - and I say ALWAYS - pad the array so it's length is equal to the sum of all AMS trays (slots) + virtual trays (external spools), ie. a P1P with one AMS would have `ams_mapping` array of length 5 - but H2C with 2x AMS 2 Pro and 1x AMS HT would have `ams_mapping` array of length 11 (printers with two nozzles in the toolhead have two external spools)", + "type": "array", + "items": { "type": "integer", "minimum": -1, "minItems": 1 } +} diff --git a/schemas/bambulab/v1/common/bed_type.schema.json b/schemas/bambulab/v1/common/bed_type.schema.json new file mode 100644 index 0000000..f38fb98 --- /dev/null +++ b/schemas/bambulab/v1/common/bed_type.schema.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/common/bed_type.schema.json", + "title": "BedType", + "description": "Common schema for bed type. TODO: Add more bed types", + "type": "string", + "enum": [ + "auto" + ] +} diff --git a/schemas/bambulab/v1/common/led_node.schema.json b/schemas/bambulab/v1/common/led_node.schema.json new file mode 100644 index 0000000..a98dad5 --- /dev/null +++ b/schemas/bambulab/v1/common/led_node.schema.json @@ -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/v1/common/led_node.schema.json", + "title": "LedNode", + "type": "string", + "enum": [ + "chamber_light", + "work_light", + "chamber_light2" + ] +} diff --git a/schemas/bambulab/v1/common/lights_report.schema.json b/schemas/bambulab/v1/common/lights_report.schema.json index dcd5d59..3b783ab 100644 --- a/schemas/bambulab/v1/common/lights_report.schema.json +++ b/schemas/bambulab/v1/common/lights_report.schema.json @@ -13,17 +13,12 @@ "on", "off", "ON", - "OFF" + "OFF", + "flashing", + "FLASHING" ] }, - "node": { - "type": "string", - "enum": [ - "chamber_light", - "work_light", - "chamber_light2" - ] - } + "node": { "$ref": "./led_node.schema.json" } } } } diff --git a/schemas/bambulab/v1/common/vt_tray.schema.json b/schemas/bambulab/v1/common/vt_tray.schema.json index cffe289..5ed4f72 100644 --- a/schemas/bambulab/v1/common/vt_tray.schema.json +++ b/schemas/bambulab/v1/common/vt_tray.schema.json @@ -11,7 +11,7 @@ "tray_info_idx": { "type": "string" }, "tray_type": { "type": "string" }, "tray_sub_brands": { "type": "string" }, - "tray_color": { "type": "string" }, + "tray_color": { "$ref": "../../common/color_hex.schema.json" }, "tray_weight": { "type": "string" }, "tray_diameter": { "type": "string" }, "tray_temp": { "type": "string" }, diff --git a/schemas/bambulab/v1/report.schema.json b/schemas/bambulab/v1/report.schema.json index 265ef99..16077f1 100644 --- a/schemas/bambulab/v1/report.schema.json +++ b/schemas/bambulab/v1/report.schema.json @@ -14,7 +14,7 @@ }, "print": { "oneOf": [ - { "$ref": "report/print/print.schema.json" } + { "$ref": "report/print/push_status.schema.json" } ] } }, diff --git a/schemas/bambulab/v1/report/print/ams_change_filament.schema.json b/schemas/bambulab/v1/report/print/ams_change_filament.schema.json new file mode 100644 index 0000000..8634760 --- /dev/null +++ b/schemas/bambulab/v1/report/print/ams_change_filament.schema.json @@ -0,0 +1,31 @@ +{ + "$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/ams_change_filament.schema.json", + "title": "AmsChangeFilamentReport", + "description": "Perform filament change using AMS", + "allOf": [ + { "$ref": "../../../common/envelope.schema.json" }, + { + "type": "object", + "properties": { + "command": { "const": "ams_change_filament" }, + "target": { + "type": "integer", + "description": "Filament tray ID", + "minimum": 0 + }, + "curr_temp": { + "type": "integer", + "description": "Old print temperature", + "minimum": 0 + }, + "tar_temp": { + "type": "integer", + "description": "New print temperature", + "minimum": 0 + } + }, + "required": ["target", "curr_temp", "tar_temp"] + } + ] +} diff --git a/schemas/bambulab/v1/report/print/ams_control.schema.json b/schemas/bambulab/v1/report/print/ams_control.schema.json new file mode 100644 index 0000000..821a848 --- /dev/null +++ b/schemas/bambulab/v1/report/print/ams_control.schema.json @@ -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/v1/report/print/ams_control.schema.json", + "title": "AmsControlReport", + "description": "Control AMS Unit", + "allOf": [ + { "$ref": "../../../common/envelope.schema.json" }, + { + "type": "object", + "properties": { + "command": { "const": "ams_control" }, + "param": { "type": "string", "enum": ["resume", "reset", "pause"] } + }, + "required": ["param"] + } + ] +} diff --git a/schemas/bambulab/v1/report/print/ams_filament_setting.schema.json b/schemas/bambulab/v1/report/print/ams_filament_setting.schema.json new file mode 100644 index 0000000..eb72d5d --- /dev/null +++ b/schemas/bambulab/v1/report/print/ams_filament_setting.schema.json @@ -0,0 +1,26 @@ +{ + "$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/ams_filament_setting.schema.json", + "title": "AmsFilamentSettingReport", + "description": "Change AMS settings of the given unit", + "allOf": [ + { "$ref": "../../../common/envelope.schema.json" }, + { + "type": "object", + "properties": { + "command": { "const": "ams_filament_setting" }, + "ams_id": { "type": "integer", "minimum": 0 }, + "tray_id": { "type": "integer", "minimum": 0 }, + "tray_info_idx": { "type": "string" }, + "tray_color": { "$ref": "../../../common/color_hex.schema.json" }, + "nozzle_temp_min": { "type": "integer", "minimum": 0 }, + "nozzle_temp_max": { "type": "integer", "minimum": 0 }, + "tray_type": { "type": "string" } + }, + "required": [ + "ams_id", "tray_id", "tray_info_idx", "tray_color", + "nozzle_temp_min", "nozzle_temp_max", "tray_type" + ] + } + ] +} diff --git a/schemas/bambulab/v1/report/print/ams_get_rfid.schema.json b/schemas/bambulab/v1/report/print/ams_get_rfid.schema.json new file mode 100644 index 0000000..266eec9 --- /dev/null +++ b/schemas/bambulab/v1/report/print/ams_get_rfid.schema.json @@ -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/v1/report/print/ams_get_rfid.schema.json", + "title": "AmsGetRfidReport", + "description": "Read RFID info of filament", + "allOf": [ + { "$ref": "../../../common/envelope.schema.json" }, + { + "type": "object", + "properties": { + "command": { "const": "ams_get_rfid" }, + "ams_id": { "type": "integer", "minimum": 0 }, + "ams_slot": { "type": "integer", "minimum": 0 } + }, + "required": ["ams_id", "ams_slot"] + } + ] +} diff --git a/schemas/bambulab/v1/report/print/ams_user_setting.schema.json b/schemas/bambulab/v1/report/print/ams_user_setting.schema.json new file mode 100644 index 0000000..b11b0ab --- /dev/null +++ b/schemas/bambulab/v1/report/print/ams_user_setting.schema.json @@ -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/v1/report/print/ams_user_setting.schema.json", + "title": "AmsUserSettingReport", + "description": "Change AMS settings of the given unit", + "allOf": [ + { "$ref": "../../../common/envelope.schema.json" }, + { + "type": "object", + "properties": { + "command": { "const": "ams_user_setting" }, + "ams_id": { "type": "integer", "minimum": 0 }, + "startup_read_option": { "type": "boolean" }, + "tray_read_option": { "type": "boolean" } + }, + "required": ["ams_id", "startup_read_option", "tray_read_option"] + } + ] +} diff --git a/schemas/bambulab/v1/report/print/print_option.schema.json b/schemas/bambulab/v1/report/print/print_option.schema.json new file mode 100644 index 0000000..2e19daa --- /dev/null +++ b/schemas/bambulab/v1/report/print/print_option.schema.json @@ -0,0 +1,16 @@ +{ + "$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/print_option.schema.json", + "title": "PrintOptionReport", + "description": "Modifies printer's print mode.", + "allOf": [ + { "$ref": "../../../common/envelope.schema.json" }, + { + "type": "object", + "properties": { + "command": { "const": "print_option" }, + "auto_recovery": { "type": "boolean" } + } + } + ] +} diff --git a/schemas/bambulab/v1/report/print/project_file.schema.json b/schemas/bambulab/v1/report/print/project_file.schema.json new file mode 100644 index 0000000..7d791fe --- /dev/null +++ b/schemas/bambulab/v1/report/print/project_file.schema.json @@ -0,0 +1,58 @@ +{ + "$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/project_file.schema.json", + "title": "PrintProjectFileReport", + "description": "Print project file", + "allOf": [ + { "$ref": "../../../common/envelope.schema.json" }, + { + "type": "object", + "properties": { + "command": { "const": "project_file" }, + "param": { "type": "string" }, + "project_id": { "type": "string", "description": "\"0\" for local prints" }, + "profile_id": { "type": "string", "description": "\"0\" for local prints" }, + "task_id": { "type": "string", "description": "\"0\" for local prints" }, + "subtask_id": { "type": "string", "description": "\"0\" for local prints" }, + "subtask_name": { "type": "string", "description": "Empty string for local prints" }, + "file": { "type": "string", "description": "File name to print - may be empty string if `url` field already contains the file name" }, + "url": { "$ref": "../../../common/file_url.schema.json" }, + "md5": { "type": "string", "description": "MD5 hash of the project file. Can be empty" }, + "timelapse": { "type": "boolean" }, + "bed_type": { "$ref": "../../common/bed_type.schema.json" }, + "bed_levelling": { "type": "boolean" }, + "flow_cali": { "type": "boolean" }, + "vibration_cali": { "type": "boolean" }, + "layer_inspect": { "type": "boolean" }, + "ams_mapping": { + "oneOf": [ + { "$ref": "../../common/ams/ams_mapping.schema.json" }, + { "type": "string" } + ] + }, + "use_ams": { "type": "boolean" } + }, + "required": ["param"], + "anyOf": [{ "required": ["file"] }, { "required": ["url"] }] + }, + { + "oneOf": [ + { + "type": "object", + "properties": { + "ams_mapping": { "$ref": "../../common/ams/ams_mapping.schema.json" }, + "use_ams": true + }, + "required": ["ams_mapping", "use_ams"] + }, + { + "type": "object", + "properties": { + "ams_mapping": { "type": "string", "const": "" }, + "use_ams": false + } + } + ] + } + ] +} diff --git a/schemas/bambulab/v1/report/print/print.schema.json b/schemas/bambulab/v1/report/print/push_status.schema.json similarity index 95% rename from schemas/bambulab/v1/report/print/print.schema.json rename to schemas/bambulab/v1/report/print/push_status.schema.json index a0492f7..4225c62 100644 --- a/schemas/bambulab/v1/report/print/print.schema.json +++ b/schemas/bambulab/v1/report/print/push_status.schema.json @@ -1,7 +1,7 @@ { "$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/print.schema.json", - "title": "PrintReport", + "$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/report/print/push_status.schema.json", + "title": "PushStatusReport", "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" }, @@ -35,7 +35,7 @@ "big_fan1_speed": { "type": "string" }, "big_fan2_speed": { "type": "string" }, - "s_obj": { "type": "array", "items": {} }, + "s_obj": { "type": "array", "items": { "type": "number" } }, "filam_bak": { "type": "array", "items": {} }, "stg": { "type": "array", "items": { "type": "number" } }, diff --git a/schemas/bambulab/v1/report/print/stop.schema.json b/schemas/bambulab/v1/report/print/stop.schema.json index 71640ed..297a3a5 100644 --- a/schemas/bambulab/v1/report/print/stop.schema.json +++ b/schemas/bambulab/v1/report/print/stop.schema.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/request/print/stop.schema.json", - "title": "StopPrintRequest", + "$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/report/print/stop.schema.json", + "title": "StopPrintReport", "allOf": [ { "$ref": "../../../common/envelope.schema.json" }, { diff --git a/schemas/bambulab/v1/report/system/ledctrl.schema.json b/schemas/bambulab/v1/report/system/ledctrl.schema.json new file mode 100644 index 0000000..9059680 --- /dev/null +++ b/schemas/bambulab/v1/report/system/ledctrl.schema.json @@ -0,0 +1,50 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/report/system/ledctrl.schema.json", + "title": "LedctrlReport", + "allOf": [ + { "$ref": "../../../common/envelope.schema.json" }, + { + "type": "object", + "properties": { + "command": { "const": "ledctrl" }, + "led_node": { "$ref": "../../common/led_node.schema.json" } + }, + "required": ["led_node"] + }, + { + "oneOf": [ + { + "type": "object", + "properties": { + "led_mode": { + "type": "string", + "enum": ["on", "off", "ON", "OFF"] + } + }, + "required": ["led_mode"] + }, + { + "type": "object", + "properties": { + "led_mode": { + "type": "string", + "enum": ["flashing", "FLASHING"] + }, + "led_on_time": { "type": "integer", "minimum": 1 }, + "led_off_time": { "type": "integer", "minimum": 1 }, + "loop_times": { "type": "integer", "minimum": 1 }, + "interval_time": { "type": "integer", "minimum": 1 } + }, + "required": [ + "led_mode", + "led_on_time", + "led_off_time", + "loop_times", + "interval_time" + ] + } + ] + } + ] +} diff --git a/schemas/bambulab/v1/request/print/ams_change_filament.schema.json b/schemas/bambulab/v1/request/print/ams_change_filament.schema.json new file mode 100644 index 0000000..88619e4 --- /dev/null +++ b/schemas/bambulab/v1/request/print/ams_change_filament.schema.json @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/request/print/ams_change_filament.schema.json", + "title": "AmsChangeFilamentRequest", + "description": "Perform filament change using AMS", + "allOf": [ + { "$ref": "../../../common/envelope.schema.json" }, + { + "type": "object", + "properties": { + "command": { "const": "ams_change_filament" }, + "target": { + "type": "integer", + "description": "Filament tray ID", + "minimum": 0 + }, + "curr_temp": { + "type": "integer", + "description": "Old print temperature", + "minimum": 0 + }, + "tar_temp": { + "type": "integer", + "description": "New print temperature", + "minimum": 0 + } + }, + "required": ["target", "curr_temp", "tar_temp"] + } + ] +} diff --git a/schemas/bambulab/v1/request/print/ams_control.schema.json b/schemas/bambulab/v1/request/print/ams_control.schema.json new file mode 100644 index 0000000..e318154 --- /dev/null +++ b/schemas/bambulab/v1/request/print/ams_control.schema.json @@ -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/v1/request/print/ams_control.schema.json", + "title": "AmsControlRequest", + "description": "Control AMS Unit", + "allOf": [ + { "$ref": "../../../common/envelope.schema.json" }, + { + "type": "object", + "properties": { + "command": { "const": "ams_control" }, + "param": { "type": "string", "enum": ["resume", "reset", "pause"] } + }, + "required": ["param"] + } + ] +} diff --git a/schemas/bambulab/v1/request/print/ams_filament_setting.schema.json b/schemas/bambulab/v1/request/print/ams_filament_setting.schema.json new file mode 100644 index 0000000..f692684 --- /dev/null +++ b/schemas/bambulab/v1/request/print/ams_filament_setting.schema.json @@ -0,0 +1,26 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/request/print/ams_filament_setting.schema.json", + "title": "AmsFilamentSettingRequest", + "description": "Change AMS settings of the given unit", + "allOf": [ + { "$ref": "../../../common/envelope.schema.json" }, + { + "type": "object", + "properties": { + "command": { "const": "ams_filament_setting" }, + "ams_id": { "type": "integer", "minimum": 0 }, + "tray_id": { "type": "integer", "minimum": 0 }, + "tray_info_idx": { "type": "string" }, + "tray_color": { "$ref": "../../../common/color_hex.schema.json" }, + "nozzle_temp_min": { "type": "integer", "minimum": 0 }, + "nozzle_temp_max": { "type": "integer", "minimum": 0 }, + "tray_type": { "type": "string" } + }, + "required": [ + "ams_id", "tray_id", "tray_info_idx", "tray_color", + "nozzle_temp_min", "nozzle_temp_max", "tray_type" + ] + } + ] +} diff --git a/schemas/bambulab/v1/request/print/ams_get_rfid.schema.json b/schemas/bambulab/v1/request/print/ams_get_rfid.schema.json new file mode 100644 index 0000000..1f7c73a --- /dev/null +++ b/schemas/bambulab/v1/request/print/ams_get_rfid.schema.json @@ -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/v1/request/print/ams_get_rfid.schema.json", + "title": "AmsGetRfidRequest", + "description": "Read RFID info of filament", + "allOf": [ + { "$ref": "../../../common/envelope.schema.json" }, + { + "type": "object", + "properties": { + "command": { "const": "ams_get_rfid" }, + "ams_id": { "type": "integer", "minimum": 0 }, + "ams_slot": { "type": "integer", "minimum": 0 } + }, + "required": ["ams_id", "ams_slot"] + } + ] +} diff --git a/schemas/bambulab/v1/request/print/ams_user_setting.schema.json b/schemas/bambulab/v1/request/print/ams_user_setting.schema.json new file mode 100644 index 0000000..a7db54d --- /dev/null +++ b/schemas/bambulab/v1/request/print/ams_user_setting.schema.json @@ -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/v1/request/print/ams_user_setting.schema.json", + "title": "AmsUserSettingRequest", + "description": "Change AMS settings of the given unit", + "allOf": [ + { "$ref": "../../../common/envelope.schema.json" }, + { + "type": "object", + "properties": { + "command": { "const": "ams_user_setting" }, + "ams_id": { "type": "integer", "minimum": 0 }, + "startup_read_option": { "type": "boolean" }, + "tray_read_option": { "type": "boolean" } + }, + "required": ["ams_id", "startup_read_option", "tray_read_option"] + } + ] +} diff --git a/schemas/bambulab/v1/request/print/print_option.schema.json b/schemas/bambulab/v1/request/print/print_option.schema.json new file mode 100644 index 0000000..4639133 --- /dev/null +++ b/schemas/bambulab/v1/request/print/print_option.schema.json @@ -0,0 +1,16 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/request/print/print_option.schema.json", + "title": "PrintOptionRequest", + "description": "Modifies printer's print mode.", + "allOf": [ + { "$ref": "../../../common/envelope.schema.json" }, + { + "type": "object", + "properties": { + "command": { "const": "print_option" }, + "auto_recovery": { "type": "boolean" } + } + } + ] +} diff --git a/schemas/bambulab/v1/request/print/project_file.schema.json b/schemas/bambulab/v1/request/print/project_file.schema.json new file mode 100644 index 0000000..fc0945d --- /dev/null +++ b/schemas/bambulab/v1/request/print/project_file.schema.json @@ -0,0 +1,58 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/request/print/project_file.schema.json", + "title": "PrintProjectFileRequest", + "description": "Print project file", + "allOf": [ + { "$ref": "../../../common/envelope.schema.json" }, + { + "type": "object", + "properties": { + "command": { "const": "project_file" }, + "param": { "type": "string" }, + "project_id": { "type": "string", "description": "\"0\" for local prints" }, + "profile_id": { "type": "string", "description": "\"0\" for local prints" }, + "task_id": { "type": "string", "description": "\"0\" for local prints" }, + "subtask_id": { "type": "string", "description": "\"0\" for local prints" }, + "subtask_name": { "type": "string", "description": "Empty string for local prints" }, + "file": { "type": "string", "description": "File name to print - may be empty string if `url` field already contains the file name" }, + "url": { "$ref": "../../../common/file_url.schema.json" }, + "md5": { "type": "string", "description": "MD5 hash of the project file. Can be empty" }, + "timelapse": { "type": "boolean" }, + "bed_type": { "$ref": "../../common/bed_type.schema.json" }, + "bed_levelling": { "type": "boolean" }, + "flow_cali": { "type": "boolean" }, + "vibration_cali": { "type": "boolean" }, + "layer_inspect": { "type": "boolean" }, + "ams_mapping": { + "oneOf": [ + { "$ref": "../../common/ams/ams_mapping.schema.json" }, + { "type": "string" } + ] + }, + "use_ams": { "type": "boolean" } + }, + "required": ["param"], + "anyOf": [{ "required": ["file"] }, { "required": ["url"] }] + }, + { + "oneOf": [ + { + "type": "object", + "properties": { + "ams_mapping": { "$ref": "../../common/ams/ams_mapping.schema.json" }, + "use_ams": true + }, + "required": ["ams_mapping", "use_ams"] + }, + { + "type": "object", + "properties": { + "ams_mapping": { "type": "string", "const": "" }, + "use_ams": false + } + } + ] + } + ] +} diff --git a/schemas/bambulab/v1/request/print/skip_objects.schema.json b/schemas/bambulab/v1/request/print/skip_objects.schema.json new file mode 100644 index 0000000..a13c181 --- /dev/null +++ b/schemas/bambulab/v1/request/print/skip_objects.schema.json @@ -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/v1/request/print/skip_objects.schema.json", + "title": "SkipObjectsRequest", + "description": "Skip objects based on IDs in slice_info.config. Updates `pushing.pushall` -> `print.push_status` - field `s_obj` with IDs of skipped objects.", + "allOf": [ + { "$ref": "../../../common/envelope.schema.json" }, + { + "type": "object", + "properties": { + "command": { "const": "skip_objects" }, + "obj_list": { + "type": "array", + "items": { "type": "integer", "minimum": 0 }, + "minItems": 1 + } + }, + "required": ["param"] + } + ] +} diff --git a/schemas/bambulab/v1/request/print/stop.schema.json b/schemas/bambulab/v1/request/print/stop.schema.json index 297a3a5..71640ed 100644 --- a/schemas/bambulab/v1/request/print/stop.schema.json +++ b/schemas/bambulab/v1/request/print/stop.schema.json @@ -1,7 +1,7 @@ { "$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/stop.schema.json", - "title": "StopPrintReport", + "$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/request/print/stop.schema.json", + "title": "StopPrintRequest", "allOf": [ { "$ref": "../../../common/envelope.schema.json" }, { diff --git a/schemas/bambulab/v1/request/system/ledctrl.schema.json b/schemas/bambulab/v1/request/system/ledctrl.schema.json new file mode 100644 index 0000000..abf9f24 --- /dev/null +++ b/schemas/bambulab/v1/request/system/ledctrl.schema.json @@ -0,0 +1,50 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/request/system/ledctrl.schema.json", + "title": "LedctrlRequest", + "allOf": [ + { "$ref": "../../../common/envelope.schema.json" }, + { + "type": "object", + "properties": { + "command": { "const": "ledctrl" }, + "led_node": { "$ref": "../../common/led_node.schema.json" } + }, + "required": ["led_node"] + }, + { + "oneOf": [ + { + "type": "object", + "properties": { + "led_mode": { + "type": "string", + "enum": ["on", "off", "ON", "OFF"] + } + }, + "required": ["led_mode"] + }, + { + "type": "object", + "properties": { + "led_mode": { + "type": "string", + "enum": ["flashing", "FLASHING"] + }, + "led_on_time": { "type": "integer", "minimum": 1 }, + "led_off_time": { "type": "integer", "minimum": 1 }, + "loop_times": { "type": "integer", "minimum": 1 }, + "interval_time": { "type": "integer", "minimum": 1 } + }, + "required": [ + "led_mode", + "led_on_time", + "led_off_time", + "loop_times", + "interval_time" + ] + } + ] + } + ] +} diff --git a/schemas/bambulab/v2/common/ams/ams_mapping.schema.json b/schemas/bambulab/v2/common/ams/ams_mapping.schema.json new file mode 100644 index 0000000..9096b7e --- /dev/null +++ b/schemas/bambulab/v2/common/ams/ams_mapping.schema.json @@ -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/common/ams/ams_mapping.schema.json", + "title": "AmsMapping", + "description": "AMS Mapping is a God forsaken hell. And it's CRUCIAL for multi-color. LOL. The ams_mapping array uses a reverse indexing system where:\n- Array positions represent color indices in your print file (starting from 0)\n- Array values represent AMS slot numbers (0-3 for typical 4-slot AMS)\n- -1 indicates unused color slots. ALWAYS - and I say ALWAYS - pad the array so it's length is equal to the sum of all AMS trays (slots) + virtual trays (external spools), ie. a P1P with one AMS would have `ams_mapping` array of length 5 - but H2C with 2x AMS 2 Pro and 1x AMS HT would have `ams_mapping` array of length 11 (printers with two nozzles in the toolhead have two external spools)", + "type": "array", + "items": { "type": "integer", "minimum": -1, "minItems": 1 } +} diff --git a/schemas/bambulab/v2/common/bed_type.schema.json b/schemas/bambulab/v2/common/bed_type.schema.json new file mode 100644 index 0000000..fcd2d64 --- /dev/null +++ b/schemas/bambulab/v2/common/bed_type.schema.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/common/bed_type.schema.json", + "title": "BedType", + "description": "Common schema for bed type. TODO: Add more bed types", + "type": "string", + "enum": [ + "auto" + ] +} diff --git a/schemas/bambulab/v2/common/job/stage.schema.json b/schemas/bambulab/v2/common/job/stage.schema.json index 37424b1..0cb94cd 100644 --- a/schemas/bambulab/v2/common/job/stage.schema.json +++ b/schemas/bambulab/v2/common/job/stage.schema.json @@ -10,7 +10,7 @@ }, "color": { "type": "array", - "items": { "type": "string" } + "items": { "$ref": "../../../common/color_hex.schema.json" } }, "diameter": { "type": "array", diff --git a/schemas/bambulab/v2/common/led_node.schema.json b/schemas/bambulab/v2/common/led_node.schema.json new file mode 100644 index 0000000..34fc1d8 --- /dev/null +++ b/schemas/bambulab/v2/common/led_node.schema.json @@ -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/led_node.schema.json", + "title": "LedNode", + "type": "string", + "enum": [ + "chamber_light", + "work_light", + "chamber_light2" + ] +} diff --git a/schemas/bambulab/v2/common/lights_report.schema.json b/schemas/bambulab/v2/common/lights_report.schema.json index 4a4aacf..bec6c2b 100644 --- a/schemas/bambulab/v2/common/lights_report.schema.json +++ b/schemas/bambulab/v2/common/lights_report.schema.json @@ -13,17 +13,12 @@ "on", "off", "ON", - "OFF" + "OFF", + "flashing", + "FLASHING" ] }, - "node": { - "type": "string", - "enum": [ - "chamber_light", - "work_light", - "chamber_light2" - ] - } + "node": { "$ref": "./led_node.schema.json" } } } } diff --git a/schemas/bambulab/v2/common/vt_tray.schema.json b/schemas/bambulab/v2/common/vt_tray.schema.json index bcfe310..94018e5 100644 --- a/schemas/bambulab/v2/common/vt_tray.schema.json +++ b/schemas/bambulab/v2/common/vt_tray.schema.json @@ -18,7 +18,7 @@ "remain": { "type": "integer", "minimum": 0 }, "tag_uid": { "type": "string" }, "total_len": { "type": "integer" }, - "tray_color": { "type": "string" }, + "tray_color": { "$ref": "../../common/color_hex.schema.json" }, "tray_diameter": { "type": "string" }, "tray_id_name": { "type": "string" }, "tray_info_idx": { "type": "string" }, diff --git a/schemas/bambulab/v2/report.schema.json b/schemas/bambulab/v2/report.schema.json index 91652df..f1d8968 100644 --- a/schemas/bambulab/v2/report.schema.json +++ b/schemas/bambulab/v2/report.schema.json @@ -14,7 +14,7 @@ }, "print": { "oneOf": [ - { "$ref": "report/print/print.schema.json" } + { "$ref": "report/print/push_status.schema.json" } ] } }, diff --git a/schemas/bambulab/v2/report/print/_2d_report.schema.json b/schemas/bambulab/v2/report/print/_2d_report.schema.json index f2e56b5..8b0b0e8 100644 --- a/schemas/bambulab/v2/report/print/_2d_report.schema.json +++ b/schemas/bambulab/v2/report/print/_2d_report.schema.json @@ -22,7 +22,7 @@ "tool_info": { "type": "object", "properties": { - "color": { "type": "string" }, + "color": { "$ref": "../../../common/color_hex.schema.json" }, "diameter": { "type": "number", "minimum": 0 }, "id": { "type": "integer" } }, diff --git a/schemas/bambulab/v2/report/print/ams_change_filament.schema.json b/schemas/bambulab/v2/report/print/ams_change_filament.schema.json new file mode 100644 index 0000000..54f3cb0 --- /dev/null +++ b/schemas/bambulab/v2/report/print/ams_change_filament.schema.json @@ -0,0 +1,31 @@ +{ + "$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/ams_change_filament.schema.json", + "title": "AmsChangeFilamentReport", + "description": "Perform filament change using AMS", + "allOf": [ + { "$ref": "../../../common/envelope.schema.json" }, + { + "type": "object", + "properties": { + "command": { "const": "ams_change_filament" }, + "target": { + "type": "integer", + "description": "Filament tray ID", + "minimum": 0 + }, + "curr_temp": { + "type": "integer", + "description": "Old print temperature", + "minimum": 0 + }, + "tar_temp": { + "type": "integer", + "description": "New print temperature", + "minimum": 0 + } + }, + "required": ["target", "curr_temp", "tar_temp"] + } + ] +} diff --git a/schemas/bambulab/v2/report/print/ams_control.schema.json b/schemas/bambulab/v2/report/print/ams_control.schema.json new file mode 100644 index 0000000..656c12b --- /dev/null +++ b/schemas/bambulab/v2/report/print/ams_control.schema.json @@ -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/report/print/ams_control.schema.json", + "title": "AmsControlReport", + "description": "Control AMS Unit", + "allOf": [ + { "$ref": "../../../common/envelope.schema.json" }, + { + "type": "object", + "properties": { + "command": { "const": "ams_control" }, + "param": { "type": "string", "enum": ["resume", "reset", "pause"] } + }, + "required": ["param"] + } + ] +} diff --git a/schemas/bambulab/v2/report/print/ams_filament_setting.schema.json b/schemas/bambulab/v2/report/print/ams_filament_setting.schema.json new file mode 100644 index 0000000..24f66c4 --- /dev/null +++ b/schemas/bambulab/v2/report/print/ams_filament_setting.schema.json @@ -0,0 +1,26 @@ +{ + "$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/ams_filament_setting.schema.json", + "title": "AmsFilamentSettingReport", + "description": "Change AMS settings of the given unit", + "allOf": [ + { "$ref": "../../../common/envelope.schema.json" }, + { + "type": "object", + "properties": { + "command": { "const": "ams_filament_setting" }, + "ams_id": { "type": "integer", "minimum": 0 }, + "tray_id": { "type": "integer", "minimum": 0 }, + "tray_info_idx": { "type": "string" }, + "tray_color": { "$ref": "../../../common/color_hex.schema.json" }, + "nozzle_temp_min": { "type": "integer", "minimum": 0 }, + "nozzle_temp_max": { "type": "integer", "minimum": 0 }, + "tray_type": { "type": "string" } + }, + "required": [ + "ams_id", "tray_id", "tray_info_idx", "tray_color", + "nozzle_temp_min", "nozzle_temp_max", "tray_type" + ] + } + ] +} diff --git a/schemas/bambulab/v2/report/print/ams_get_rfid.schema.json b/schemas/bambulab/v2/report/print/ams_get_rfid.schema.json new file mode 100644 index 0000000..204f156 --- /dev/null +++ b/schemas/bambulab/v2/report/print/ams_get_rfid.schema.json @@ -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/report/print/ams_get_rfid.schema.json", + "title": "AmsGetRfidReport", + "description": "Read RFID info of filament", + "allOf": [ + { "$ref": "../../../common/envelope.schema.json" }, + { + "type": "object", + "properties": { + "command": { "const": "ams_get_rfid" }, + "ams_id": { "type": "integer", "minimum": 0 }, + "ams_slot": { "type": "integer", "minimum": 0 } + }, + "required": ["ams_id", "ams_slot"] + } + ] +} diff --git a/schemas/bambulab/v2/report/print/ams_user_setting.schema.json b/schemas/bambulab/v2/report/print/ams_user_setting.schema.json new file mode 100644 index 0000000..608c7d9 --- /dev/null +++ b/schemas/bambulab/v2/report/print/ams_user_setting.schema.json @@ -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/report/print/ams_user_setting.schema.json", + "title": "AmsUserSettingReport", + "description": "Change AMS settings of the given unit", + "allOf": [ + { "$ref": "../../../common/envelope.schema.json" }, + { + "type": "object", + "properties": { + "command": { "const": "ams_user_setting" }, + "ams_id": { "type": "integer", "minimum": 0 }, + "startup_read_option": { "type": "boolean" }, + "tray_read_option": { "type": "boolean" } + }, + "required": ["ams_id", "startup_read_option", "tray_read_option"] + } + ] +} diff --git a/schemas/bambulab/v2/report/print/pause.schema.json b/schemas/bambulab/v2/report/print/pause.schema.json index 9bffc24..bfa3b8e 100644 --- a/schemas/bambulab/v2/report/print/pause.schema.json +++ b/schemas/bambulab/v2/report/print/pause.schema.json @@ -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/pause.schema.json", + "$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/report/print/pause.schema.json", "title": "PausePrintReport", "allOf": [ { "$ref": "../../../common/envelope.schema.json" }, diff --git a/schemas/bambulab/v2/report/print/print_option.schema.json b/schemas/bambulab/v2/report/print/print_option.schema.json new file mode 100644 index 0000000..8eedfaf --- /dev/null +++ b/schemas/bambulab/v2/report/print/print_option.schema.json @@ -0,0 +1,16 @@ +{ + "$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_option.schema.json", + "title": "PrintOptionReport", + "description": "Modifies printer's print mode.", + "allOf": [ + { "$ref": "../../../common/envelope.schema.json" }, + { + "type": "object", + "properties": { + "command": { "const": "print_option" }, + "auto_recovery": { "type": "boolean" } + } + } + ] +} diff --git a/schemas/bambulab/v2/report/print/project_file.schema.json b/schemas/bambulab/v2/report/print/project_file.schema.json new file mode 100644 index 0000000..8f7ccc6 --- /dev/null +++ b/schemas/bambulab/v2/report/print/project_file.schema.json @@ -0,0 +1,58 @@ +{ + "$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/project_file.schema.json", + "title": "PrintProjectFileReport", + "description": "Print project file", + "allOf": [ + { "$ref": "../../../common/envelope.schema.json" }, + { + "type": "object", + "properties": { + "command": { "const": "project_file" }, + "param": { "type": "string" }, + "project_id": { "type": "string", "description": "\"0\" for local prints" }, + "profile_id": { "type": "string", "description": "\"0\" for local prints" }, + "task_id": { "type": "string", "description": "\"0\" for local prints" }, + "subtask_id": { "type": "string", "description": "\"0\" for local prints" }, + "subtask_name": { "type": "string", "description": "Empty string for local prints" }, + "file": { "type": "string", "description": "File name to print - may be empty string if `url` field already contains the file name" }, + "url": { "$ref": "../../../common/file_url.schema.json" }, + "md5": { "type": "string", "description": "MD5 hash of the project file. Can be empty" }, + "timelapse": { "type": "boolean" }, + "bed_type": { "$ref": "../../common/bed_type.schema.json" }, + "bed_levelling": { "type": "boolean" }, + "flow_cali": { "type": "boolean" }, + "vibration_cali": { "type": "boolean" }, + "layer_inspect": { "type": "boolean" }, + "ams_mapping": { + "oneOf": [ + { "$ref": "../../common/ams/ams_mapping.schema.json" }, + { "type": "string" } + ] + }, + "use_ams": { "type": "boolean" } + }, + "required": ["param"], + "anyOf": [{ "required": ["file"] }, { "required": ["url"] }] + }, + { + "oneOf": [ + { + "type": "object", + "properties": { + "ams_mapping": { "$ref": "../../common/ams/ams_mapping.schema.json" }, + "use_ams": true + }, + "required": ["ams_mapping", "use_ams"] + }, + { + "type": "object", + "properties": { + "ams_mapping": { "type": "string", "const": "" }, + "use_ams": false + } + } + ] + } + ] +} diff --git a/schemas/bambulab/v2/report/print/print.schema.json b/schemas/bambulab/v2/report/print/push_status.schema.json similarity index 97% rename from schemas/bambulab/v2/report/print/print.schema.json rename to schemas/bambulab/v2/report/print/push_status.schema.json index 92c9f93..145992e 100644 --- a/schemas/bambulab/v2/report/print/print.schema.json +++ b/schemas/bambulab/v2/report/print/push_status.schema.json @@ -1,7 +1,7 @@ { "$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", + "$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/report/print/push_status.schema.json", + "title": "PushStatusReport", "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" }, @@ -107,7 +107,7 @@ "queue_total": { "type": "integer" }, "remain_time": { "type": "integer" }, - "s_obj": { "type": "array", "items": {} }, + "s_obj": { "type": "array", "items": { "type": "number" } }, "sdcard": { "type": "boolean" }, "sequence_id": { "type": "string" }, diff --git a/schemas/bambulab/v2/report/print/resume.schema.json b/schemas/bambulab/v2/report/print/resume.schema.json index 5ca69f8..676d96f 100644 --- a/schemas/bambulab/v2/report/print/resume.schema.json +++ b/schemas/bambulab/v2/report/print/resume.schema.json @@ -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/resume.schema.json", + "$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/report/print/resume.schema.json", "title": "ResumePrintReport", "allOf": [ { "$ref": "../../../common/envelope.schema.json" }, diff --git a/schemas/bambulab/v2/report/print/stop.schema.json b/schemas/bambulab/v2/report/print/stop.schema.json index 71640ed..5cb8363 100644 --- a/schemas/bambulab/v2/report/print/stop.schema.json +++ b/schemas/bambulab/v2/report/print/stop.schema.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/request/print/stop.schema.json", - "title": "StopPrintRequest", + "$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/report/print/stop.schema.json", + "title": "StopPrintReport", "allOf": [ { "$ref": "../../../common/envelope.schema.json" }, { diff --git a/schemas/bambulab/v2/report/system/ledctrl.schema.json b/schemas/bambulab/v2/report/system/ledctrl.schema.json new file mode 100644 index 0000000..d987088 --- /dev/null +++ b/schemas/bambulab/v2/report/system/ledctrl.schema.json @@ -0,0 +1,50 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/report/system/ledctrl.schema.json", + "title": "LedctrlReport", + "allOf": [ + { "$ref": "../../../common/envelope.schema.json" }, + { + "type": "object", + "properties": { + "command": { "const": "ledctrl" }, + "led_node": { "$ref": "../../common/led_node.schema.json" } + }, + "required": ["led_node"] + }, + { + "oneOf": [ + { + "type": "object", + "properties": { + "led_mode": { + "type": "string", + "enum": ["on", "off", "ON", "OFF"] + } + }, + "required": ["led_mode"] + }, + { + "type": "object", + "properties": { + "led_mode": { + "type": "string", + "enum": ["flashing", "FLASHING"] + }, + "led_on_time": { "type": "integer", "minimum": 1 }, + "led_off_time": { "type": "integer", "minimum": 1 }, + "loop_times": { "type": "integer", "minimum": 1 }, + "interval_time": { "type": "integer", "minimum": 1 } + }, + "required": [ + "led_mode", + "led_on_time", + "led_off_time", + "loop_times", + "interval_time" + ] + } + ] + } + ] +} diff --git a/schemas/bambulab/v2/request/print/ams_change_filament.schema.json b/schemas/bambulab/v2/request/print/ams_change_filament.schema.json new file mode 100644 index 0000000..8f18843 --- /dev/null +++ b/schemas/bambulab/v2/request/print/ams_change_filament.schema.json @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/request/print/ams_change_filament.schema.json", + "title": "AmsChangeFilamentRequest", + "description": "Perform filament change using AMS", + "allOf": [ + { "$ref": "../../../common/envelope.schema.json" }, + { + "type": "object", + "properties": { + "command": { "const": "ams_change_filament" }, + "target": { + "type": "integer", + "description": "Filament tray ID", + "minimum": 0 + }, + "curr_temp": { + "type": "integer", + "description": "Old print temperature", + "minimum": 0 + }, + "tar_temp": { + "type": "integer", + "description": "New print temperature", + "minimum": 0 + } + }, + "required": ["target", "curr_temp", "tar_temp"] + } + ] +} diff --git a/schemas/bambulab/v2/request/print/ams_control.schema.json b/schemas/bambulab/v2/request/print/ams_control.schema.json new file mode 100644 index 0000000..fa5ca44 --- /dev/null +++ b/schemas/bambulab/v2/request/print/ams_control.schema.json @@ -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/request/print/ams_control.schema.json", + "title": "AmsControlRequest", + "description": "Control AMS Unit", + "allOf": [ + { "$ref": "../../../common/envelope.schema.json" }, + { + "type": "object", + "properties": { + "command": { "const": "ams_control" }, + "param": { "type": "string", "enum": ["resume", "reset", "pause"] } + }, + "required": ["param"] + } + ] +} diff --git a/schemas/bambulab/v2/request/print/ams_filament_setting.schema.json b/schemas/bambulab/v2/request/print/ams_filament_setting.schema.json new file mode 100644 index 0000000..eae441c --- /dev/null +++ b/schemas/bambulab/v2/request/print/ams_filament_setting.schema.json @@ -0,0 +1,26 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/request/print/ams_filament_setting.schema.json", + "title": "AmsFilamentSettingRequest", + "description": "Change AMS settings of the given unit", + "allOf": [ + { "$ref": "../../../common/envelope.schema.json" }, + { + "type": "object", + "properties": { + "command": { "const": "ams_filament_setting" }, + "ams_id": { "type": "integer", "minimum": 0 }, + "tray_id": { "type": "integer", "minimum": 0 }, + "tray_info_idx": { "type": "string" }, + "tray_color": { "$ref": "../../../common/color_hex.schema.json" }, + "nozzle_temp_min": { "type": "integer", "minimum": 0 }, + "nozzle_temp_max": { "type": "integer", "minimum": 0 }, + "tray_type": { "type": "string" } + }, + "required": [ + "ams_id", "tray_id", "tray_info_idx", "tray_color", + "nozzle_temp_min", "nozzle_temp_max", "tray_type" + ] + } + ] +} diff --git a/schemas/bambulab/v2/request/print/ams_get_rfid.schema.json b/schemas/bambulab/v2/request/print/ams_get_rfid.schema.json new file mode 100644 index 0000000..10906ff --- /dev/null +++ b/schemas/bambulab/v2/request/print/ams_get_rfid.schema.json @@ -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/request/print/ams_get_rfid.schema.json", + "title": "AmsGetRfidRequest", + "description": "Read RFID info of filament", + "allOf": [ + { "$ref": "../../../common/envelope.schema.json" }, + { + "type": "object", + "properties": { + "command": { "const": "ams_get_rfid" }, + "ams_id": { "type": "integer", "minimum": 0 }, + "ams_slot": { "type": "integer", "minimum": 0 } + }, + "required": ["ams_id", "ams_slot"] + } + ] +} diff --git a/schemas/bambulab/v2/request/print/ams_user_setting.schema.json b/schemas/bambulab/v2/request/print/ams_user_setting.schema.json new file mode 100644 index 0000000..b0c6f26 --- /dev/null +++ b/schemas/bambulab/v2/request/print/ams_user_setting.schema.json @@ -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/request/print/ams_user_setting.schema.json", + "title": "AmsUserSettingRequest", + "description": "Change AMS settings of the given unit", + "allOf": [ + { "$ref": "../../../common/envelope.schema.json" }, + { + "type": "object", + "properties": { + "command": { "const": "ams_user_setting" }, + "ams_id": { "type": "integer", "minimum": 0 }, + "startup_read_option": { "type": "boolean" }, + "tray_read_option": { "type": "boolean" } + }, + "required": ["ams_id", "startup_read_option", "tray_read_option"] + } + ] +} diff --git a/schemas/bambulab/v2/request/print/pause.schema.json b/schemas/bambulab/v2/request/print/pause.schema.json index 9bffc24..20a894a 100644 --- a/schemas/bambulab/v2/request/print/pause.schema.json +++ b/schemas/bambulab/v2/request/print/pause.schema.json @@ -1,7 +1,7 @@ { "$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/pause.schema.json", - "title": "PausePrintReport", + "$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/request/print/pause.schema.json", + "title": "PausePrintRequest", "allOf": [ { "$ref": "../../../common/envelope.schema.json" }, { diff --git a/schemas/bambulab/v2/request/print/print_option.schema.json b/schemas/bambulab/v2/request/print/print_option.schema.json new file mode 100644 index 0000000..0113d04 --- /dev/null +++ b/schemas/bambulab/v2/request/print/print_option.schema.json @@ -0,0 +1,16 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/request/print/print_option.schema.json", + "title": "PrintOptionRequest", + "description": "Modifies printer's print mode.", + "allOf": [ + { "$ref": "../../../common/envelope.schema.json" }, + { + "type": "object", + "properties": { + "command": { "const": "print_option" }, + "auto_recovery": { "type": "boolean" } + } + } + ] +} diff --git a/schemas/bambulab/v2/request/print/project_file.schema.json b/schemas/bambulab/v2/request/print/project_file.schema.json new file mode 100644 index 0000000..0149d3f --- /dev/null +++ b/schemas/bambulab/v2/request/print/project_file.schema.json @@ -0,0 +1,58 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/request/print/project_file.schema.json", + "title": "PrintProjectFileRequest", + "description": "Print project file", + "allOf": [ + { "$ref": "../../../common/envelope.schema.json" }, + { + "type": "object", + "properties": { + "command": { "const": "project_file" }, + "param": { "type": "string" }, + "project_id": { "type": "string", "description": "\"0\" for local prints" }, + "profile_id": { "type": "string", "description": "\"0\" for local prints" }, + "task_id": { "type": "string", "description": "\"0\" for local prints" }, + "subtask_id": { "type": "string", "description": "\"0\" for local prints" }, + "subtask_name": { "type": "string", "description": "Empty string for local prints" }, + "file": { "type": "string", "description": "File name to print - may be empty string if `url` field already contains the file name" }, + "url": { "$ref": "../../../common/file_url.schema.json" }, + "md5": { "type": "string", "description": "MD5 hash of the project file. Can be empty" }, + "timelapse": { "type": "boolean" }, + "bed_type": { "$ref": "../../common/bed_type.schema.json" }, + "bed_levelling": { "type": "boolean" }, + "flow_cali": { "type": "boolean" }, + "vibration_cali": { "type": "boolean" }, + "layer_inspect": { "type": "boolean" }, + "ams_mapping": { + "oneOf": [ + { "$ref": "../../common/ams/ams_mapping.schema.json" }, + { "type": "string" } + ] + }, + "use_ams": { "type": "boolean" } + }, + "required": ["param"], + "anyOf": [{ "required": ["file"] }, { "required": ["url"] }] + }, + { + "oneOf": [ + { + "type": "object", + "properties": { + "ams_mapping": { "$ref": "../../common/ams/ams_mapping.schema.json" }, + "use_ams": true + }, + "required": ["ams_mapping", "use_ams"] + }, + { + "type": "object", + "properties": { + "ams_mapping": { "type": "string", "const": "" }, + "use_ams": false + } + } + ] + } + ] +} diff --git a/schemas/bambulab/v2/request/print/resume.schema.json b/schemas/bambulab/v2/request/print/resume.schema.json index 5ca69f8..1421332 100644 --- a/schemas/bambulab/v2/request/print/resume.schema.json +++ b/schemas/bambulab/v2/request/print/resume.schema.json @@ -1,7 +1,7 @@ { "$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/resume.schema.json", - "title": "ResumePrintReport", + "$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/request/print/resume.schema.json", + "title": "ResumePrintRequest", "allOf": [ { "$ref": "../../../common/envelope.schema.json" }, { diff --git a/schemas/bambulab/v2/request/print/skip_objects.schema.json b/schemas/bambulab/v2/request/print/skip_objects.schema.json new file mode 100644 index 0000000..ddfc197 --- /dev/null +++ b/schemas/bambulab/v2/request/print/skip_objects.schema.json @@ -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/request/print/skip_objects.schema.json", + "title": "SkipObjectsRequest", + "description": "Skip objects based on IDs in slice_info.config. Updates `pushing.pushall` -> `print.push_status` - field `s_obj` with IDs of skipped objects.", + "allOf": [ + { "$ref": "../../../common/envelope.schema.json" }, + { + "type": "object", + "properties": { + "command": { "const": "skip_objects" }, + "obj_list": { + "type": "array", + "items": { "type": "integer", "minimum": 0 }, + "minItems": 1 + } + }, + "required": ["param"] + } + ] +} diff --git a/schemas/bambulab/v2/request/print/stop.schema.json b/schemas/bambulab/v2/request/print/stop.schema.json index 71640ed..c65b65b 100644 --- a/schemas/bambulab/v2/request/print/stop.schema.json +++ b/schemas/bambulab/v2/request/print/stop.schema.json @@ -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/request/print/stop.schema.json", + "$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/request/print/stop.schema.json", "title": "StopPrintRequest", "allOf": [ { "$ref": "../../../common/envelope.schema.json" }, diff --git a/schemas/bambulab/v2/request/system/ledctrl.schema.json b/schemas/bambulab/v2/request/system/ledctrl.schema.json new file mode 100644 index 0000000..f9789ac --- /dev/null +++ b/schemas/bambulab/v2/request/system/ledctrl.schema.json @@ -0,0 +1,50 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/request/system/ledctrl.schema.json", + "title": "LedctrlRequest", + "allOf": [ + { "$ref": "../../../common/envelope.schema.json" }, + { + "type": "object", + "properties": { + "command": { "const": "ledctrl" }, + "led_node": { "$ref": "../../common/led_node.schema.json" } + }, + "required": ["led_node"] + }, + { + "oneOf": [ + { + "type": "object", + "properties": { + "led_mode": { + "type": "string", + "enum": ["on", "off", "ON", "OFF"] + } + }, + "required": ["led_mode"] + }, + { + "type": "object", + "properties": { + "led_mode": { + "type": "string", + "enum": ["flashing", "FLASHING"] + }, + "led_on_time": { "type": "integer", "minimum": 1 }, + "led_off_time": { "type": "integer", "minimum": 1 }, + "loop_times": { "type": "integer", "minimum": 1 }, + "interval_time": { "type": "integer", "minimum": 1 } + }, + "required": [ + "led_mode", + "led_on_time", + "led_off_time", + "loop_times", + "interval_time" + ] + } + ] + } + ] +}