Do you need a “proof” to be shown to the client, or rather a way to just retrieve these informations ?
Are you “tech guys” ?
One idea (if you are a bit technical …) could be to write a small “something” (a python script, …) allowing to connect to the Bambu Lab MQTT server, and that would automatically extract the time spent for one build.
It’s rather easy to do, i would say.
Algorithm of the python script (or whatever) :
- Connect on the MQTT Broker (192.168.X.Y:1889) (no auth)
- Continuously read the messages pushed in the MQTT topic “device/<BAMBU_ID>/report” (= a “while loop”)
- Decode the message and extract the few needed fields like “mc_percent” (percentage of progress of build from 0 to 100%), “mc_print_stage” (just a guess), “mc_remaining_time” (number of minutes before end of build), “gcode_start_timestamp” (hours and minutes of the beginning of the gcode being processed), …
- When “mc_percent” reaches “100” (= 100% of print) (or maybe when “pc_print_stage” changes from 2 to 1 (just another guess), then : just calculate the difference between “current timestamp” at that time minus “gcode_start_timestamp” : that will give you the exact amount of seconds for the print done during that period
- You could have the script running for a long time and “capture” several successive prints and sum the hours taken, and so on
Of course up to you to see how to map “customer” and “results” : for example, launch the script with some parameters, keep it running for days with a few prints during the day, and stop it when you stop working for that customer and switch to another one (of course “idle time” during which the printer is not printing won’t be taken in account) - so you would launch the script with :
python3 bambu.py <BAMBU_ID> <CUSTOMER_ID>
and the script could display over time something like :
CUSTOMER_ID Total prints done Time taken by last print Cumulative time for all prints"
CUSTOMER_ID_0001 1 print done 2 h 2 h
CUSTOMER_ID_0001 2 prints done 1 h 3 h
CUSTOMER_ID_0001 3 prints done 30 m 3 h 30 min
Example of full JSON content sent by Bambu printers each seconds :
device/00M00A261900054/report {
"print": {
"ams": {
"ams": [
{
"humidity": "2",
"id": "0",
"temp": "22.5",
"tray": [
{
"bed_temp": "0",
"bed_temp_type": "0",
"drying_temp": "0",
"drying_time": "0",
"id": "0",
"nozzle_temp_max": "260",
"nozzle_temp_min": "220",
"remain": 0,
"tag_uid": "0000000000000000",
"tray_color": "161616FF",
"tray_diameter": "0.00",
"tray_id_name": "",
"tray_info_idx": "GFG99",
"tray_sub_brands": "",
"tray_type": "PETG",
"tray_uuid": "00000000000000000000000000000000",
"tray_weight": "0",
"xcam_info": "000000000000000000000000"
},
{
"bed_temp": "0",
"bed_temp_type": "0",
"drying_temp": "0",
"drying_time": "0",
"id": "1",
"nozzle_temp_max": "260",
"nozzle_temp_min": "220",
"remain": 0,
"tag_uid": "0000000000000000",
"tray_color": "F98C36FF",
"tray_diameter": "0.00",
"tray_id_name": "",
"tray_info_idx": "GFG99",
"tray_sub_brands": "",
"tray_type": "PETG",
"tray_uuid": "00000000000000000000000000000000",
"tray_weight": "0",
"xcam_info": "000000000000000000000000"
},
{
"bed_temp": "0",
"bed_temp_type": "0",
"drying_temp": "0",
"drying_time": "0",
"id": "2",
"nozzle_temp_max": "260",
"nozzle_temp_min": "220",
"remain": 0,
"tag_uid": "0000000000000000",
"tray_color": "FFFFFFFF",
"tray_diameter": "0.00",
"tray_id_name": "",
"tray_info_idx": "GFG99",
"tray_sub_brands": "",
"tray_type": "PETG",
"tray_uuid": "00000000000000000000000000000000",
"tray_weight": "0",
"xcam_info": "000000000000000000000000"
},
{
"bed_temp": "0",
"bed_temp_type": "0",
"drying_temp": "0",
"drying_time": "0",
"id": "3",
"nozzle_temp_max": "260",
"nozzle_temp_min": "220",
"remain": 0,
"tag_uid": "0000000000000000",
"tray_color": "0ACC38FF",
"tray_diameter": "0.00",
"tray_id_name": "",
"tray_info_idx": "GFG99",
"tray_sub_brands": "",
"tray_type": "PETG",
"tray_uuid": "00000000000000000000000000000000",
"tray_weight": "0",
"xcam_info": "000000000000000000000000"
}
]
},
{
"humidity": "5",
"id": "1",
"temp": "20.6",
"tray": [
{
"bed_temp": "0",
"bed_temp_type": "0",
"drying_temp": "0",
"drying_time": "0",
"id": "0",
"nozzle_temp_max": "260",
"nozzle_temp_min": "220",
"remain": 0,
"tag_uid": "0000000000000000",
"tray_color": "F72323FF",
"tray_diameter": "0.00",
"tray_id_name": "",
"tray_info_idx": "GFG99",
"tray_sub_brands": "",
"tray_type": "PETG",
"tray_uuid": "00000000000000000000000000000000",
"tray_weight": "0",
"xcam_info": "000000000000000000000000"
},
{
"bed_temp": "0",
"bed_temp_type": "0",
"drying_temp": "0",
"drying_time": "0",
"id": "1",
"nozzle_temp_max": "260",
"nozzle_temp_min": "220",
"remain": 0,
"tag_uid": "0000000000000000",
"tray_color": "A03CF7FF",
"tray_diameter": "0.00",
"tray_id_name": "",
"tray_info_idx": "GFG99",
"tray_sub_brands": "",
"tray_type": "PETG",
"tray_uuid": "00000000000000000000000000000000",
"tray_weight": "0",
"xcam_info": "000000000000000000000000"
},
{
"bed_temp": "0",
"bed_temp_type": "0",
"drying_temp": "0",
"drying_time": "0",
"id": "2",
"nozzle_temp_max": "260",
"nozzle_temp_min": "220",
"remain": 0,
"tag_uid": "0000000000000000",
"tray_color": "898989FF",
"tray_diameter": "0.00",
"tray_id_name": "",
"tray_info_idx": "GFG99",
"tray_sub_brands": "",
"tray_type": "PETG",
"tray_uuid": "00000000000000000000000000000000",
"tray_weight": "0",
"xcam_info": "000000000000000000000000"
},
{
"bed_temp": "0",
"bed_temp_type": "0",
"drying_temp": "0",
"drying_time": "0",
"id": "3",
"nozzle_temp_max": "260",
"nozzle_temp_min": "220",
"remain": 0,
"tag_uid": "0000000000000000",
"tray_color": "AF7933FF",
"tray_diameter": "0.00",
"tray_id_name": "",
"tray_info_idx": "GFG99",
"tray_sub_brands": "",
"tray_type": "PETG",
"tray_uuid": "00000000000000000000000000000000",
"tray_weight": "0",
"xcam_info": "000000000000000000000000"
}
]
}
],
"ams_exist_bits": "3",
"insert_flag": true,
"power_on_flag": false,
"tray_exist_bits": "ff",
"tray_is_bbl_bits": "ff",
"tray_now": "6",
"tray_read_done_bits": "ff",
"tray_reading_bits": "0",
"tray_tar": "6",
"version": 13
},
"ams_rfid_status": 2,
"ams_status": 768,
"bed_target_temper": 70.0,
"bed_temper": 70.0,
"big_fan1_speed": "0",
"big_fan2_speed": "15",
"chamber_temper": 31.0,
"command": "push_status",
"cooling_fan_speed": "0",
"fail_reason": "0",
"fan_gear": 16711680,
"force_upgrade": false,
"gcode_file": "/data/Metadata/plate_1.gcode",
"gcode_file_prepare_percent": "100",
"gcode_start_time": "1673860282",
"gcode_state": "RUNNING",
"heatbreak_fan_speed": "15",
"hms": [],
"home_flag": 271,
"hw_switch_state": 1,
"ipcam": {
"ipcam_dev": "1",
"ipcam_record": "disable",
"resolution": "1080p",
"timelapse": "enable"
},
"lifecycle": "product",
"lights_report": [
{
"mode": "on",
"node": "chamber_light"
},
{
"mode": "flashing",
"node": "work_light"
}
],
"mc_percent": 6,
"mc_print_error_code": "0",
"mc_print_stage": "2",
"mc_print_sub_stage": 0,
"mc_remaining_time": 326,
"mess_production_state": "active",
"nozzle_target_temper": 255.0,
"nozzle_temper": 255.0,
"online": {
"ahb": true,
"rfid": false
},
"print_error": 0,
"print_gcode_action": 0,
"print_real_action": 0,
"print_type": "cloud",
"profile_id": "1264843",
"project_id": "1264845",
"sdcard": true,
"sequence_id": "2021",
"spd_lvl": 2,
"spd_mag": 100,
"stg": [
2,
14,
1,
8
],
"stg_cur": 0,
"subtask_id": "2435333",
"subtask_name": "boardgame-the-king-is-dead_plate_1",
"task_id": "2435332",
"upgrade_state": {
"ahb_new_version_number": "",
"ams_new_version_number": "",
"consistency_request": false,
"dis_state": 0,
"err_code": 0,
"force_upgrade": false,
"message": "",
"module": "null",
"new_version_state": 2,
"ota_new_version_number": "",
"progress": "0",
"sequence_id": 0,
"status": "IDLE"
},
"upload": {
"file_size": 0,
"finish_size": 0,
"message": "Good",
"oss_url": "",
"progress": 0,
"sequence_id": "0903",
"speed": 0,
"status": "idle",
"task_id": "",
"time_remaining": 0,
"trouble_id": ""
},
"wifi_signal": "-60dBm",
"xcam": {
"allow_skip_parts": false,
"buildplate_marker_detector": false,
"first_layer_inspector": true,
"halt_print_sensitivity": "medium",
"print_halt": true,
"printing_monitor": true,
"spaghetti_detector": true
},
"xcam_status": "0"
}
}